From f9581f3100a2e2827edee08fcbdf6979c45cf7df Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Fri, 10 Dec 2021 10:07:23 +0100 Subject: [PATCH] command to reset error signal --- .../startracker/StarTrackerDefinitions.h | 3 ++ .../startracker/StarTrackerHandler.cpp | 42 +++++++++++++-- .../devices/startracker/StarTrackerHandler.h | 7 ++- .../devices/startracker/StrImageLoader.cpp | 51 +++++++++++++++++-- bsp_q7s/devices/startracker/StrImageLoader.h | 49 +++++++++++------- generators/bsp_q7s_events.csv | 14 ++--- generators/events/translateEvents.cpp | 30 ++++++----- linux/fsfwconfig/events/translateEvents.cpp | 30 ++++++----- thirdparty/arcsec_star_tracker | 2 +- 9 files changed, 169 insertions(+), 59 deletions(-) diff --git a/bsp_q7s/devices/startracker/StarTrackerDefinitions.h b/bsp_q7s/devices/startracker/StarTrackerDefinitions.h index e74d8a51..f854d2ee 100644 --- a/bsp_q7s/devices/startracker/StarTrackerDefinitions.h +++ b/bsp_q7s/devices/startracker/StarTrackerDefinitions.h @@ -117,6 +117,8 @@ static const DeviceCommandId_t READ = 51; static const DeviceCommandId_t WRITE = 52; static const DeviceCommandId_t DOWNLOAD_MATCHED_STAR = 53; static const DeviceCommandId_t DOWNLOAD_DB_IMAGE = 54; +static const DeviceCommandId_t STOP_IMAGE_LOADER = 55; +static const DeviceCommandId_t RESET_ERROR = 56; static const DeviceCommandId_t NONE = 0xFFFFFFFF; static const uint32_t VERSION_SET_ID = REQ_VERSION; @@ -165,6 +167,7 @@ namespace ID { static const uint8_t ERASE = 5; static const uint8_t UNLOCK = 6; static const uint8_t TAKE_IMAGE = 15; + static const uint8_t ERROR_RESET = 12; } /** diff --git a/bsp_q7s/devices/startracker/StarTrackerHandler.cpp b/bsp_q7s/devices/startracker/StarTrackerHandler.cpp index 9244b967..c7687e1c 100644 --- a/bsp_q7s/devices/startracker/StarTrackerHandler.cpp +++ b/bsp_q7s/devices/startracker/StarTrackerHandler.cpp @@ -49,7 +49,9 @@ ReturnValue_t StarTrackerHandler::initialize() { if (result != RETURN_OK) { return result; } - result = manager->subscribeToAllEventsFrom(eventQueue->getId(), objects::STR_IMG_LOADER); + result = manager->subscribeToEventRange(eventQueue->getId(), + event::getEventId(StrImageLoader::IMAGE_UPLOAD_FAILED), + event::getEventId(StrImageLoader::IMAGE_DOWNLOAD_SUCCESSFUL)); if (result != RETURN_OK) { #if FSFW_CPP_OSTREAM_ENABLED == 1 sif::warning << "StarTrackerHandler::initialize: Failed to subscribe to events form image" @@ -58,7 +60,10 @@ ReturnValue_t StarTrackerHandler::initialize() { return ObjectManagerIF::CHILD_INIT_FAILED; } - strImageLoader->setComIF(communicationInterface); + result = strImageLoader->setComIF(communicationInterface); + if (result != RETURN_OK) { + return ObjectManagerIF::CHILD_INIT_FAILED; + } strImageLoader->setComCookie(comCookie); return RETURN_OK; } @@ -68,6 +73,11 @@ ReturnValue_t StarTrackerHandler::executeAction(ActionId_t actionId, MessageQueu ReturnValue_t result = RETURN_OK; + if (actionId == StarTracker::STOP_IMAGE_LOADER) { + strImageLoader->stopProcess(); + return EXECUTION_FINISHED; + } + if (imageLoaderExecuting == true) { return IMAGE_LOADER_EXECUTING; } @@ -176,7 +186,7 @@ ReturnValue_t StarTrackerHandler::buildCommandFromCommand(DeviceCommandId_t devi return RETURN_OK; } case (StarTracker::TAKE_IMAGE): { - prepareTakeImageCommand(); + prepareTakeImageCommand(commandData); return RETURN_OK; } case (StarTracker::SUBSCRIBE_TO_TM): { @@ -191,6 +201,10 @@ ReturnValue_t StarTrackerHandler::buildCommandFromCommand(DeviceCommandId_t devi prepareTemperatureRequest(); return RETURN_OK; } + case (StarTracker::RESET_ERROR): { + prepareErrorResetRequest(); + return RETURN_OK; + } case (StarTracker::LIMITS): { Limits limits; result = prepareParamCommand(commandData, commandDataLen, limits); @@ -294,6 +308,8 @@ void StarTrackerHandler::fillCommandAndReplyMap() { StarTracker::MAX_FRAME_SIZE * 2 + 2); this->insertInCommandAndReplyMap(StarTracker::TAKE_IMAGE, 3, nullptr, StarTracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(StarTracker::RESET_ERROR, 3, nullptr, + StarTracker::MAX_FRAME_SIZE * 2 + 2); } ReturnValue_t StarTrackerHandler::scanForReply(const uint8_t *start, size_t remainingSize, @@ -366,6 +382,10 @@ ReturnValue_t StarTrackerHandler::interpretDeviceReply(DeviceCommandId_t id, con result = handleActionReply(); break; } + case (StarTracker::RESET_ERROR): { + result = handleActionReply(); + break; + } case (StarTracker::TAKE_IMAGE): { result = handleActionReply(); break; @@ -535,6 +555,10 @@ ReturnValue_t StarTrackerHandler::scanForActionReply(DeviceCommandId_t *foundId) *foundId = StarTracker::UPLOAD_IMAGE; break; } + case (StarTracker::ID::ERROR_RESET): { + *foundId = StarTracker::RESET_ERROR; + break; + } default: sif::warning << "StarTrackerHandler::scanForParameterReply: Unknown parameter reply id" << std::endl; @@ -710,9 +734,10 @@ void StarTrackerHandler::prepareRebootCommand() { rawPacketLen = dataLinkLayer.getEncodedLength(); } -void StarTrackerHandler::prepareTakeImageCommand() { +void StarTrackerHandler::prepareTakeImageCommand(const uint8_t* commandData) { uint32_t length = 0; struct CameraActionRequest camReq; + camReq.actionid = *commandData; arc_pack_camera_action_req(&camReq, commandBuffer, &length); dataLinkLayer.encodeFrame(commandBuffer, length); rawPacket = dataLinkLayer.getEncodedFrame(); @@ -761,6 +786,15 @@ void StarTrackerHandler::prepareTemperatureRequest() { rawPacketLen = dataLinkLayer.getEncodedLength(); } +void StarTrackerHandler::prepareErrorResetRequest() { + uint32_t length = 0; + struct ResetErrorSignalActionRequest req; + arc_pack_reseterrorsignal_action_req(&req, commandBuffer, &length); + dataLinkLayer.encodeFrame(commandBuffer, length); + rawPacket = dataLinkLayer.getEncodedFrame(); + rawPacketLen = dataLinkLayer.getEncodedLength(); +} + ReturnValue_t StarTrackerHandler::prepareParamCommand(const uint8_t* commandData, size_t commandDataLen, ArcsecJsonParamBase& paramSet) { ReturnValue_t result = RETURN_OK; diff --git a/bsp_q7s/devices/startracker/StarTrackerHandler.h b/bsp_q7s/devices/startracker/StarTrackerHandler.h index 5c7de4fa..d5bb7136 100644 --- a/bsp_q7s/devices/startracker/StarTrackerHandler.h +++ b/bsp_q7s/devices/startracker/StarTrackerHandler.h @@ -186,7 +186,7 @@ private: /** * @brief Fills the command buffer with the command to take an image. */ - void prepareTakeImageCommand(); + void prepareTakeImageCommand(const uint8_t* commandData); /** * @brief Fills command buffer with data to request the version telemetry packet @@ -226,6 +226,11 @@ private: */ void prepareTemperatureRequest(); + /** + * @brief Fills command buffer with command to reset the error signal of the star tracker + */ + void prepareErrorResetRequest(); + /** * @brief Reads parameters from json file specified by string in commandData and * prepares the command to apply the parameter set to the star tracker diff --git a/bsp_q7s/devices/startracker/StrImageLoader.cpp b/bsp_q7s/devices/startracker/StrImageLoader.cpp index 998d3f1c..1b1c37d2 100644 --- a/bsp_q7s/devices/startracker/StrImageLoader.cpp +++ b/bsp_q7s/devices/startracker/StrImageLoader.cpp @@ -33,6 +33,9 @@ ReturnValue_t StrImageLoader::performOperation(uint8_t operationCode) { if (result == RETURN_OK){ triggerEvent(IMAGE_UPLOAD_SUCCESSFUL); } + else { + triggerEvent(IMAGE_UPLOAD_FAILED); + } internalState = InternalState::IDLE; break; } @@ -41,14 +44,22 @@ ReturnValue_t StrImageLoader::performOperation(uint8_t operationCode) { if (result == RETURN_OK){ triggerEvent(IMAGE_DOWNLOAD_SUCCESSFUL); } + else { + triggerEvent(IMAGE_DOWNLOAD_FAILED); + } internalState = InternalState::IDLE; break; } } } -void StrImageLoader::setComIF(DeviceCommunicationIF* communicationInterface_) { - communicationInterface = communicationInterface_; +ReturnValue_t StrImageLoader::setComIF(DeviceCommunicationIF* communicationInterface_) { + uartComIF = dynamic_cast(communicationInterface_); + if (uartComIF == nullptr) { + sif::warning << "StrImageLoader::initialize: Invalid uart com if" << std::endl; + return RETURN_FAILED; + } + return RETURN_OK; } void StrImageLoader::setComCookie(CookieIF* comCookie_) { @@ -76,40 +87,67 @@ ReturnValue_t StrImageLoader::startImageUpload(std::string image) { } internalState = InternalState::UPLOAD_IMAGE; semaphore.release(); + terminate = false; return RETURN_OK; } void StrImageLoader::startImageDownload(std::string downloadImage_) { downloadImage = downloadImage_; internalState = InternalState::DOWNLOAD_IMAGE; + terminate = false; semaphore.release(); } +void StrImageLoader::stopProcess() { + terminate = true; +} + ReturnValue_t StrImageLoader::performImageDownload() { ReturnValue_t result; struct DownloadActionRequest downloadReq; uint32_t size = 0; + uint32_t retries = 0; std::ofstream file(downloadImage, std::ios_base::app | std::ios_base::out); + downloadReq.position = 0; while(downloadReq.position < LAST_POSITION) { + if (terminate) { + return RETURN_OK; + } arc_pack_download_action_req(&downloadReq, commandBuffer, &size); result = sendAndRead(size, downloadReq.position); if (result != RETURN_OK) { + if (retries < CONFIG_MAX_DOWNLOAD_RETRIES) { + uartComIF->flushUartRxBuffer(comCookie); + retries++; + continue; + } file.close(); return result; } result = checkReply(); if (result != RETURN_OK) { + if (retries < CONFIG_MAX_DOWNLOAD_RETRIES) { + uartComIF->flushUartRxBuffer(comCookie); + retries++; + continue; + } file.close(); return result; } result = checkReplyPosition(downloadReq.position); if (result != RETURN_OK) { + if (retries < CONFIG_MAX_DOWNLOAD_RETRIES) { + uartComIF->flushUartRxBuffer(comCookie); + retries++; + continue; + } file.close(); return result; } file.write(reinterpret_cast(datalinkLayer.getReply() + DATA_OFFSET), IMAGE_DATA_SIZE); downloadReq.position++; + retries = 0; } file.close(); return RETURN_OK; @@ -133,6 +171,9 @@ ReturnValue_t StrImageLoader::performImageUpload() { // tellg returns position of character in input stream imageSize = file.tellg(); while((uploadReq.position + 1) * SIZE_IMAGE_PART < imageSize) { + if (terminate) { + return RETURN_OK; + } file.seekg(uploadReq.position * SIZE_IMAGE_PART, file.beg); file.read(reinterpret_cast(uploadReq.data), SIZE_IMAGE_PART); arc_pack_upload_action_req(&uploadReq, commandBuffer, &size); @@ -172,7 +213,7 @@ ReturnValue_t StrImageLoader::sendAndRead(size_t size, uint32_t position) { size_t bytesLeft = 0; uint32_t missedReplies = 0; datalinkLayer.encodeFrame(commandBuffer, size); - result = communicationInterface->sendMessage(comCookie, datalinkLayer.getEncodedFrame(), + result = uartComIF->sendMessage(comCookie, datalinkLayer.getEncodedFrame(), datalinkLayer.getEncodedLength()); if (result != RETURN_OK) { sif::warning << "StrImageLoader::sendAndRead: Failed to send packet" << std::endl; @@ -181,14 +222,14 @@ ReturnValue_t StrImageLoader::sendAndRead(size_t size, uint32_t position) { } decResult = ArcsecDatalinkLayer::DEC_IN_PROGRESS; while (decResult == ArcsecDatalinkLayer::DEC_IN_PROGRESS) { - result = communicationInterface->requestReceiveMessage(comCookie, + result = uartComIF->requestReceiveMessage(comCookie, StarTracker::MAX_FRAME_SIZE * 2 + 2); if (result != RETURN_OK) { sif::warning << "StrImageLoader::sendAndRead: Failed to request reply" << std::endl; triggerEvent(IMG_LOADER_REQUESTING_MSG_FAILED, result, position); return RETURN_FAILED; } - result = communicationInterface->readReceivedMessage(comCookie, &receivedData, &receivedDataLen); + result = uartComIF->readReceivedMessage(comCookie, &receivedData, &receivedDataLen); if (result != RETURN_OK) { sif::warning << "StrImageLoader::sendAndRead: Failed to read received message" << std::endl; triggerEvent(IMG_LOADER_READING_REPLY_FAILED, result, position); diff --git a/bsp_q7s/devices/startracker/StrImageLoader.h b/bsp_q7s/devices/startracker/StrImageLoader.h index 2f486658..48a47df8 100644 --- a/bsp_q7s/devices/startracker/StrImageLoader.h +++ b/bsp_q7s/devices/startracker/StrImageLoader.h @@ -8,7 +8,7 @@ #include "fsfw/returnvalues/HasReturnvaluesIF.h" #include "fsfw/objectmanager/SystemObject.h" #include "fsfw/tasks/ExecutableObjectIF.h" -#include "fsfw/devicehandlers/DeviceCommunicationIF.h" +#include "fsfw_hal/linux/uart/UartComIF.h" #include "fsfw/devicehandlers/CookieIF.h" extern "C" { @@ -27,18 +27,14 @@ public: static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::STR_IMAGE_LOADER; - //! [EXPORT] : [COMMENT] Try to upload image but specified image does not exist - static const Event IMAGE_FILE_NOT_EXISTS = MAKE_EVENT(0, severity::LOW); - //! [EXPORT] : [COMMENT] Sending packet (download or upload) to star tracker failed - //!P1: Return code of communication interface sendMessage function - //!P2: Position of upload/download packet for which the transmission failed - static const Event IMG_LOADER_SENDING_PACKET_FAILED = MAKE_EVENT(1, severity::LOW); - //! [EXPORT] : [COMMENT] Communication interface requesting reply failed - //!P1: Return code of failed request - //!P1: Upload/download position for which the request failed - static const Event IMG_LOADER_REQUESTING_MSG_FAILED = MAKE_EVENT(2, severity::LOW); + //! [EXPORT] : [COMMENT] Image upload failed + static const Event IMAGE_UPLOAD_FAILED = MAKE_EVENT(0, severity::LOW); + //! [EXPORT] : [COMMENT] Image download failed + static const Event IMAGE_DOWNLOAD_FAILED = MAKE_EVENT(1, severity::LOW); //! [EXPORT] : [COMMENT] Uploading image to star tracker was successful - static const Event IMAGE_UPLOAD_SUCCESSFUL = MAKE_EVENT(3, severity::LOW); + static const Event IMAGE_UPLOAD_SUCCESSFUL = MAKE_EVENT(2, severity::LOW); + //! [EXPORT] : [COMMENT] Image download was successful + static const Event IMAGE_DOWNLOAD_SUCCESSFUL = MAKE_EVENT(3, severity::LOW); //! [EXPORT] : [COMMENT] Failed to read communication interface reply data //!P1: Return code of failed communication interface read call //!P1: Upload/download position for which the read call failed @@ -58,11 +54,20 @@ public: //P1: Return value of decoding function //P2: Position of upload/download packet for which reply decoding failed static const Event IMG_LOADER_DEC_ERROR = MAKE_EVENT(9, severity::LOW); - //! [EXPORT] : [COMMENT] Image download was successful - static const Event IMAGE_DOWNLOAD_SUCCESSFUL = MAKE_EVENT(10, severity::LOW); //! [EXPORT] : [COMMENT] Position mismatch //! P1: The expected position and thus the position for which the image upload/download failed - static const Event POSITION_MISMATCH = MAKE_EVENT(11, severity::LOW); + static const Event POSITION_MISMATCH = MAKE_EVENT(10, severity::LOW); + //! [EXPORT] : [COMMENT] Try to upload image but specified image does not exist + static const Event IMAGE_FILE_NOT_EXISTS = MAKE_EVENT(11, severity::LOW); + //! [EXPORT] : [COMMENT] Sending packet (download or upload) to star tracker failed + //!P1: Return code of communication interface sendMessage function + //!P2: Position of upload/download packet for which the transmission failed + static const Event IMG_LOADER_SENDING_PACKET_FAILED = MAKE_EVENT(12, severity::LOW); + //! [EXPORT] : [COMMENT] Communication interface requesting reply failed + //!P1: Return code of failed request + //!P1: Upload/download position for which the request failed + static const Event IMG_LOADER_REQUESTING_MSG_FAILED = MAKE_EVENT(13, severity::LOW); + StrImageLoader(object_id_t objectId); @@ -71,7 +76,7 @@ public: ReturnValue_t initialize() override; ReturnValue_t performOperation(uint8_t operationCode = 0) override; - void setComIF(DeviceCommunicationIF* communicationInterface_); + ReturnValue_t setComIF(DeviceCommunicationIF* communicationInterface_); void setComCookie(CookieIF* comCookie_); /** @@ -87,6 +92,11 @@ public: */ void startImageDownload(std::string downloadImage_); + /** + * @brief Can be used to interrupt a running upload or download process. + */ + void stopProcess(); + private: static const uint8_t INTERFACE_ID = CLASS_ID::STR_IMG_LOADER; @@ -106,6 +116,7 @@ private: static const uint8_t POS_OFFSET = 2; static const uint8_t DATA_OFFSET = 5; static const size_t IMAGE_DATA_SIZE = 1024; + static const size_t CONFIG_MAX_DOWNLOAD_RETRIES = 3; enum class InternalState { IDLE, @@ -128,11 +139,13 @@ private: uint8_t commandBuffer[StarTracker::MAX_FRAME_SIZE]; + bool terminate = false; + /** - * Communication object responsible for low level access of star tracker + * UART communication object responsible for low level access of star tracker * Must be set by star tracker handler */ - DeviceCommunicationIF * communicationInterface = nullptr; + UartComIF* uartComIF = nullptr; // Communication cookie. Must be set by the star tracker handler CookieIF* comCookie = nullptr; diff --git a/generators/bsp_q7s_events.csv b/generators/bsp_q7s_events.csv index 0153c3e6..30956754 100644 --- a/generators/bsp_q7s_events.csv +++ b/generators/bsp_q7s_events.csv @@ -118,15 +118,17 @@ 11902;INVALID_FAR;HIGH;Read invalid FAR from PDEC after startup;C:\Users\jakob\OneDrive\Work\EIVE\Q7S\Software\eive_obsw/linux/obc/PdecHandler.h 11903;CARRIER_LOCK;INFO;Carrier lock detected;C:\Users\jakob\OneDrive\Work\EIVE\Q7S\Software\eive_obsw/linux/obc/PdecHandler.h 11904;BIT_LOCK_PDEC;INFO;Bit lock detected (data valid);C:\Users\jakob\OneDrive\Work\EIVE\Q7S\Software\eive_obsw/linux/obc/PdecHandler.h -12000;IMAGE_FILE_NOT_EXISTS;LOW;Try to upload image but specified image does not exist;C:\Users\jakob\OneDrive\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/startracker/StrImageLoader.h -12001;IMG_LOADER_SENDING_PACKET_FAILED;LOW;;C:\Users\jakob\OneDrive\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/startracker/StrImageLoader.h -12002;IMG_LOADER_REQUESTING_MSG_FAILED;LOW;;C:\Users\jakob\OneDrive\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/startracker/StrImageLoader.h -12003;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successful;C:\Users\jakob\OneDrive\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/startracker/StrImageLoader.h +12000;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;C:\Users\jakob\OneDrive\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/startracker/StrImageLoader.h +12001;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;C:\Users\jakob\OneDrive\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/startracker/StrImageLoader.h +12002;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successful;C:\Users\jakob\OneDrive\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/startracker/StrImageLoader.h +12003;IMAGE_DOWNLOAD_SUCCESSFUL;LOW;Image download was successful;C:\Users\jakob\OneDrive\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/startracker/StrImageLoader.h 12004;IMG_LOADER_READING_REPLY_FAILED;LOW;;C:\Users\jakob\OneDrive\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/startracker/StrImageLoader.h 12005;IMG_LOADER_COM_ERROR;LOW;;C:\Users\jakob\OneDrive\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/startracker/StrImageLoader.h 12006;IMG_LOADER_NO_REPLY;LOW;Star tracker did not send replies (maybe device is powered off)P1: Position of upload or download packet for which no reply was sent;C:\Users\jakob\OneDrive\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/startracker/StrImageLoader.h 12007;INVALID_TYPE_ID;LOW;Received reply with invalid type ID;C:\Users\jakob\OneDrive\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/startracker/StrImageLoader.h 12008;STATUS_ERROR;LOW;Status field in reply signals error;C:\Users\jakob\OneDrive\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/startracker/StrImageLoader.h 12009;IMG_LOADER_DEC_ERROR;LOW;;C:\Users\jakob\OneDrive\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/startracker/StrImageLoader.h -12010;IMAGE_DOWNLOAD_SUCCESSFUL;LOW;Image download was successful;C:\Users\jakob\OneDrive\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/startracker/StrImageLoader.h -12011;POSITION_MISMATCH;LOW;Position mismatch P1: The expected position and thus the position for which the image upload/download failed;C:\Users\jakob\OneDrive\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/startracker/StrImageLoader.h +12010;POSITION_MISMATCH;LOW;Position mismatch P1: The expected position and thus the position for which the image upload/download failed;C:\Users\jakob\OneDrive\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/startracker/StrImageLoader.h +12011;IMAGE_FILE_NOT_EXISTS;LOW;Try to upload image but specified image does not exist;C:\Users\jakob\OneDrive\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/startracker/StrImageLoader.h +12012;IMG_LOADER_SENDING_PACKET_FAILED;LOW;;C:\Users\jakob\OneDrive\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/startracker/StrImageLoader.h +12013;IMG_LOADER_REQUESTING_MSG_FAILED;LOW;;C:\Users\jakob\OneDrive\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/startracker/StrImageLoader.h diff --git a/generators/events/translateEvents.cpp b/generators/events/translateEvents.cpp index 35f4ad9b..e44c407d 100644 --- a/generators/events/translateEvents.cpp +++ b/generators/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** - * @brief Auto-generated event translation file. Contains 132 translations. + * @brief Auto-generated event translation file. Contains 134 translations. * @details - * Generated on: 2021-12-09 11:10:38 + * Generated on: 2021-12-09 16:40:42 */ #include "translateEvents.h" @@ -125,18 +125,20 @@ const char *INVALID_TC_FRAME_STRING = "INVALID_TC_FRAME"; const char *INVALID_FAR_STRING = "INVALID_FAR"; const char *CARRIER_LOCK_STRING = "CARRIER_LOCK"; const char *BIT_LOCK_PDEC_STRING = "BIT_LOCK_PDEC"; -const char *IMAGE_FILE_NOT_EXISTS_STRING = "IMAGE_FILE_NOT_EXISTS"; -const char *IMG_LOADER_SENDING_PACKET_FAILED_STRING = "IMG_LOADER_SENDING_PACKET_FAILED"; -const char *IMG_LOADER_REQUESTING_MSG_FAILED_STRING = "IMG_LOADER_REQUESTING_MSG_FAILED"; +const char *IMAGE_UPLOAD_FAILED_STRING = "IMAGE_UPLOAD_FAILED"; +const char *IMAGE_DOWNLOAD_FAILED_STRING = "IMAGE_DOWNLOAD_FAILED"; const char *IMAGE_UPLOAD_SUCCESSFUL_STRING = "IMAGE_UPLOAD_SUCCESSFUL"; +const char *IMAGE_DOWNLOAD_SUCCESSFUL_STRING = "IMAGE_DOWNLOAD_SUCCESSFUL"; const char *IMG_LOADER_READING_REPLY_FAILED_STRING = "IMG_LOADER_READING_REPLY_FAILED"; const char *IMG_LOADER_COM_ERROR_STRING = "IMG_LOADER_COM_ERROR"; const char *IMG_LOADER_NO_REPLY_STRING = "IMG_LOADER_NO_REPLY"; const char *INVALID_TYPE_ID_STRING = "INVALID_TYPE_ID"; const char *STATUS_ERROR_STRING = "STATUS_ERROR"; const char *IMG_LOADER_DEC_ERROR_STRING = "IMG_LOADER_DEC_ERROR"; -const char *IMAGE_DOWNLOAD_SUCCESSFUL_STRING = "IMAGE_DOWNLOAD_SUCCESSFUL"; const char *POSITION_MISMATCH_STRING = "POSITION_MISMATCH"; +const char *IMAGE_FILE_NOT_EXISTS_STRING = "IMAGE_FILE_NOT_EXISTS"; +const char *IMG_LOADER_SENDING_PACKET_FAILED_STRING = "IMG_LOADER_SENDING_PACKET_FAILED"; +const char *IMG_LOADER_REQUESTING_MSG_FAILED_STRING = "IMG_LOADER_REQUESTING_MSG_FAILED"; const char * translateEvents(Event event) { switch( (event & 0xffff) ) { @@ -381,13 +383,13 @@ const char * translateEvents(Event event) { case(11904): return BIT_LOCK_PDEC_STRING; case(12000): - return IMAGE_FILE_NOT_EXISTS_STRING; + return IMAGE_UPLOAD_FAILED_STRING; case(12001): - return IMG_LOADER_SENDING_PACKET_FAILED_STRING; + return IMAGE_DOWNLOAD_FAILED_STRING; case(12002): - return IMG_LOADER_REQUESTING_MSG_FAILED_STRING; - case(12003): return IMAGE_UPLOAD_SUCCESSFUL_STRING; + case(12003): + return IMAGE_DOWNLOAD_SUCCESSFUL_STRING; case(12004): return IMG_LOADER_READING_REPLY_FAILED_STRING; case(12005): @@ -401,9 +403,13 @@ const char * translateEvents(Event event) { case(12009): return IMG_LOADER_DEC_ERROR_STRING; case(12010): - return IMAGE_DOWNLOAD_SUCCESSFUL_STRING; - case(12011): return POSITION_MISMATCH_STRING; + case(12011): + return IMAGE_FILE_NOT_EXISTS_STRING; + case(12012): + return IMG_LOADER_SENDING_PACKET_FAILED_STRING; + case(12013): + return IMG_LOADER_REQUESTING_MSG_FAILED_STRING; default: return "UNKNOWN_EVENT"; } diff --git a/linux/fsfwconfig/events/translateEvents.cpp b/linux/fsfwconfig/events/translateEvents.cpp index 35f4ad9b..e44c407d 100644 --- a/linux/fsfwconfig/events/translateEvents.cpp +++ b/linux/fsfwconfig/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** - * @brief Auto-generated event translation file. Contains 132 translations. + * @brief Auto-generated event translation file. Contains 134 translations. * @details - * Generated on: 2021-12-09 11:10:38 + * Generated on: 2021-12-09 16:40:42 */ #include "translateEvents.h" @@ -125,18 +125,20 @@ const char *INVALID_TC_FRAME_STRING = "INVALID_TC_FRAME"; const char *INVALID_FAR_STRING = "INVALID_FAR"; const char *CARRIER_LOCK_STRING = "CARRIER_LOCK"; const char *BIT_LOCK_PDEC_STRING = "BIT_LOCK_PDEC"; -const char *IMAGE_FILE_NOT_EXISTS_STRING = "IMAGE_FILE_NOT_EXISTS"; -const char *IMG_LOADER_SENDING_PACKET_FAILED_STRING = "IMG_LOADER_SENDING_PACKET_FAILED"; -const char *IMG_LOADER_REQUESTING_MSG_FAILED_STRING = "IMG_LOADER_REQUESTING_MSG_FAILED"; +const char *IMAGE_UPLOAD_FAILED_STRING = "IMAGE_UPLOAD_FAILED"; +const char *IMAGE_DOWNLOAD_FAILED_STRING = "IMAGE_DOWNLOAD_FAILED"; const char *IMAGE_UPLOAD_SUCCESSFUL_STRING = "IMAGE_UPLOAD_SUCCESSFUL"; +const char *IMAGE_DOWNLOAD_SUCCESSFUL_STRING = "IMAGE_DOWNLOAD_SUCCESSFUL"; const char *IMG_LOADER_READING_REPLY_FAILED_STRING = "IMG_LOADER_READING_REPLY_FAILED"; const char *IMG_LOADER_COM_ERROR_STRING = "IMG_LOADER_COM_ERROR"; const char *IMG_LOADER_NO_REPLY_STRING = "IMG_LOADER_NO_REPLY"; const char *INVALID_TYPE_ID_STRING = "INVALID_TYPE_ID"; const char *STATUS_ERROR_STRING = "STATUS_ERROR"; const char *IMG_LOADER_DEC_ERROR_STRING = "IMG_LOADER_DEC_ERROR"; -const char *IMAGE_DOWNLOAD_SUCCESSFUL_STRING = "IMAGE_DOWNLOAD_SUCCESSFUL"; const char *POSITION_MISMATCH_STRING = "POSITION_MISMATCH"; +const char *IMAGE_FILE_NOT_EXISTS_STRING = "IMAGE_FILE_NOT_EXISTS"; +const char *IMG_LOADER_SENDING_PACKET_FAILED_STRING = "IMG_LOADER_SENDING_PACKET_FAILED"; +const char *IMG_LOADER_REQUESTING_MSG_FAILED_STRING = "IMG_LOADER_REQUESTING_MSG_FAILED"; const char * translateEvents(Event event) { switch( (event & 0xffff) ) { @@ -381,13 +383,13 @@ const char * translateEvents(Event event) { case(11904): return BIT_LOCK_PDEC_STRING; case(12000): - return IMAGE_FILE_NOT_EXISTS_STRING; + return IMAGE_UPLOAD_FAILED_STRING; case(12001): - return IMG_LOADER_SENDING_PACKET_FAILED_STRING; + return IMAGE_DOWNLOAD_FAILED_STRING; case(12002): - return IMG_LOADER_REQUESTING_MSG_FAILED_STRING; - case(12003): return IMAGE_UPLOAD_SUCCESSFUL_STRING; + case(12003): + return IMAGE_DOWNLOAD_SUCCESSFUL_STRING; case(12004): return IMG_LOADER_READING_REPLY_FAILED_STRING; case(12005): @@ -401,9 +403,13 @@ const char * translateEvents(Event event) { case(12009): return IMG_LOADER_DEC_ERROR_STRING; case(12010): - return IMAGE_DOWNLOAD_SUCCESSFUL_STRING; - case(12011): return POSITION_MISMATCH_STRING; + case(12011): + return IMAGE_FILE_NOT_EXISTS_STRING; + case(12012): + return IMG_LOADER_SENDING_PACKET_FAILED_STRING; + case(12013): + return IMG_LOADER_REQUESTING_MSG_FAILED_STRING; default: return "UNKNOWN_EVENT"; } diff --git a/thirdparty/arcsec_star_tracker b/thirdparty/arcsec_star_tracker index 2d10c6b8..cdd25c4f 160000 --- a/thirdparty/arcsec_star_tracker +++ b/thirdparty/arcsec_star_tracker @@ -1 +1 @@ -Subproject commit 2d10c6b85ea4cab4f4baf1918c51d54eee4202c2 +Subproject commit cdd25c4fc7b963cebb58ade213a8546c2d435242