add p60 boot count broadcast
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Robin Müller 2022-04-07 13:11:20 +02:00
parent d570b5c460
commit 0e7cd7de6f
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
2 changed files with 7 additions and 2 deletions

View File

@ -111,6 +111,9 @@ void P60DockHandler::parseHkTableReply(const uint8_t *packet) {
dataOffset += 6;
coreHk.bootCount = *(packet + dataOffset) << 24 | *(packet + dataOffset + 1) << 16 |
*(packet + dataOffset + 2) << 8 | *(packet + dataOffset + 3);
if(firstHk) {
triggerEvent(P60_BOOT_COUNT, coreHk.bootCount.value);
}
dataOffset += 6;
auxHk.uptime = *(packet + dataOffset) << 24 | *(packet + dataOffset + 1) << 16 |
*(packet + dataOffset + 2) << 8 | *(packet + dataOffset + 3);

View File

@ -14,10 +14,12 @@ class P60DockHandler : public GomspaceDeviceHandler {
public:
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::P60_DOCK_HANDLER;
//! [EXPORT] : [COMMENT] P60 boot count is broadcasted once at SW startup. P1: Boot count
static constexpr Event P60_BOOT_COUNT = event::makeEvent(SUBSYSTEM_ID, 0, severity::INFO);
//! [EXPORT] : [COMMENT] Battery mode is broadcasted at startup. P1: Mode
static constexpr Event BATT_MODE = event::makeEvent(SUBSYSTEM_ID, 0, severity::INFO);
static constexpr Event BATT_MODE = event::makeEvent(SUBSYSTEM_ID, 1, severity::INFO);
//! [EXPORT] : [COMMENT] Battery mode has changed. P1: Old mode. P2: New mode
static constexpr Event BATT_MODE_CHANGED = event::makeEvent(SUBSYSTEM_ID, 1, severity::MEDIUM);
static constexpr Event BATT_MODE_CHANGED = event::makeEvent(SUBSYSTEM_ID, 2, severity::MEDIUM);
P60DockHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie);
virtual ~P60DockHandler();