diff --git a/bsp_q7s/callbacks/pcduSwitchCb.cpp b/bsp_q7s/callbacks/pcduSwitchCb.cpp index ec5f4dc5..f9b6c761 100644 --- a/bsp_q7s/callbacks/pcduSwitchCb.cpp +++ b/bsp_q7s/callbacks/pcduSwitchCb.cpp @@ -10,8 +10,8 @@ void pcdu::switchCallback(GOMSPACE::Pdu pdu, uint8_t channel, bool state, void* return; } if (pdu == GOMSPACE::Pdu::PDU1) { - PDU1::SwitchChannels typedChannel = static_cast(channel); - if (typedChannel == PDU1::SwitchChannels::ACS_A_SIDE) { + PDU1::Channels typedChannel = static_cast(channel); + if (typedChannel == PDU1::Channels::ACS_A_SIDE) { if (state) { gpioComIF->pullHigh(gpioIds::GNSS_0_NRESET); } else { @@ -20,8 +20,8 @@ void pcdu::switchCallback(GOMSPACE::Pdu pdu, uint8_t channel, bool state, void* } } else if (pdu == GOMSPACE::Pdu::PDU2) { - PDU2::SwitchChannels typedChannel = static_cast(channel); - if (typedChannel == PDU2::SwitchChannels::ACS_B_SIDE) { + PDU2::Channels typedChannel = static_cast(channel); + if (typedChannel == PDU2::Channels::ACS_B_SIDE) { if (state) { gpioComIF->pullHigh(gpioIds::GNSS_1_NRESET); } else { diff --git a/common/config/devices/powerSwitcherList.h b/common/config/devices/powerSwitcherList.h index 1981bb9c..d032428b 100644 --- a/common/config/devices/powerSwitcherList.h +++ b/common/config/devices/powerSwitcherList.h @@ -1,72 +1,6 @@ #ifndef FSFWCONFIG_DEVICES_POWERSWITCHERLIST_H_ #define FSFWCONFIG_DEVICES_POWERSWITCHERLIST_H_ -#include "OBSWConfig.h" - -#include - -#include -#include - -namespace pcduSwitches { - -/* Switches are uint8_t datatype and go from 0 to 255 */ -enum Switches: power::Switch_t { - PDU1_CH0_TCS_BOARD_3V3, - PDU1_CH1_SYRLINKS_12V, - PDU1_CH2_STAR_TRACKER_5V, - PDU1_CH3_MGT_5V, - PDU1_CH4_SUS_NOMINAL_3V3, - PDU1_CH5_SOLAR_CELL_EXP_5V, - PDU1_CH6_PLOC_12V, - PDU1_CH7_ACS_A_SIDE_3V3, - PDU1_CH8_UNOCCUPIED, - - PDU2_CH0_Q7S, - PDU2_CH1_PL_PCDU_BATT_0_14V8, - PDU2_CH2_RW_5V, - PDU2_CH3_TCS_BOARD_HEATER_IN_8V, - PDU2_CH4_SUS_REDUNDANT_3V3, - PDU2_CH5_DEPLOYMENT_MECHANISM_8V, - PDU2_CH6_PL_PCDU_BATT_1_14V8, - PDU2_CH7_ACS_BOARD_SIDE_B_3V3, - PDU2_CH8_PAYLOAD_CAMERA, - NUMBER_OF_SWITCHES -}; - -static const uint8_t ON = 1; -static const uint8_t OFF = 0; - -// Output states after reboot of the PDUs - -const std::array INIT_SWITCH_STATES = { - // PDU 1 -// Because the TE0720 is not connected to the PCDU, this switch is always on -#ifdef TE0720_1CFA - ON, -#else - OFF, -#endif - OFF, - OFF, - OFF, - OFF, - OFF, - OFF, - OFF, - OFF, - - // PDU 2 - ON, - OFF, - OFF, - OFF, - OFF, - OFF, - OFF, - OFF, - OFF -}; -} +#include "mission/devices/devicedefinitions/GomspaceDefinitions.h" #endif /* FSFWCONFIG_DEVICES_POWERSWITCHERLIST_H_ */ diff --git a/generators/fsfwgen b/generators/fsfwgen index 5ad9fb94..9a92c7de 160000 --- a/generators/fsfwgen +++ b/generators/fsfwgen @@ -1 +1 @@ -Subproject commit 5ad9fb94af3312d29863527106396395f7b808a5 +Subproject commit 9a92c7de0a2fedfcc638c0517e3edea123e977f8 diff --git a/linux/ObjectFactory.cpp b/linux/ObjectFactory.cpp index 267b5f4d..7811fdbe 100644 --- a/linux/ObjectFactory.cpp +++ b/linux/ObjectFactory.cpp @@ -280,7 +280,7 @@ void ObjectFactory::createRtdComponents(std::string spiDev, GpioIF* gpioComIF, TcsBoardHelper helper(rtdIds); TcsBoardAssembly* tcsBoardAss = new TcsBoardAssembly(objects::TCS_BOARD_ASS, objects::NO_OBJECT, pwrSwitcher, - pcduSwitches::Switches::PDU1_CH0_TCS_BOARD_3V3, helper); + pcdu::Switches::PDU1_CH0_TCS_BOARD_3V3, helper); static_cast(tcsBoardAss); #endif // OBSW_ADD_RTD_DEVICES == 1 } diff --git a/linux/boardtest/SpiTestClass.cpp b/linux/boardtest/SpiTestClass.cpp index ff721967..d9eb6b5a 100644 --- a/linux/boardtest/SpiTestClass.cpp +++ b/linux/boardtest/SpiTestClass.cpp @@ -408,7 +408,7 @@ void SpiTestClass::max1227RadSensorTest(int fd) { transfer(fd, gpioIds::CS_RAD_SENSOR); usleep(65); spiTransferStruct[0].len = 24; - std::memcpy(sendBuffer.data(), sendBuffer.data() + 1, 24); + std::memmove(sendBuffer.data(), sendBuffer.data() + 1, 24); transfer(fd, gpioIds::CS_RAD_SENSOR); int16_t tempRaw = ((recvBuffer[22] & 0x0f) << 8) | recvBuffer[23]; float temp = max1227::getTemperature(tempRaw); diff --git a/linux/csp/CspComIF.cpp b/linux/csp/CspComIF.cpp index fa372d4d..9f346405 100644 --- a/linux/csp/CspComIF.cpp +++ b/linux/csp/CspComIF.cpp @@ -141,11 +141,12 @@ ReturnValue_t CspComIF::cspTransfer(uint8_t cspAddress, uint8_t cspPort, const u int cmdLen, uint16_t querySize) { uint32_t timeout_ms = 1000; uint16_t bytesRead = 0; - int32_t expectedSize = (int32_t)querySize; + int32_t expectedSize = static_cast(querySize); vectorBufferIter iter = cspDeviceMap.find(cspAddress); if (iter == cspDeviceMap.end()) { sif::error << "CSP device with address " << cspAddress << " no found in" << " device map" << std::endl; + return RETURN_FAILED; } uint8_t* replyBuffer = iter->second.data(); diff --git a/linux/devices/GPSHyperionLinuxController.cpp b/linux/devices/GPSHyperionLinuxController.cpp index d1ef7d1b..20860211 100644 --- a/linux/devices/GPSHyperionLinuxController.cpp +++ b/linux/devices/GPSHyperionLinuxController.cpp @@ -3,7 +3,6 @@ #include "OBSWConfig.h" #include "fsfw/datapool/PoolReadGuard.h" #include "fsfw/timemanager/Clock.h" - #include "linux/utility/utility.h" #include "mission/utility/compileTime.h" diff --git a/misc/eclipse/.cproject b/misc/eclipse/.cproject index aa59f2da..6e4535c1 100644 --- a/misc/eclipse/.cproject +++ b/misc/eclipse/.cproject @@ -756,6 +756,7 @@ + @@ -818,8 +819,8 @@