From 397e1433fd59b88c53b9fa86dea471db24c88484 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 23 Sep 2021 17:14:08 +0200 Subject: [PATCH] GPS and RW handler improvements --- fsfw | 2 +- mission/devices/GPSHyperionHandler.cpp | 10 ++++++---- mission/devices/GPSHyperionHandler.h | 1 + mission/devices/RwHandler.cpp | 1 + 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/fsfw b/fsfw index dccc2f0b..e1a85b47 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit dccc2f0ba77184933e3d551d95950a5b0801d2f2 +Subproject commit e1a85b47c5018590e58b9b1130b1754b0079450f diff --git a/mission/devices/GPSHyperionHandler.cpp b/mission/devices/GPSHyperionHandler.cpp index 26b86a76..8944d17a 100644 --- a/mission/devices/GPSHyperionHandler.cpp +++ b/mission/devices/GPSHyperionHandler.cpp @@ -60,10 +60,8 @@ ReturnValue_t GPSHyperionHandler::buildCommandFromCommand( PoolReadGuard pg(&gpsSet); // Set HK entries invalid gpsSet.setValidity(false, true); - // The user needs to implement this. Don't touch states for now, the device should - // quickly reboot and send valid strings again. - actionHelper.finish(true, getCommanderQueueId(deviceCommand), deviceCommand); - return resetCallback(resetCallbackArgs); + resetCallback(resetCallbackArgs); + return HasActionsIF::EXECUTION_FINISHED; } return DeviceHandlerIF::COMMAND_NOT_IMPLEMENTED; } @@ -210,3 +208,7 @@ ReturnValue_t GPSHyperionHandler::initialize() { // Enable reply immediately for now return updatePeriodicReply(true, GpsHyperion::GPS_REPLY); } + +ReturnValue_t GPSHyperionHandler::acceptExternalDeviceCommands() { + return DeviceHandlerBase::acceptExternalDeviceCommands(); +} diff --git a/mission/devices/GPSHyperionHandler.h b/mission/devices/GPSHyperionHandler.h index 13591b44..e7c925be 100644 --- a/mission/devices/GPSHyperionHandler.h +++ b/mission/devices/GPSHyperionHandler.h @@ -22,6 +22,7 @@ public: using gpioResetFunction_t = ReturnValue_t (*) (void* args); void setResetPinTriggerFunction(gpioResetFunction_t resetCallback, void*args); + ReturnValue_t acceptExternalDeviceCommands() override; ReturnValue_t initialize() override; protected: diff --git a/mission/devices/RwHandler.cpp b/mission/devices/RwHandler.cpp index 792e530d..91188d87 100644 --- a/mission/devices/RwHandler.cpp +++ b/mission/devices/RwHandler.cpp @@ -184,6 +184,7 @@ ReturnValue_t RwHandler::scanForReply(const uint8_t *start, size_t remainingSize default: { sif::warning << "RwHandler::scanForReply: Reply contains invalid command code" << std::endl; + *foundLen = remainingSize; return RETURN_FAILED; } }