hotfixees
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...

This commit is contained in:
2023-03-03 16:06:38 +01:00
parent 1e4766ddfc
commit 05be170890
5 changed files with 12 additions and 16 deletions

View File

@ -28,17 +28,10 @@ ReturnValue_t Max31865RtdPolling::performOperation(uint8_t operationCode) {
static_cast<void>(result);
// Measured to take 0-1 ms in debug build
// Stopwatch watch;
if (periodicInitHandling()) {
#if OBSW_RTD_AUTO_MODE == 0
// 10 ms delay for VBIAS startup
TaskFactory::delayTask(10);
#endif
} else {
// No devices usable (e.g. TCS board off)
return returnvalue::OK;
}
periodicInitHandling();
#if OBSW_RTD_AUTO_MODE == 0
// 10 ms delay for VBIAS startup
TaskFactory::delayTask(10);
result = periodicReadReqHandling();
if (result != returnvalue::OK) {
return result;
@ -113,12 +106,12 @@ ReturnValue_t Max31865RtdPolling::periodicInitHandling() {
ReturnValue_t Max31865RtdPolling::periodicReadReqHandling() {
using namespace MAX31865;
updateActiveRtdsArray();
// Now request one shot config for all active RTDs
for (auto& rtd : rtds) {
if (rtd == nullptr) {
continue;
}
updateActiveRtdsArray();
if (activeRtdsArray[rtd->idx]) {
ReturnValue_t result = writeCfgReg(rtd->spiCookie, BASE_CFG | (1 << CfgBitPos::ONE_SHOT));
if (result != returnvalue::OK) {
@ -134,12 +127,12 @@ ReturnValue_t Max31865RtdPolling::periodicReadReqHandling() {
ReturnValue_t Max31865RtdPolling::periodicReadHandling() {
using namespace MAX31865;
auto result = returnvalue::OK;
updateActiveRtdsArray();
// Now read the RTD values
for (auto& rtd : rtds) {
if (rtd == nullptr) {
continue;
}
updateActiveRtdsArray();
if (activeRtdsArray[rtd->idx]) {
// Please note that using the manual CS lock wrapper here is problematic. Might be a SPI
// or hardware specific issue where the CS needs to be pulled high and then low again