diff --git a/bsp_q7s/ObjectFactory.cpp b/bsp_q7s/ObjectFactory.cpp index b7222465..ac0c6353 100644 --- a/bsp_q7s/ObjectFactory.cpp +++ b/bsp_q7s/ObjectFactory.cpp @@ -33,9 +33,13 @@ #include #include +#include +#include + #include #include #include +#include #include #include @@ -94,8 +98,6 @@ void ObjectFactory::produce(){ new UartComIF(objects::UART_COM_IF); new SpiComIF(objects::SPI_COM_IF, gpioComIF); - auto gpioIF = new LinuxLibgpioIF(objects::GPIO_IF); - /* Temperature sensors */ Tmp1075Handler* tmp1075Handler_1 = new Tmp1075Handler( objects::TMP1075_HANDLER_1, objects::I2C_COM_IF, @@ -143,30 +145,31 @@ void ObjectFactory::produce(){ (void) acuhandler; GpioCookie* gpioCookieAcsBoard = new GpioCookie(); - GpiodRegular gpioGyro1(std::string("gpiochip5"), 21, std::string("CS_GYRO_1_ADIS"), + GpiodRegular* gpio = nullptr; + gpio = new GpiodRegular(std::string("gpiochip5"), 21, std::string("CS_GYRO_1_ADIS"), gpio::OUT, gpio::HIGH); - gpioCookieAcsBoard->addGpio(gpioIds::GYRO_0_ADIS_CS, gpioGyro1); - GpiodRegular gpioGyro2(std::string("gpiochip5"), 7, std::string("CS_GYRO_2_L3G"), + gpioCookieAcsBoard->addGpio(gpioIds::GYRO_0_ADIS_CS, gpio); + gpio = new GpiodRegular(std::string("gpiochip5"), 7, std::string("CS_GYRO_2_L3G"), gpio::OUT, gpio::HIGH); - gpioCookieAcsBoard->addGpio(gpioIds::GYRO_1_L3G_CS, gpioGyro2); - GpiodRegular gpioGyro3(std::string("gpiochip5"), 3, std::string("CS_GYRO_3_L3G"), + gpioCookieAcsBoard->addGpio(gpioIds::GYRO_1_L3G_CS, gpio); + gpio = new GpiodRegular(std::string("gpiochip5"), 3, std::string("CS_GYRO_3_L3G"), gpio::OUT, gpio::HIGH); - gpioCookieAcsBoard->addGpio(gpioIds::GYRO_2_L3G_CS, gpioGyro3); + gpioCookieAcsBoard->addGpio(gpioIds::GYRO_2_L3G_CS, gpio); - GpiodRegular gpioMgm0(std::string("gpiochip5"), 5, std::string("CS_MGM_0_LIS3_A"), + gpio = new GpiodRegular(std::string("gpiochip5"), 5, std::string("CS_MGM_0_LIS3_A"), gpio::OUT, gpio::HIGH); - gpioCookieAcsBoard->addGpio(gpioIds::MGM_0_LIS3_CS, gpioMgm0); - GpiodRegular gpioMgm1(std::string("gpiochip5"), 17, std::string("CS_MGM_1_RM3100_A"), + gpioCookieAcsBoard->addGpio(gpioIds::MGM_0_LIS3_CS, gpio); + gpio = new GpiodRegular(std::string("gpiochip5"), 17, std::string("CS_MGM_1_RM3100_A"), gpio::OUT, gpio::HIGH); - gpioCookieAcsBoard->addGpio(gpioIds::MGM_1_RM3100_CS, gpioMgm1); - GpiodRegular gpioMgm2(std::string("gpiochip6"), 0, std::string("CS_MGM_2_LIS3_B"), + gpioCookieAcsBoard->addGpio(gpioIds::MGM_1_RM3100_CS, gpio); + gpio = new GpiodRegular(std::string("gpiochip6"), 0, std::string("CS_MGM_2_LIS3_B"), gpio::OUT, gpio::HIGH); - gpioCookieAcsBoard->addGpio(gpioIds::MGM_2_LIS3_CS, gpioMgm2); - GpiodRegular gpioMgm3(std::string("gpiochip5"), 23, std::string("CS_MGM_3_RM3100_B"), + gpioCookieAcsBoard->addGpio(gpioIds::MGM_2_LIS3_CS, gpio); + gpio = new GpiodRegular(std::string("gpiochip5"), 23, std::string("CS_MGM_3_RM3100_B"), gpio::OUT, gpio::HIGH); - gpioCookieAcsBoard->addGpio(gpioIds::MGM_3_RM3100_CS, gpioMgm3); + gpioCookieAcsBoard->addGpio(gpioIds::MGM_3_RM3100_CS, gpio); - gpioIF->addGpios(gpioCookieAcsBoard); + gpioComIF->addGpios(gpioCookieAcsBoard); std::string spiDev = "/dev/spidev2.0"; SpiCookie* spiCookie = new SpiCookie(addresses::MGM_0_LIS3, gpioIds::MGM_0_LIS3_CS, spiDev, @@ -366,7 +369,7 @@ void ObjectFactory::produce(){ Max31865PT1000Handler* rtdIc16 = new Max31865PT1000Handler(objects::RTD_IC16, objects::SPI_COM_IF, spiRtdIc16, 0); Max31865PT1000Handler* rtdIc17 = new Max31865PT1000Handler(objects::RTD_IC17, objects::SPI_COM_IF, spiRtdIc17, 0); Max31865PT1000Handler* rtdIc18 = new Max31865PT1000Handler(objects::RTD_IC18, objects::SPI_COM_IF, spiRtdIc18, 0); - rtdIc10->setStartUpImmediately(); +// rtdIc10->setStartUpImmediately(); // rtdIc4->setStartUpImmediately(); #endif diff --git a/bsp_q7s/gpio/gpioCallbacks.cpp b/bsp_q7s/gpio/gpioCallbacks.cpp index b85de9ab..086e6469 100644 --- a/bsp_q7s/gpio/gpioCallbacks.cpp +++ b/bsp_q7s/gpio/gpioCallbacks.cpp @@ -1,7 +1,8 @@ -#include -#include -#include -#include +#include "gpioCallbacks.h" +#include + +#include +#include #include diff --git a/bsp_q7s/gpio/gpioCallbacks.h b/bsp_q7s/gpio/gpioCallbacks.h index 7654e548..845127fb 100644 --- a/bsp_q7s/gpio/gpioCallbacks.h +++ b/bsp_q7s/gpio/gpioCallbacks.h @@ -1,8 +1,8 @@ #ifndef LINUX_GPIO_GPIOCALLBACKS_H_ #define LINUX_GPIO_GPIOCALLBACKS_H_ -#include -#include +#include +#include namespace gpioCallbacks { diff --git a/fsfw_hal b/fsfw_hal index 7ffae254..c62cdbeb 160000 --- a/fsfw_hal +++ b/fsfw_hal @@ -1 +1 @@ -Subproject commit 7ffae254b1c2658c2b87566a7bb6856236c6e7e8 +Subproject commit c62cdbebcb521975043f1782692667faaf5a8aca diff --git a/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp b/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp index 5f1c8359..ce0b7490 100644 --- a/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp +++ b/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp @@ -182,27 +182,27 @@ ReturnValue_t pst::gomspacePstInit(FixedTimeslotTaskIF *thisSequence){ thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.8, DeviceHandlerIF::GET_READ); - thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0, - DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.2, - DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.4, - DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.6, - DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.8, - DeviceHandlerIF::GET_READ); - - thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0, - DeviceHandlerIF::PERFORM_OPERATION); - thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.2, - DeviceHandlerIF::SEND_WRITE); - thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.4, - DeviceHandlerIF::GET_WRITE); - thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.6, - DeviceHandlerIF::SEND_READ); - thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.8, - DeviceHandlerIF::GET_READ); +// thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0, +// DeviceHandlerIF::PERFORM_OPERATION); +// thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.2, +// DeviceHandlerIF::SEND_WRITE); +// thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.4, +// DeviceHandlerIF::GET_WRITE); +// thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.6, +// DeviceHandlerIF::SEND_READ); +// thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.8, +// DeviceHandlerIF::GET_READ); +// +// thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0, +// DeviceHandlerIF::PERFORM_OPERATION); +// thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.2, +// DeviceHandlerIF::SEND_WRITE); +// thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.4, +// DeviceHandlerIF::GET_WRITE); +// thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.6, +// DeviceHandlerIF::SEND_READ); +// thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.8, +// DeviceHandlerIF::GET_READ); if (thisSequence->checkSequence() != HasReturnvaluesIF::RETURN_OK) { sif::error << "Initialization of GomSpace PST failed" << std::endl; diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt index d6824b0e..7e6d1f35 100644 --- a/linux/CMakeLists.txt +++ b/linux/CMakeLists.txt @@ -1,4 +1,4 @@ add_subdirectory(csp) +add_subdirectory(uart) add_subdirectory(utility) add_subdirectory(boardtest) -