diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index e74536c5..95b149ac 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -917,6 +917,7 @@ void ObjectFactory::createRtdComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF rtds[idx]->setParent(objects::TCS_BOARD_ASS); rtdFdir = new RtdFdir(rtdIds[idx]); rtds[idx]->setCustomFdir(rtdFdir); + rtds[idx]->setDeviceIdx(idx + 3); } #if OBSW_TEST_RTD == 1 diff --git a/mission/devices/Max31865PT1000Handler.cpp b/mission/devices/Max31865PT1000Handler.cpp index 21631134..9a4d88ce 100644 --- a/mission/devices/Max31865PT1000Handler.cpp +++ b/mission/devices/Max31865PT1000Handler.cpp @@ -403,9 +403,9 @@ ReturnValue_t Max31865PT1000Handler::interpretDeviceReply(DeviceCommandId_t id, #if OBSW_VERBOSE_LEVEL >= 1 if (debugDivider->checkAndIncrement()) { #if FSFW_CPP_OSTREAM_ENABLED == 1 - sif::info << "Max31865: Object ID: " << std::hex << this->getObjectId() - << ": Measured resistance is " << rtdValue << " Ohms." << std::endl; - sif::info << "Approximated temperature is " << approxTemp << " C" << std::endl; + sif::info << "Max31865: ObjID " << std::hex << this->getObjectId() << " | RTD " << std::dec + << static_cast(deviceIdx) << ": R[Ohm] " << rtdValue + << " Ohms | Approx T[C]: " << approxTemp << std::endl; #else sif::printInfo("Max31685: Measured resistance is %f Ohms\n", rtdValue); sif::printInfo("Approximated temperature is %f C\n", approxTemp); @@ -529,3 +529,5 @@ void Max31865PT1000Handler::modeChanged() { internalState = InternalState::NONE; } } + +void Max31865PT1000Handler::setDeviceIdx(uint8_t idx) { deviceIdx = idx; } diff --git a/mission/devices/Max31865PT1000Handler.h b/mission/devices/Max31865PT1000Handler.h index 1be4c323..17657bcf 100644 --- a/mission/devices/Max31865PT1000Handler.h +++ b/mission/devices/Max31865PT1000Handler.h @@ -46,6 +46,8 @@ class Max31865PT1000Handler : public DeviceHandlerBase { static constexpr uint8_t DEFAULT_CONFIG = 0b11000001; void setInstantNormal(bool instantNormal); + void setDeviceIdx(uint8_t idx); + /** * Expected temperature range is -100 C and 100 C. * If there are temperatures beyond this range there must be a fault. @@ -105,6 +107,7 @@ class Max31865PT1000Handler : public DeviceHandlerBase { bool resetFaultBit = false; dur_millis_t startTime = 0; uint8_t faultByte = 0; + uint8_t deviceIdx = 0; std::array commandBuffer{0}; Max31865Definitions::Max31865Set sensorDataset; diff --git a/mission/system/TcsBoardAssembly.h b/mission/system/TcsBoardAssembly.h index cda78317..832f335d 100644 --- a/mission/system/TcsBoardAssembly.h +++ b/mission/system/TcsBoardAssembly.h @@ -14,8 +14,7 @@ struct TcsBoardHelper { class TcsBoardAssembly : public AssemblyBase, public ConfirmsFailuresIF { public: static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::TCS_BOARD_ASS; - static constexpr Event CHILDREN_LOST_MODE = - event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM); + static constexpr Event CHILDREN_LOST_MODE = event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM); TcsBoardAssembly(object_id_t objectId, object_id_t parentId, PowerSwitchIF* pwrSwitcher, power::Switch_t switcher, TcsBoardHelper helper);