further clean up em and general code
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit

This commit is contained in:
Robin Müller 2022-10-26 15:47:23 +02:00
parent c2845aefaf
commit 00059251f0
8 changed files with 37 additions and 21 deletions

View File

@ -101,6 +101,18 @@ set(OBSW_ADD_GPS_CTRL
set(OBSW_ADD_TCS_CTRL set(OBSW_ADD_TCS_CTRL
${INIT_VAL} ${INIT_VAL}
CACHE STRING "Add TCS controllers") CACHE STRING "Add TCS controllers")
set(OBSW_ADD_HEATERS
${INIT_VAL}
CACHE STRING "Add TCS heaters")
set(OBSW_ADD_PLOC_SUPERVISOR
${INIT_VAL}
CACHE STRING "Add PLOC supervisor handler")
set(OBSW_ADD_SA_DEPL
${INIT_VAL}
CACHE STRING "Add SA deployment handler")
set(OBSW_ADD_PLOC_MPSOC
${INIT_VAL}
CACHE STRING "Add MPSoC handler")
set(OBSW_ADD_ACS_CTRL set(OBSW_ADD_ACS_CTRL
${INIT_VAL} ${INIT_VAL}
CACHE STRING "Add ACS controller") CACHE STRING "Add ACS controller")

View File

@ -24,8 +24,8 @@
#define OBSW_ADD_MGT @OBSW_ADD_MGT@ #define OBSW_ADD_MGT @OBSW_ADD_MGT@
#define OBSW_ADD_BPX_BATTERY_HANDLER @OBSW_ADD_BPX_BATTERY_HANDLER@ #define OBSW_ADD_BPX_BATTERY_HANDLER @OBSW_ADD_BPX_BATTERY_HANDLER@
#define OBSW_ADD_STAR_TRACKER @OBSW_ADD_STAR_TRACKER@ #define OBSW_ADD_STAR_TRACKER @OBSW_ADD_STAR_TRACKER@
#define OBSW_ADD_PLOC_SUPERVISOR 1 #define OBSW_ADD_PLOC_SUPERVISOR @OBSW_ADD_PLOC_SUPERVISOR@
#define OBSW_ADD_PLOC_MPSOC 1 #define OBSW_ADD_PLOC_MPSOC @OBSW_ADD_PLOC_MPSOC@
#define OBSW_ADD_SUN_SENSORS @OBSW_ADD_SUN_SENSORS@ #define OBSW_ADD_SUN_SENSORS @OBSW_ADD_SUN_SENSORS@
#define OBSW_ADD_SUS_BOARD_ASS @OBSW_ADD_SUS_BOARD_ASS@ #define OBSW_ADD_SUS_BOARD_ASS @OBSW_ADD_SUS_BOARD_ASS@
#define OBSW_ADD_ACS_BOARD @OBSW_ADD_ACS_BOARD@ #define OBSW_ADD_ACS_BOARD @OBSW_ADD_ACS_BOARD@
@ -34,7 +34,9 @@
#define OBSW_ADD_TCS_CTRL @OBSW_ADD_TCS_CTRL@ #define OBSW_ADD_TCS_CTRL @OBSW_ADD_TCS_CTRL@
#define OBSW_ADD_RW @OBSW_ADD_RW@ #define OBSW_ADD_RW @OBSW_ADD_RW@
#define OBSW_ADD_RTD_DEVICES @OBSW_ADD_RTD_DEVICES@ #define OBSW_ADD_RTD_DEVICES @OBSW_ADD_RTD_DEVICES@
#define OBSW_ADD_SA_DEPL @OBSW_ADD_SA_DEPL@
#define OBSW_ADD_SCEX_DEVICE @OBSW_ADD_SCEX_DEVICE@ #define OBSW_ADD_SCEX_DEVICE @OBSW_ADD_SCEX_DEVICE@
#define OBSW_ADD_HEATERS @OBSW_ADD_HEATERS@
#define OBSW_ADD_TMP_DEVICES @OBSW_ADD_TMP_DEVICES@ #define OBSW_ADD_TMP_DEVICES @OBSW_ADD_TMP_DEVICES@
#define OBSW_ADD_RAD_SENSORS @OBSW_ADD_RAD_SENSORS@ #define OBSW_ADD_RAD_SENSORS @OBSW_ADD_RAD_SENSORS@
#define OBSW_ADD_PL_PCDU @OBSW_ADD_PL_PCDU@ #define OBSW_ADD_PL_PCDU @OBSW_ADD_PL_PCDU@

View File

@ -75,8 +75,10 @@ ReturnValue_t Q7STestTask::performOneShotAction() {
if (doTestProtHandler) { if (doTestProtHandler) {
testProtHandler(); testProtHandler();
} }
FsOpCodes opCode = FsOpCodes::CREATE_EMPTY_FILE_IN_TMP; if (DO_TEST_FS_HANDLER) {
testFileSystemHandlerDirect(opCode); FsOpCodes opCode = FsOpCodes::CREATE_EMPTY_FILE_IN_TMP;
testFileSystemHandlerDirect(opCode);
}
return TestTask::performOneShotAction(); return TestTask::performOneShotAction();
} }

View File

@ -18,6 +18,7 @@ class Q7STestTask : public TestTask {
bool doTestScratchApi = false; bool doTestScratchApi = false;
static constexpr bool DO_TEST_GOMSPACE_API = false; static constexpr bool DO_TEST_GOMSPACE_API = false;
static constexpr bool DO_TEST_GOMSPACE_GET_CONFIG = false; static constexpr bool DO_TEST_GOMSPACE_GET_CONFIG = false;
static constexpr bool DO_TEST_FS_HANDLER = false;
bool doTestGpsShm = false; bool doTestGpsShm = false;
bool doTestGpsSocket = false; bool doTestGpsSocket = false;
bool doTestProtHandler = false; bool doTestProtHandler = false;

View File

@ -73,6 +73,7 @@ void initmission::initTasks() {
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
initmission::printAddObjectError("CORE_CTRL", objects::CORE_CONTROLLER); initmission::printAddObjectError("CORE_CTRL", objects::CORE_CONTROLLER);
} }
#if OBSW_ADD_SA_DEPL == 1
// Could add this to the core controller but the core controller does so many thing that I would // Could add this to the core controller but the core controller does so many thing that I would
// prefer to have the solar array deployment in a seprate task. // prefer to have the solar array deployment in a seprate task.
PeriodicTaskIF* solarArrayDeplTask = factory->createPeriodicTask( PeriodicTaskIF* solarArrayDeplTask = factory->createPeriodicTask(
@ -81,6 +82,7 @@ void initmission::initTasks() {
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
initmission::printAddObjectError("SOLAR_ARRAY_DEPL", objects::SOLAR_ARRAY_DEPL_HANDLER); initmission::printAddObjectError("SOLAR_ARRAY_DEPL", objects::SOLAR_ARRAY_DEPL_HANDLER);
} }
#endif
/* TMTC Distribution */ /* TMTC Distribution */
PeriodicTaskIF* tmTcDistributor = factory->createPeriodicTask( PeriodicTaskIF* tmTcDistributor = factory->createPeriodicTask(
@ -234,10 +236,12 @@ void initmission::initTasks() {
initmission::printAddObjectError("THERMAL_CONTROLLER", objects::THERMAL_CONTROLLER); initmission::printAddObjectError("THERMAL_CONTROLLER", objects::THERMAL_CONTROLLER);
} }
#endif #endif
#if OBSW_ADD_HEATERS == 1
result = tcsSystemTask->addComponent(objects::HEATER_HANDLER); result = tcsSystemTask->addComponent(objects::HEATER_HANDLER);
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
initmission::printAddObjectError("HEATER_HANDLER", objects::HEATER_HANDLER); initmission::printAddObjectError("HEATER_HANDLER", objects::HEATER_HANDLER);
} }
#endif
#if OBSW_ADD_STAR_TRACKER == 1 #if OBSW_ADD_STAR_TRACKER == 1
PeriodicTaskIF* strHelperTask = factory->createPeriodicTask( PeriodicTaskIF* strHelperTask = factory->createPeriodicTask(
@ -313,7 +317,9 @@ void initmission::initTasks() {
#endif /* OBSW_USE_CCSDS_IP_CORE == 1 */ #endif /* OBSW_USE_CCSDS_IP_CORE == 1 */
sysCtrlTask->startTask(); sysCtrlTask->startTask();
#if OBSW_ADD_SA_DEPL == 1
solarArrayDeplTask->startTask(); solarArrayDeplTask->startTask();
#endif
taskStarter(pstTasks, "PST task vector"); taskStarter(pstTasks, "PST task vector");
taskStarter(pusTasks, "PUS task vector"); taskStarter(pusTasks, "PUS task vector");
@ -340,7 +346,9 @@ void initmission::initTasks() {
tcsPollingTask->startTask(); tcsPollingTask->startTask();
tcsTask->startTask(); tcsTask->startTask();
#endif /* OBSW_ADD_RTD_DEVICES == 1 */ #endif /* OBSW_ADD_RTD_DEVICES == 1 */
tcsSystemTask->startTask(); if (not tcsSystemTask->isEmpty()) {
tcsSystemTask->startTask();
}
#if OBSW_ADD_PLOC_SUPERVISOR == 1 #if OBSW_ADD_PLOC_SUPERVISOR == 1
supvHelperTask->startTask(); supvHelperTask->startTask();
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */ #endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */

View File

@ -35,6 +35,7 @@ void ObjectFactory::produce(void* args) {
gpioCallbacks::disableAllDecoder(gpioComIF); gpioCallbacks::disableAllDecoder(gpioComIF);
PowerSwitchIF* pwrSwitcher = new DummyPowerSwitcher(objects::PCDU_HANDLER, 18, 0); PowerSwitchIF* pwrSwitcher = new DummyPowerSwitcher(objects::PCDU_HANDLER, 18, 0);
static_cast<void>(pwrSwitcher);
// Regular FM code, does not work for EM if the hardware is not connected // Regular FM code, does not work for EM if the hardware is not connected
// createPcduComponents(gpioComIF, &pwrSwitcher); // createPcduComponents(gpioComIF, &pwrSwitcher);

View File

@ -460,20 +460,18 @@ ReturnValue_t pst::pstI2c(FixedTimeslotTaskIF *thisSequence) {
ReturnValue_t pst::pstUart(FixedTimeslotTaskIF *thisSequence) { ReturnValue_t pst::pstUart(FixedTimeslotTaskIF *thisSequence) {
// Length of a communication cycle // Length of a communication cycle
uint32_t length = thisSequence->getPeriodMs(); uint32_t length = thisSequence->getPeriodMs();
bool uartPstEmpty = true; static_cast<void>(length);
#if OBSW_ADD_PLOC_MPSOC == 1 #if OBSW_ADD_PLOC_MPSOC == 1
uartPstEmpty = false;
thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0, thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION); DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0.2, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0.4, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0.6, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0.8, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0.8, DeviceHandlerIF::GET_READ);
#endif
thisSequence->addSlot(objects::PLOC_MEMORY_DUMPER, length * 0, thisSequence->addSlot(objects::PLOC_MEMORY_DUMPER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION); DeviceHandlerIF::PERFORM_OPERATION);
#endif
#if OBSW_ADD_PLOC_SUPERVISOR == 1 #if OBSW_ADD_PLOC_SUPERVISOR == 1
thisSequence->addSlot(objects::PLOC_SUPERVISOR_HANDLER, length * 0, thisSequence->addSlot(objects::PLOC_SUPERVISOR_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION); DeviceHandlerIF::PERFORM_OPERATION);
@ -485,7 +483,6 @@ ReturnValue_t pst::pstUart(FixedTimeslotTaskIF *thisSequence) {
#endif #endif
#if OBSW_ADD_SYRLINKS == 1 #if OBSW_ADD_SYRLINKS == 1
uartPstEmpty = false;
thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0, thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION); DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0.2, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0.2, DeviceHandlerIF::SEND_WRITE);
@ -502,15 +499,7 @@ ReturnValue_t pst::pstUart(FixedTimeslotTaskIF *thisSequence) {
thisSequence->addSlot(objects::STAR_TRACKER, length * 0.6, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::STAR_TRACKER, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::STAR_TRACKER, length * 0.8, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::STAR_TRACKER, length * 0.8, DeviceHandlerIF::GET_READ);
#endif #endif
static_cast<void>(length); return thisSequence->checkSequence();
if (uartPstEmpty) {
return returnvalue::OK;
}
if (thisSequence->checkSequence() != returnvalue::OK) {
sif::error << "UART PST initialization failed" << std::endl;
return returnvalue::FAILED;
}
return returnvalue::OK;
} }
ReturnValue_t pst::pstGompaceCan(FixedTimeslotTaskIF *thisSequence) { ReturnValue_t pst::pstGompaceCan(FixedTimeslotTaskIF *thisSequence) {

View File

@ -321,7 +321,8 @@ ReturnValue_t ImtqHandler::scanForReply(const uint8_t* start, size_t remainingSi
break; break;
case (IMTQ::CC::PAST_AVAILABLE_RESPONSE_BYTES): { case (IMTQ::CC::PAST_AVAILABLE_RESPONSE_BYTES): {
sif::warning << "IMTQHandler::scanForReply: Read 0xFF command byte, reading past available " sif::warning << "IMTQHandler::scanForReply: Read 0xFF command byte, reading past available "
"bytes. Keep 1 ms delay between I2C send and read" << std::endl; "bytes. Keep 1 ms delay between I2C send and read"
<< std::endl;
result = IGNORE_REPLY_DATA; result = IGNORE_REPLY_DATA;
break; break;
} }