From 8ecf7dda9e505287094fea4a30bb7ce025ed00b4 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 28 Feb 2022 23:46:49 +0100 Subject: [PATCH] fix for RPi config --- linux/boardtest/SpiTestClass.cpp | 28 +++++++++---------- linux/devices/CMakeLists.txt | 4 --- linux/devices/GPSHyperionLinuxController.h | 2 +- linux/fsfwconfig/OBSWConfig.h.in | 1 + linux/fsfwconfig/events/translateEvents.cpp | 2 +- .../pollingSequenceFactory.cpp | 5 ++-- mission/system/AcsBoardAssembly.h | 4 --- mission/system/AcsSubsystem.h | 4 --- mission/system/ComSubsystem.cpp | 2 -- mission/system/ComSubsystem.h | 4 --- mission/system/EiveSystem.cpp | 1 - mission/system/EiveSystem.h | 4 --- mission/system/PayloadSubsystem.cpp | 1 - mission/system/PayloadSubsystem.h | 4 --- mission/system/TcsSubsystem.h | 4 --- 15 files changed, 20 insertions(+), 50 deletions(-) diff --git a/linux/boardtest/SpiTestClass.cpp b/linux/boardtest/SpiTestClass.cpp index d673e283..00ab4322 100644 --- a/linux/boardtest/SpiTestClass.cpp +++ b/linux/boardtest/SpiTestClass.cpp @@ -644,32 +644,32 @@ void SpiTestClass::acsInit() { #ifdef RASPBERRY_PI GpiodRegularByChip *gpio = nullptr; std::string rpiGpioName = "gpiochip0"; - gpio = new GpiodRegularByChip(rpiGpioName, mgm0Lis3mdlChipSelect, "MGM_0_LIS3", gpio::DIR_OUT, - gpio::HIGH); + gpio = new GpiodRegularByChip(rpiGpioName, mgm0Lis3mdlChipSelect, "MGM_0_LIS3", Direction::OUT, + Levels::HIGH); gpioCookie->addGpio(gpioIds::MGM_0_LIS3_CS, gpio); - gpio = new GpiodRegularByChip(rpiGpioName, mgm1Rm3100ChipSelect, "MGM_1_RM3100", gpio::DIR_OUT, - gpio::HIGH); + gpio = new GpiodRegularByChip(rpiGpioName, mgm1Rm3100ChipSelect, "MGM_1_RM3100", Direction::OUT, + Levels::HIGH); gpioCookie->addGpio(gpioIds::MGM_1_RM3100_CS, gpio); - gpio = new GpiodRegularByChip(rpiGpioName, gyro0AdisChipSelect, "GYRO_0_ADIS", gpio::DIR_OUT, - gpio::HIGH); + gpio = new GpiodRegularByChip(rpiGpioName, gyro0AdisChipSelect, "GYRO_0_ADIS", Direction::OUT, + Levels::HIGH); gpioCookie->addGpio(gpioIds::GYRO_0_ADIS_CS, gpio); - gpio = new GpiodRegularByChip(rpiGpioName, gyro1L3gd20ChipSelect, "GYRO_1_L3G", gpio::DIR_OUT, - gpio::HIGH); + gpio = new GpiodRegularByChip(rpiGpioName, gyro1L3gd20ChipSelect, "GYRO_1_L3G", Direction::OUT, + Levels::HIGH); gpioCookie->addGpio(gpioIds::GYRO_1_L3G_CS, gpio); - gpio = new GpiodRegularByChip(rpiGpioName, gyro3L3gd20ChipSelect, "GYRO_2_L3G", gpio::DIR_OUT, - gpio::HIGH); + gpio = new GpiodRegularByChip(rpiGpioName, gyro3L3gd20ChipSelect, "GYRO_2_L3G", Direction::OUT, + Levels::HIGH); gpioCookie->addGpio(gpioIds::GYRO_3_L3G_CS, gpio); - gpio = new GpiodRegularByChip(rpiGpioName, mgm2Lis3mdlChipSelect, "MGM_2_LIS3", gpio::DIR_OUT, - gpio::HIGH); + gpio = new GpiodRegularByChip(rpiGpioName, mgm2Lis3mdlChipSelect, "MGM_2_LIS3", Direction::OUT, + Levels::HIGH); gpioCookie->addGpio(gpioIds::MGM_2_LIS3_CS, gpio); - gpio = new GpiodRegularByChip(rpiGpioName, mgm3Rm3100ChipSelect, "MGM_3_RM3100", gpio::DIR_OUT, - gpio::HIGH); + gpio = new GpiodRegularByChip(rpiGpioName, mgm3Rm3100ChipSelect, "MGM_3_RM3100", Direction::OUT, + Levels::HIGH); gpioCookie->addGpio(gpioIds::MGM_3_RM3100_CS, gpio); #elif defined(XIPHOS_Q7S) GpiodRegularByLineName *gpio = nullptr; diff --git a/linux/devices/CMakeLists.txt b/linux/devices/CMakeLists.txt index 6baf161c..ad3b2b3d 100644 --- a/linux/devices/CMakeLists.txt +++ b/linux/devices/CMakeLists.txt @@ -1,7 +1,3 @@ -target_sources(${OBSW_NAME} PRIVATE - GPSHyperionLinuxController.cpp -) - if(EIVE_BUILD_GPSD_GPS_HANDLER) target_sources(${OBSW_NAME} PRIVATE GPSHyperionLinuxController.cpp diff --git a/linux/devices/GPSHyperionLinuxController.h b/linux/devices/GPSHyperionLinuxController.h index 5e9793a8..3615cebd 100644 --- a/linux/devices/GPSHyperionLinuxController.h +++ b/linux/devices/GPSHyperionLinuxController.h @@ -2,9 +2,9 @@ #define MISSION_DEVICES_GPSHYPERIONHANDLER_H_ #include "fsfw/FSFW.h" -#include "mission/devices/devicedefinitions/GPSDefinitions.h" #include "fsfw/controller/ExtendedControllerBase.h" #include "fsfw/devicehandlers/DeviceHandlerBase.h" +#include "mission/devices/devicedefinitions/GPSDefinitions.h" #ifdef FSFW_OSAL_LINUX #include diff --git a/linux/fsfwconfig/OBSWConfig.h.in b/linux/fsfwconfig/OBSWConfig.h.in index 75334d45..805d077f 100644 --- a/linux/fsfwconfig/OBSWConfig.h.in +++ b/linux/fsfwconfig/OBSWConfig.h.in @@ -132,6 +132,7 @@ debugging. */ /*******************************************************************/ // Leave at one as the BSP is linux. Used by the ADIS1650X device handler #define OBSW_ADIS1650X_LINUX_COM_IF 1 +#cmakedefine EIVE_BUILD_GPSD_GPS_HANDLER #include "OBSWVersion.h" diff --git a/linux/fsfwconfig/events/translateEvents.cpp b/linux/fsfwconfig/events/translateEvents.cpp index 8b5b974e..4c46d0ca 100644 --- a/linux/fsfwconfig/events/translateEvents.cpp +++ b/linux/fsfwconfig/events/translateEvents.cpp @@ -160,7 +160,7 @@ const char *U_HPA_OUT_OF_BOUNDS_STRING = "U_HPA_OUT_OF_BOUNDS"; const char *I_HPA_OUT_OF_BOUNDS_STRING = "I_HPA_OUT_OF_BOUNDS"; const char *translateEvents(Event event) { - switch((event & 0xFFFF)) { + switch ((event & 0xFFFF)) { case (2200): return STORE_SEND_WRITE_FAILED_STRING; case (2201): diff --git a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp b/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp index e35a77b3..a29913f5 100644 --- a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp +++ b/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp @@ -1,12 +1,13 @@ #include "pollingSequenceFactory.h" -#include "OBSWConfig.h" -#include "objects/systemObjectList.h" #include #include #include #include +#include "OBSWConfig.h" +#include "objects/systemObjectList.h" + ReturnValue_t pst::pstGpio(FixedTimeslotTaskIF *thisSequence) { // Length of a communication cycle uint32_t length = thisSequence->getPeriodMs(); diff --git a/mission/system/AcsBoardAssembly.h b/mission/system/AcsBoardAssembly.h index a41257d6..8adc2baf 100644 --- a/mission/system/AcsBoardAssembly.h +++ b/mission/system/AcsBoardAssembly.h @@ -1,8 +1,4 @@ #ifndef MISSION_SYSTEM_ACSBOARDASSEMBLY_H_ #define MISSION_SYSTEM_ACSBOARDASSEMBLY_H_ - - - - #endif /* MISSION_SYSTEM_ACSBOARDASSEMBLY_H_ */ diff --git a/mission/system/AcsSubsystem.h b/mission/system/AcsSubsystem.h index be2b094c..39d1fca9 100644 --- a/mission/system/AcsSubsystem.h +++ b/mission/system/AcsSubsystem.h @@ -1,8 +1,4 @@ #ifndef MISSION_SYSTEM_ACSSUBSYSTEM_H_ #define MISSION_SYSTEM_ACSSUBSYSTEM_H_ - - - - #endif /* MISSION_SYSTEM_ACSSUBSYSTEM_H_ */ diff --git a/mission/system/ComSubsystem.cpp b/mission/system/ComSubsystem.cpp index b4349567..fe91daff 100644 --- a/mission/system/ComSubsystem.cpp +++ b/mission/system/ComSubsystem.cpp @@ -1,3 +1 @@ #include "ComSubsystem.h" - - diff --git a/mission/system/ComSubsystem.h b/mission/system/ComSubsystem.h index bb00aaf2..a850c228 100644 --- a/mission/system/ComSubsystem.h +++ b/mission/system/ComSubsystem.h @@ -1,8 +1,4 @@ #ifndef MISSION_SYSTEM_COMSUBSYSTEM_H_ #define MISSION_SYSTEM_COMSUBSYSTEM_H_ - - - - #endif /* MISSION_SYSTEM_COMSUBSYSTEM_H_ */ diff --git a/mission/system/EiveSystem.cpp b/mission/system/EiveSystem.cpp index 5ec47f86..1fcd9b0f 100644 --- a/mission/system/EiveSystem.cpp +++ b/mission/system/EiveSystem.cpp @@ -1,2 +1 @@ #include "EiveSystem.h" - diff --git a/mission/system/EiveSystem.h b/mission/system/EiveSystem.h index 39c35f52..d4957787 100644 --- a/mission/system/EiveSystem.h +++ b/mission/system/EiveSystem.h @@ -1,8 +1,4 @@ #ifndef MISSION_SYSTEM_EIVESYSTEM_H_ #define MISSION_SYSTEM_EIVESYSTEM_H_ - - - - #endif /* MISSION_SYSTEM_EIVESYSTEM_H_ */ diff --git a/mission/system/PayloadSubsystem.cpp b/mission/system/PayloadSubsystem.cpp index 0b0d354a..a1f277e9 100644 --- a/mission/system/PayloadSubsystem.cpp +++ b/mission/system/PayloadSubsystem.cpp @@ -1,2 +1 @@ #include "PayloadSubsystem.h" - diff --git a/mission/system/PayloadSubsystem.h b/mission/system/PayloadSubsystem.h index 79f5cc8b..6725c02f 100644 --- a/mission/system/PayloadSubsystem.h +++ b/mission/system/PayloadSubsystem.h @@ -1,8 +1,4 @@ #ifndef MISSION_SYSTEM_PAYLOADSUBSYSTEM_H_ #define MISSION_SYSTEM_PAYLOADSUBSYSTEM_H_ - - - - #endif /* MISSION_SYSTEM_PAYLOADSUBSYSTEM_H_ */ diff --git a/mission/system/TcsSubsystem.h b/mission/system/TcsSubsystem.h index 536fedce..51be6b2f 100644 --- a/mission/system/TcsSubsystem.h +++ b/mission/system/TcsSubsystem.h @@ -1,8 +1,4 @@ #ifndef MISSION_SYSTEM_TCSSUBSYSTEM_H_ #define MISSION_SYSTEM_TCSSUBSYSTEM_H_ - - - - #endif /* MISSION_SYSTEM_TCSSUBSYSTEM_H_ */