From 0580784d1697184bbae4fc01f506c7767d869a0c Mon Sep 17 00:00:00 2001 From: "Jakob.Meier" <–meierj@irs.uni-stuttgart.de> Date: Mon, 9 Aug 2021 10:41:28 +0200 Subject: [PATCH 1/4] added mode power down in star tracker --- mission/devices/StarTrackerHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mission/devices/StarTrackerHandler.cpp b/mission/devices/StarTrackerHandler.cpp index 59eab3de..974b3ff3 100644 --- a/mission/devices/StarTrackerHandler.cpp +++ b/mission/devices/StarTrackerHandler.cpp @@ -28,7 +28,7 @@ void StarTrackerHandler::doStartUp() { #else setMode(_MODE_TO_ON); #endif - + setMode(_MODE_POWER_DOWN); } void StarTrackerHandler::doShutDown() { -- 2.43.0 From 8f124de79c44f7959696dd3901a9823f464d231f Mon Sep 17 00:00:00 2001 From: "Jakob.Meier" <–meierj@irs.uni-stuttgart.de> Date: Mon, 9 Aug 2021 14:41:46 +0200 Subject: [PATCH 2/4] set all devices to mode power down in doShutDown --- linux/devices/SusHandler.cpp | 1 + mission/devices/GPSHyperionHandler.cpp | 2 +- mission/devices/GyroADIS16507Handler.cpp | 1 + mission/devices/IMTQHandler.cpp | 2 +- mission/devices/Max31865PT1000Handler.cpp | 2 +- mission/devices/PlocMPSoCHandler.cpp | 2 +- mission/devices/PlocSupervisorHandler.cpp | 2 +- mission/devices/RwHandler.cpp | 1 + mission/devices/StarTrackerHandler.cpp | 2 +- mission/devices/SyrlinksHkHandler.cpp | 2 +- mission/devices/Tmp1075Handler.cpp | 2 +- 11 files changed, 11 insertions(+), 8 deletions(-) diff --git a/linux/devices/SusHandler.cpp b/linux/devices/SusHandler.cpp index c31160c4..dbe58429 100644 --- a/linux/devices/SusHandler.cpp +++ b/linux/devices/SusHandler.cpp @@ -66,6 +66,7 @@ void SusHandler::doStartUp(){ #else setMode(_MODE_TO_ON); #endif + setMode(_MODE_POWER_DOWN); } void SusHandler::doShutDown(){ diff --git a/mission/devices/GPSHyperionHandler.cpp b/mission/devices/GPSHyperionHandler.cpp index 1f68881c..c3b71882 100644 --- a/mission/devices/GPSHyperionHandler.cpp +++ b/mission/devices/GPSHyperionHandler.cpp @@ -32,7 +32,7 @@ void GPSHyperionHandler::doStartUp() { void GPSHyperionHandler::doShutDown() { internalState = InternalStates::NONE; commandExecuted = false; - setMode(MODE_OFF); + setMode(_MODE_POWER_DOWN); } ReturnValue_t GPSHyperionHandler::buildTransitionDeviceCommand(DeviceCommandId_t *id) { diff --git a/mission/devices/GyroADIS16507Handler.cpp b/mission/devices/GyroADIS16507Handler.cpp index ac49a89d..ad20e65b 100644 --- a/mission/devices/GyroADIS16507Handler.cpp +++ b/mission/devices/GyroADIS16507Handler.cpp @@ -57,6 +57,7 @@ void GyroADIS16507Handler::doStartUp() { void GyroADIS16507Handler::doShutDown() { commandExecuted = false; + setMode(_MODE_POWER_DOWN); } ReturnValue_t GyroADIS16507Handler::buildNormalDeviceCommand(DeviceCommandId_t *id) { diff --git a/mission/devices/IMTQHandler.cpp b/mission/devices/IMTQHandler.cpp index bd5ed2d2..c75f7fde 100644 --- a/mission/devices/IMTQHandler.cpp +++ b/mission/devices/IMTQHandler.cpp @@ -27,7 +27,7 @@ void IMTQHandler::doStartUp() { } void IMTQHandler::doShutDown() { - + setMode(_MODE_POWER_DOWN); } ReturnValue_t IMTQHandler::buildNormalDeviceCommand(DeviceCommandId_t * id) { diff --git a/mission/devices/Max31865PT1000Handler.cpp b/mission/devices/Max31865PT1000Handler.cpp index 751d36eb..fad0fc39 100644 --- a/mission/devices/Max31865PT1000Handler.cpp +++ b/mission/devices/Max31865PT1000Handler.cpp @@ -78,7 +78,7 @@ void Max31865PT1000Handler::doStartUp() { void Max31865PT1000Handler::doShutDown() { commandExecuted = false; - setMode(MODE_OFF); + setMode(_MODE_POWER_DOWN); } ReturnValue_t Max31865PT1000Handler::buildNormalDeviceCommand( diff --git a/mission/devices/PlocMPSoCHandler.cpp b/mission/devices/PlocMPSoCHandler.cpp index 0b1fac73..dcc81ef7 100644 --- a/mission/devices/PlocMPSoCHandler.cpp +++ b/mission/devices/PlocMPSoCHandler.cpp @@ -22,7 +22,7 @@ void PlocMPSoCHandler::doStartUp(){ } void PlocMPSoCHandler::doShutDown(){ - + setMode(_MODE_POWER_DOWN); } ReturnValue_t PlocMPSoCHandler::buildNormalDeviceCommand( diff --git a/mission/devices/PlocSupervisorHandler.cpp b/mission/devices/PlocSupervisorHandler.cpp index 778d8925..de50955f 100644 --- a/mission/devices/PlocSupervisorHandler.cpp +++ b/mission/devices/PlocSupervisorHandler.cpp @@ -49,7 +49,7 @@ void PlocSupervisorHandler::doStartUp(){ } void PlocSupervisorHandler::doShutDown(){ - + setMode(_MODE_POWER_DOWN); } ReturnValue_t PlocSupervisorHandler::buildNormalDeviceCommand( diff --git a/mission/devices/RwHandler.cpp b/mission/devices/RwHandler.cpp index 86e09b9e..81bb69ac 100644 --- a/mission/devices/RwHandler.cpp +++ b/mission/devices/RwHandler.cpp @@ -38,6 +38,7 @@ void RwHandler::doShutDown() { if(gpioComIF->pullLow(enableGpio) != RETURN_OK) { sif::debug << "RwHandler::doStartUp: Failed to pull enable gpio to low"; } + setMode(_MODE_POWER_DOWN); } ReturnValue_t RwHandler::buildNormalDeviceCommand(DeviceCommandId_t * id) { diff --git a/mission/devices/StarTrackerHandler.cpp b/mission/devices/StarTrackerHandler.cpp index 974b3ff3..48236cf7 100644 --- a/mission/devices/StarTrackerHandler.cpp +++ b/mission/devices/StarTrackerHandler.cpp @@ -28,10 +28,10 @@ void StarTrackerHandler::doStartUp() { #else setMode(_MODE_TO_ON); #endif - setMode(_MODE_POWER_DOWN); } void StarTrackerHandler::doShutDown() { + setMode(_MODE_POWER_DOWN); } ReturnValue_t StarTrackerHandler::buildNormalDeviceCommand(DeviceCommandId_t * id) { diff --git a/mission/devices/SyrlinksHkHandler.cpp b/mission/devices/SyrlinksHkHandler.cpp index 7900b8e4..e55755e4 100644 --- a/mission/devices/SyrlinksHkHandler.cpp +++ b/mission/devices/SyrlinksHkHandler.cpp @@ -23,7 +23,7 @@ void SyrlinksHkHandler::doStartUp(){ } void SyrlinksHkHandler::doShutDown(){ - + setMode(_MODE_POWER_DOWN); } ReturnValue_t SyrlinksHkHandler::buildNormalDeviceCommand( diff --git a/mission/devices/Tmp1075Handler.cpp b/mission/devices/Tmp1075Handler.cpp index a84f5597..95b8685f 100644 --- a/mission/devices/Tmp1075Handler.cpp +++ b/mission/devices/Tmp1075Handler.cpp @@ -22,7 +22,7 @@ void Tmp1075Handler::doStartUp(){ } void Tmp1075Handler::doShutDown(){ - + setMode(_MODE_POWER_DOWN); } ReturnValue_t Tmp1075Handler::buildNormalDeviceCommand( -- 2.43.0 From 12dbc5569e76f9a1a2444efc68bfdbff9f217f03 Mon Sep 17 00:00:00 2001 From: "Jakob.Meier" <–meierj@irs.uni-stuttgart.de> Date: Mon, 9 Aug 2021 14:44:06 +0200 Subject: [PATCH 3/4] mode power down sus --- linux/devices/SusHandler.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/linux/devices/SusHandler.cpp b/linux/devices/SusHandler.cpp index dbe58429..c31160c4 100644 --- a/linux/devices/SusHandler.cpp +++ b/linux/devices/SusHandler.cpp @@ -66,7 +66,6 @@ void SusHandler::doStartUp(){ #else setMode(_MODE_TO_ON); #endif - setMode(_MODE_POWER_DOWN); } void SusHandler::doShutDown(){ -- 2.43.0 From 4fdcb5d7cd4c2f55ec7a7f8e50fed889be12197e Mon Sep 17 00:00:00 2001 From: "Jakob.Meier" <–meierj@irs.uni-stuttgart.de> Date: Wed, 11 Aug 2021 09:41:29 +0200 Subject: [PATCH 4/4] minor changes to match software to updated fpga design --- bsp_q7s/core/ObjectFactory.cpp | 7 +++---- bsp_q7s/gpio/gpioCallbacks.cpp | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index 73e93dc4..07d61593 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -161,16 +161,15 @@ void ObjectFactory::produce(void* args){ #endif #if OBSW_ADD_STAR_TRACKER == 1 - UartCookie* starTrackerCookie = new UartCookie(objects::START_TRACKER, std::string("/dev/ttyUL3"), + UartCookie* starTrackerCookie = new UartCookie(objects::START_TRACKER, std::string("/dev/ttyUL8"), UartModes::NON_CANONICAL, 115200, StarTracker::MAX_FRAME_SIZE* 2 + 2); starTrackerCookie->setNoFixedSizeReply(); new StarTrackerHandler(objects::START_TRACKER, objects::UART_COM_IF, starTrackerCookie); #endif #if ADD_PLOC_SUPERVISOR == 1 - /* Configuration for MIO0 on TE0720-03-1CFA */ UartCookie* plocSupervisorCookie = new UartCookie(objects::PLOC_SUPERVISOR_HANDLER, - std::string("/dev/ttyUL3"), UartModes::NON_CANONICAL, 115200, + std::string("/dev/ttyUL4"), UartModes::NON_CANONICAL, 115200, PLOC_SPV::MAX_PACKET_SIZE * 20); plocSupervisorCookie->setNoFixedSizeReply(); PlocSupervisorHandler* plocSupervisor = new PlocSupervisorHandler( @@ -520,7 +519,7 @@ void ObjectFactory::createSolarArrayDeploymentComponents() { void ObjectFactory::createSyrlinksComponents() { UartCookie* syrlinksUartCookie = new UartCookie(objects::SYRLINKS_HK_HANDLER, - std::string("/dev/ttyUL0"), UartModes::NON_CANONICAL, 38400, SYRLINKS::MAX_REPLY_SIZE); + std::string("/dev/ttyUL5"), UartModes::NON_CANONICAL, 38400, SYRLINKS::MAX_REPLY_SIZE); syrlinksUartCookie->setParityEven(); new SyrlinksHkHandler(objects::SYRLINKS_HK_HANDLER, objects::UART_COM_IF, syrlinksUartCookie); diff --git a/bsp_q7s/gpio/gpioCallbacks.cpp b/bsp_q7s/gpio/gpioCallbacks.cpp index 5499517b..34c927ed 100644 --- a/bsp_q7s/gpio/gpioCallbacks.cpp +++ b/bsp_q7s/gpio/gpioCallbacks.cpp @@ -42,7 +42,7 @@ void initSpiCsDecoder(GpioIF* gpioComIF) { GpiodRegular* spiMuxBit5 = new GpiodRegular(std::string("gpiochip7"), 17, std::string("SPI Mux Bit 5"), gpio::OUT, 0); spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_5, spiMuxBit5); - GpiodRegular* spiMuxBit6 = new GpiodRegular(std::string("gpiochip7"), 18, + GpiodRegular* spiMuxBit6 = new GpiodRegular(std::string("gpiochip7"), 9, std::string("SPI Mux Bit 6"), gpio::OUT, 0); spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_6, spiMuxBit6); GpiodRegular* enRwDecoder = new GpiodRegular(std::string("gpiochip5"), 17, -- 2.43.0