diff --git a/bsp_q7s/core/InitMission.cpp b/bsp_q7s/core/InitMission.cpp index e7d8779b..bc9139fb 100644 --- a/bsp_q7s/core/InitMission.cpp +++ b/bsp_q7s/core/InitMission.cpp @@ -173,9 +173,13 @@ void initmission::createPstTasks(TaskFactory& factory, missedDeadlineFunc); result = pst::pstSpi(spiPst); if (result != HasReturnvaluesIF::RETURN_OK) { - sif::error << "InitMission::initTasks: Creating PST failed!" << std::endl; + if(result != FixedTimeslotTaskIF::SLOT_LIST_EMPTY) { + sif::error << "InitMission::initTasks: Creating PST failed!" << std::endl; + } + } + else { + taskVec.push_back(spiPst); } - taskVec.push_back(spiPst); #endif FixedTimeslotTaskIF* uartPst = factory.createFixedTimeslotTask( diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index 828f6d33..e0cc084d 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -284,43 +284,43 @@ void ObjectFactory::createSunSensorComponents(LinuxLibgpioIF *gpioComIF, SpiComI GpioCookie* gpioCookieSus = new GpioCookie(); GpioCallback* susgpio = nullptr; - susgpio = new GpioCallback("Chip select SUS 1", gpio::OUT, 1, + susgpio = new GpioCallback("Chip select SUS 1", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_1, susgpio); - susgpio = new GpioCallback("Chip select SUS 2", gpio::OUT, 1, + susgpio = new GpioCallback("Chip select SUS 2", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_2, susgpio); - susgpio = new GpioCallback("Chip select SUS 3", gpio::OUT, 1, + susgpio = new GpioCallback("Chip select SUS 3", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_3, susgpio); - susgpio = new GpioCallback("Chip select SUS 4", gpio::OUT, 1, + susgpio = new GpioCallback("Chip select SUS 4", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_4, susgpio); - susgpio = new GpioCallback("Chip select SUS 5", gpio::OUT, 1, + susgpio = new GpioCallback("Chip select SUS 5", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_5, susgpio); - susgpio = new GpioCallback("Chip select SUS 6", gpio::OUT, 1, + susgpio = new GpioCallback("Chip select SUS 6", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_6, susgpio); - susgpio = new GpioCallback("Chip select SUS 7", gpio::OUT, 1, + susgpio = new GpioCallback("Chip select SUS 7", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_7, susgpio); - susgpio = new GpioCallback("Chip select SUS 8", gpio::OUT, 1, + susgpio = new GpioCallback("Chip select SUS 8", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_8, susgpio); - susgpio = new GpioCallback("Chip select SUS 9", gpio::OUT, 1, + susgpio = new GpioCallback("Chip select SUS 9", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_9, susgpio); - susgpio = new GpioCallback("Chip select SUS 10", gpio::OUT, 1, + susgpio = new GpioCallback("Chip select SUS 10", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_10, susgpio); - susgpio = new GpioCallback("Chip select SUS 11", gpio::OUT, 1, + susgpio = new GpioCallback("Chip select SUS 11", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_11, susgpio); - susgpio = new GpioCallback("Chip select SUS 12", gpio::OUT, 1, + susgpio = new GpioCallback("Chip select SUS 12", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_12, susgpio); - susgpio = new GpioCallback("Chip select SUS 13", gpio::OUT, 1, + susgpio = new GpioCallback("Chip select SUS 13", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_13, susgpio); diff --git a/bsp_q7s/gpio/gpioCallbacks.cpp b/bsp_q7s/gpio/gpioCallbacks.cpp index 3787c829..8280b1e9 100644 --- a/bsp_q7s/gpio/gpioCallbacks.cpp +++ b/bsp_q7s/gpio/gpioCallbacks.cpp @@ -53,7 +53,7 @@ void initSpiCsDecoder(GpioIF* gpioComIF) { } } -void spiCsDecoderCallback(gpioId_t gpioId, gpio::GpioOperation gpioOp, int value, +void spiCsDecoderCallback(gpioId_t gpioId, gpio::GpioOperation gpioOp, gpio::Levels value, void* args) { if (gpioComInterface == nullptr) { @@ -67,10 +67,10 @@ void spiCsDecoderCallback(gpioId_t gpioId, gpio::GpioOperation gpioOp, int value return; } - if (value == 1) { + if (value == gpio::HIGH) { disableAllDecoder(); } - else if (value == 0) { + else if (value == gpio::LOW) { switch (gpioId) { case(gpioIds::RTD_IC3): { enableDecoderTcsIc1(); diff --git a/bsp_q7s/gpio/gpioCallbacks.h b/bsp_q7s/gpio/gpioCallbacks.h index eaf9a701..13a51df2 100644 --- a/bsp_q7s/gpio/gpioCallbacks.h +++ b/bsp_q7s/gpio/gpioCallbacks.h @@ -17,7 +17,8 @@ namespace gpioCallbacks { * @brief This function implements the decoding to multiply gpios by using the decoder * chips SN74LVC138APWR on the TCS board and the interface board. */ - void spiCsDecoderCallback(gpioId_t gpioId, gpio::GpioOperation gpioOp, int value, void* args); + void spiCsDecoderCallback(gpioId_t gpioId, gpio::GpioOperation gpioOp, + gpio::Levels value, void* args); /** * @brief This function sets mux bits 1-3 to a state which will only enable the decoder diff --git a/common/config/OBSWVersion.h b/common/config/OBSWVersion.h index 5e9b1b9c..39cb356a 100644 --- a/common/config/OBSWVersion.h +++ b/common/config/OBSWVersion.h @@ -4,7 +4,7 @@ const char* const SW_NAME = "eive"; #define SW_VERSION 1 -#define SW_SUBVERSION 7 +#define SW_SUBVERSION 8 #define SW_REVISION 0 #endif /* COMMON_CONFIG_OBSWVERSION_H_ */ diff --git a/common/config/commonClassIds.h b/common/config/commonClassIds.h index 793cb1ba..5c8e263a 100644 --- a/common/config/commonClassIds.h +++ b/common/config/commonClassIds.h @@ -7,8 +7,6 @@ namespace CLASS_ID { enum commonClassIds: uint8_t { COMMON_CLASS_ID_START = FW_CLASS_ID_COUNT, - MGM_LIS3MDL, //MGMLIS3 - MGM_RM3100, //MGMRM3100 PCDU_HANDLER, //PCDU HEATER_HANDLER, //HEATER SYRLINKS_HANDLER, //SYRLINKS diff --git a/common/config/commonSubsystemIds.h b/common/config/commonSubsystemIds.h index 58ebac66..4cef8774 100644 --- a/common/config/commonSubsystemIds.h +++ b/common/config/commonSubsystemIds.h @@ -6,8 +6,6 @@ namespace SUBSYSTEM_ID { enum: uint8_t { COMMON_SUBSYSTEM_ID_START = FW_SUBSYSTEM_ID_RANGE, - MGM_LIS3MDL = 106, - MGM_RM3100 = 107, PCDU_HANDLER = 108, HEATER_HANDLER = 109, SA_DEPL_HANDLER = 110, diff --git a/fsfw b/fsfw index 16b125ef..a84c770d 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 16b125ef6cdfbe1349e5b21b783cd72c871372a8 +Subproject commit a84c770dfb8447325c263da42d5cecd99b38d1f0 diff --git a/linux/fsfwconfig/FSFWConfig.h.in b/linux/fsfwconfig/FSFWConfig.h.in index 1b8251da..3b87078c 100644 --- a/linux/fsfwconfig/FSFWConfig.h.in +++ b/linux/fsfwconfig/FSFWConfig.h.in @@ -72,7 +72,7 @@ static constexpr size_t FSFW_MAX_TM_PACKET_SIZE = 2048; } -#define FSFW_HAL_LINUX_SPI_WIRETAPPING 0 +#define FSFW_HAL_SPI_WIRETAPPING 0 #define FSFW_DEV_HYPERION_GPS_CREATE_NMEA_CSV 0 #define FSFW_HAL_L3GD20_GYRO_DEBUG 0 diff --git a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp b/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp index 642199da..96950006 100644 --- a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp +++ b/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp @@ -536,9 +536,16 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) { } #endif /* OBSW_ADD_ACS_BOARD == 1 */ - if (thisSequence->checkSequence() != HasReturnvaluesIF::RETURN_OK) { - sif::error << "SPI PST initialization failed" << std::endl; - return HasReturnvaluesIF::RETURN_FAILED; + ReturnValue_t seqCheck = thisSequence->checkSequence(); + if (seqCheck != HasReturnvaluesIF::RETURN_OK) { + if(seqCheck == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) { + sif::warning << "SPI PST is empty.." << std::endl; + } + else { + sif::error << "SPI PST initialization failed" << std::endl; + } + + return seqCheck; } return HasReturnvaluesIF::RETURN_OK; } diff --git a/mission/devices/GyroADIS16507Handler.cpp b/mission/devices/GyroADIS16507Handler.cpp index 02e69eaf..07e0d643 100644 --- a/mission/devices/GyroADIS16507Handler.cpp +++ b/mission/devices/GyroADIS16507Handler.cpp @@ -441,7 +441,7 @@ ReturnValue_t GyroADIS16507Handler::spiSendCallback(SpiComIF *comIf, SpiCookie * utility::handleIoctlError("SpiComIF::sendMessage: ioctl error."); result = SpiComIF::FULL_DUPLEX_TRANSFER_FAILED; } -#if FSFW_HAL_LINUX_SPI_WIRETAPPING == 1 +#if FSFW_HAL_SPI_WIRETAPPING == 1 comIf->performSpiWiretapping(cookie); #endif /* FSFW_LINUX_SPI_WIRETAPPING == 1 */