diff --git a/mission/devices/RwHandler.cpp b/mission/devices/RwHandler.cpp index f5b27ad8..86e09b9e 100644 --- a/mission/devices/RwHandler.cpp +++ b/mission/devices/RwHandler.cpp @@ -263,6 +263,8 @@ ReturnValue_t RwHandler::initializeLocalDataPool(localpool::DataPool& localDataP localDataPoolMap.emplace(RwDefinitions::TM_LAST_RESET_STATUS, new PoolEntry( { 0 })); localDataPoolMap.emplace(RwDefinitions::TM_MCU_TEMPERATURE, new PoolEntry( { 0 })); + localDataPoolMap.emplace(RwDefinitions::PRESSURE_SENSOR_TEMPERATURE, new PoolEntry( { 0 })); + localDataPoolMap.emplace(RwDefinitions::PRESSURE, new PoolEntry( { 0 })); localDataPoolMap.emplace(RwDefinitions::TM_RW_STATE, new PoolEntry( { 0 })); localDataPoolMap.emplace(RwDefinitions::TM_CLC_MODE, new PoolEntry( { 0 })); localDataPoolMap.emplace(RwDefinitions::TM_RW_CURR_SPEED, new PoolEntry( { 0 })); @@ -406,7 +408,12 @@ void RwHandler::handleGetTelemetryReply(const uint8_t* packet) { tmDataset.mcuTemperature = *(packet + offset + 3) << 24 | *(packet + offset + 2) << 16 | *(packet + offset + 1) << 8 | *(packet + offset); offset += 4; - offset += 8; + tmDataset.pressureSensorTemperature = *(packet + offset + 3) << 24 | *(packet + offset + 2) << 16 + | *(packet + offset + 1) << 8 | *(packet + offset); + offset += 4; + tmDataset.pressure = *(packet + offset + 3) << 24 | *(packet + offset + 2) << 16 + | *(packet + offset + 1) << 8 | *(packet + offset); + offset += 4; tmDataset.rwState = *(packet + offset); offset += 1; tmDataset.rwClcMode = *(packet + offset); @@ -469,6 +476,10 @@ void RwHandler::handleGetTelemetryReply(const uint8_t* packet) { << static_cast(tmDataset.lastResetStatus.value) << std::endl; sif::info << "RwHandler::handleTemperatureReply: MCU temperature: " << tmDataset.mcuTemperature << std::endl; + sif::info << "RwHandler::handleTemperatureReply: Pressure sensor temperature: " + << tmDataset.pressureSensorTemperature << std::endl; + sif::info << "RwHandler::handleTemperatureReply: Pressure " + << tmDataset.pressure << std::endl; sif::info << "RwHandler::handleTemperatureReply: State: " << static_cast(tmDataset.rwState.value) << std::endl; sif::info << "RwHandler::handleTemperatureReply: CLC mode: " diff --git a/mission/devices/devicedefinitions/RwDefinitions.h b/mission/devices/devicedefinitions/RwDefinitions.h index 83d6456e..766c7715 100644 --- a/mission/devices/devicedefinitions/RwDefinitions.h +++ b/mission/devices/devicedefinitions/RwDefinitions.h @@ -20,6 +20,8 @@ enum PoolIds: lp_id_t { CURRRENT_RESET_STATUS, TM_LAST_RESET_STATUS, TM_MCU_TEMPERATURE, + PRESSURE_SENSOR_TEMPERATURE, + PRESSURE, TM_RW_STATE, TM_CLC_MODE, TM_RW_CURR_SPEED, @@ -184,6 +186,10 @@ public: PoolIds::TM_LAST_RESET_STATUS, this); lp_var_t mcuTemperature = lp_var_t(sid.objectId, PoolIds::TM_MCU_TEMPERATURE, this); + lp_var_t pressureSensorTemperature = lp_var_t(sid.objectId, + PoolIds::PRESSURE_SENSOR_TEMPERATURE, this); + lp_var_t pressure = lp_var_t(sid.objectId, + PoolIds::PRESSURE, this); lp_var_t rwState = lp_var_t(sid.objectId, PoolIds::TM_RW_STATE, this); lp_var_t rwClcMode = lp_var_t(sid.objectId,