better rtd printout
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Robin Müller 2022-03-23 15:02:48 +01:00
parent 1cd98c5604
commit 6e91462cba
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
4 changed files with 10 additions and 5 deletions

View File

@ -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

View File

@ -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<int>(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; }

View File

@ -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<uint8_t, 3> commandBuffer{0};
Max31865Definitions::Max31865Set sensorDataset;

View File

@ -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);