From b4d1046928e80556046baef4502df8ed7c533212 Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Sat, 5 Feb 2022 15:39:16 +0100 Subject: [PATCH] obsw configuration running on egse --- bsp_egse/InitMission.cpp | 2 +- linux/devices/startracker/StarTrackerHandler.h | 5 ++++- linux/devices/startracker/StrHelper.h | 2 +- linux/fsfwconfig/OBSWConfig.h.in | 11 ++++++++++- .../pollingsequence/pollingSequenceFactory.cpp | 4 +++- scripts/egse-port.sh | 4 ++-- 6 files changed, 21 insertions(+), 7 deletions(-) diff --git a/bsp_egse/InitMission.cpp b/bsp_egse/InitMission.cpp index fcf3c98e..96e18917 100644 --- a/bsp_egse/InitMission.cpp +++ b/bsp_egse/InitMission.cpp @@ -82,7 +82,7 @@ void initmission::initTasks() { std::vector pstTasks; FixedTimeslotTaskIF* pst = factory->createFixedTimeslotTask( - "STAR_TRACKER_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 3.0, missedDeadlineFunc); + "STAR_TRACKER_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.5, missedDeadlineFunc); result = pst::pstUart(pst); if (result != HasReturnvaluesIF::RETURN_OK) { sif::error << "InitMission::initTasks: Creating PST failed!" << std::endl; diff --git a/linux/devices/startracker/StarTrackerHandler.h b/linux/devices/startracker/StarTrackerHandler.h index dc820067..cd760040 100644 --- a/linux/devices/startracker/StarTrackerHandler.h +++ b/linux/devices/startracker/StarTrackerHandler.h @@ -268,8 +268,11 @@ class StarTrackerHandler : public DeviceHandlerBase { // Countdown to insert delay for star tracker to switch from bootloader to firmware program Countdown bootCountdown; - +#ifdef EGSE std::string paramJsonFile = "/mnt/sd0/startracker/full.json"; +#else + std::string paramJsonFile = "/home/pi/arcsec/flight-config.json"; +#endif enum class InternalState { TEMPERATURE_REQUEST }; diff --git a/linux/devices/startracker/StrHelper.h b/linux/devices/startracker/StrHelper.h index 1f8a4882..db65d0ce 100644 --- a/linux/devices/startracker/StrHelper.h +++ b/linux/devices/startracker/StrHelper.h @@ -122,7 +122,7 @@ class StrHelper : public SystemObject, public ExecutableObjectIF, public HasRetu * * @param path Path where file with read flash data will be created * @param region Region ID of flash region to read from - * @param address Start address of flash section to read + * @param address Start address of flash section to read * @param length Number of bytes to read from flash */ ReturnValue_t startFlashRead(std::string path, uint8_t region, uint32_t address, uint32_t length); diff --git a/linux/fsfwconfig/OBSWConfig.h.in b/linux/fsfwconfig/OBSWConfig.h.in index 15952fa4..d6d98181 100644 --- a/linux/fsfwconfig/OBSWConfig.h.in +++ b/linux/fsfwconfig/OBSWConfig.h.in @@ -58,6 +58,10 @@ debugging. */ #endif +#if defined EGSE +#define OBSW_ADD_STAR_TRACKER 1 +#endif + /*******************************************************************/ /** All of the following flags should be disabled for mission code */ /*******************************************************************/ @@ -92,11 +96,16 @@ debugging. */ #define OBSW_DEBUG_SUS 0 #define OBSW_DEBUG_RTD 0 #define OBSW_DEBUG_RW 0 -#define OBSW_DEBUG_STARTRACKER 0 #define OBSW_DEBUG_PLOC_MPSOC 0 #define OBSW_DEBUG_PLOC_SUPERVISOR 0 #define OBSW_DEBUG_PDEC_HANDLER 0 +#if defined EGSE +#define OBSW_DEBUG_STARTRACKER 1 +#else +#define OBSW_DEBUG_STARTRACKER 0 +#endif + #ifdef RASPBERRY_PI #define OBSW_ENABLE_TIMERS 1 diff --git a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp b/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp index 3caf7341..b2f2b27d 100644 --- a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp +++ b/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp @@ -549,9 +549,11 @@ ReturnValue_t pst::pstUart(FixedTimeslotTaskIF *thisSequence) { thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0.8, DeviceHandlerIF::GET_READ); #endif +#ifdef XIPHOS_Q7S thisSequence->addSlot(objects::PLOC_UPDATER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); thisSequence->addSlot(objects::PLOC_MEMORY_DUMPER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); +#endif #if OBSW_ADD_PLOC_SUPERVISOR == 1 thisSequence->addSlot(objects::PLOC_SUPERVISOR_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION); @@ -580,7 +582,7 @@ ReturnValue_t pst::pstUart(FixedTimeslotTaskIF *thisSequence) { thisSequence->addSlot(objects::STAR_TRACKER, length * 0.6, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::STAR_TRACKER, length * 0.8, DeviceHandlerIF::GET_READ); #endif - + static_cast(length); if (uartPstEmpty) { return HasReturnvaluesIF::RETURN_OK; } diff --git a/scripts/egse-port.sh b/scripts/egse-port.sh index c390cc63..ef4864fc 100644 --- a/scripts/egse-port.sh +++ b/scripts/egse-port.sh @@ -2,5 +2,5 @@ echo "-L 1534:localhost:1534 portforwarding for tcf agent" echo "-L 1537:192.168.133.10:7301 for TMTC commanding using the TCP/IP IF" -ssh -L 1534:localhost:1534 pi@192.168.18.31 -ssh -L 1537:localhost:7301 pi@192.168.18.31 \ No newline at end of file +ssh -L 1534:localhost:1534 \ + -L 1537:localhost:7301 pi@192.168.18.31 \ No newline at end of file