diff --git a/bsp_q7s/core/CoreController.cpp b/bsp_q7s/core/CoreController.cpp index 00c7f248..66399763 100644 --- a/bsp_q7s/core/CoreController.cpp +++ b/bsp_q7s/core/CoreController.cpp @@ -156,20 +156,12 @@ ReturnValue_t CoreController::initialize() { if (result != returnvalue::OK) { sif::warning << "CoreController::initialize: Base init failed" << std::endl; } - result = scratch::writeNumber(scratch::ALLOC_FAILURE_COUNT, 0); - if (result != returnvalue::OK) { - sif::warning << "CoreController::initialize: Setting up alloc failure " - "count failed" - << std::endl; - } result = paramHelper.initialize(); if (result != returnvalue::OK) { return result; } - sdStateMachine(); - EventManagerIF *eventManager = ObjectManager::instance()->get(objects::EVENT_MANAGER); if (eventManager == nullptr or eventQueue == nullptr) { @@ -189,7 +181,16 @@ ReturnValue_t CoreController::initialize() { triggerEvent(core::REBOOT_SW, CURRENT_CHIP, CURRENT_COPY); announceCurrentImageInfo(); announceVersionInfo(); - + SdCardManager::SdStatePair sdStates; + sdcMan->getSdCardsStatus(sdStates); + triggerEvent(core::ACTIVE_SD_INFO, sdStates.first, sdStates.second); + sdStateMachine(); + result = scratch::writeNumber(scratch::ALLOC_FAILURE_COUNT, 0); + if (result != returnvalue::OK) { + sif::warning << "CoreController::initialize: Setting up alloc failure " + "count failed" + << std::endl; + } return result; } diff --git a/mission/sysDefs.h b/mission/sysDefs.h index 9750f3fd..294e1a8b 100644 --- a/mission/sysDefs.h +++ b/mission/sysDefs.h @@ -125,6 +125,9 @@ static constexpr Event PDEC_REBOOT = event::makeEvent(SUBSYSTEM_ID, 12, severity //! P1: Byte 0: Major, Byte 1: Minor, Byte 2: Patch, Byte 3: Has Git Hash //! P2: First four letters of Git SHA is the last byte of P1 is set. static constexpr Event FIRMWARE_INFO = event::makeEvent(SUBSYSTEM_ID, 13, severity::INFO); +//! [EXPORT] : [COMMENT] Active SD card info. 0: OFF, 1: ON, 2: MOUNTED. +//! P1: SD Card 0m P2: SD Card 2. +static constexpr Event ACTIVE_SD_INFO = event::makeEvent(SUBSYSTEM_ID, 14, severity::INFO); class ListDirectoryCmdBase { public: // TODO: Packet definition for clean deserialization diff --git a/tmtc b/tmtc index 0b8bd61e..83e8fe05 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 0b8bd61e8015d7145462ecbf9db5f302bc234b41 +Subproject commit 83e8fe058730e88a90f5482cf53929d4c0b37e73