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

This commit is contained in:
2022-05-13 01:17:23 +02:00
parent 5fe814e972
commit be1c26ddf7
4 changed files with 38 additions and 20 deletions

View File

@ -54,7 +54,8 @@ bool Max31865RtdReader::periodicInitHandling() {
if (rtd == nullptr) {
continue;
}
if (rtd->on and not rtd->configured) {
if ((rtd->on or rtd->active) and not rtd->configured) {
sif::debug << "crap1" << std::endl;
if (rtd->cd.hasTimedOut()) {
uint8_t cfg =
(Bias::OFF << CfgBitPos::BIAS_SEL) | (Wires::FOUR_WIRE << CfgBitPos::WIRE_SEL) |
@ -117,7 +118,9 @@ void Max31865RtdReader::periodicReadReqHandling() {
if (rtd == nullptr) {
continue;
}
sif::debug << "crap2" << std::endl;
if (rtdIsActive(rtd->idx)) {
sif::debug << "crap3" << std::endl;
uint8_t currentCfg = 0;
auto result = readCfgReg(rtd->spiCookie, currentCfg);
if (result != RETURN_OK) {
@ -151,6 +154,9 @@ void Max31865RtdReader::periodicReadHandling() {
handleSpiError(rtd, result, "readRtdVal");
continue;
}
if(rtd->idx == 0) {
sif::debug << "Read RAW rtd val 0: " << rtdVal << std::endl;
}
if (faultBitSet) {
rtd->db.faultBitSet = faultBitSet;
}