46 if (!std::isfinite(ma))
49 return std::clamp(pct, 0.0, 100.0);
constexpr double kLoopMaxMa
double ma_to_percent_open(double ma)
% open, clamped to 0-100 (a loop a little outside 4-20 mA is still the end of travel).
constexpr double kShuntOhms
constexpr double kAdcRefVolts
double counts_to_ma(uint32_t counts)
constexpr double kNoSignalMa
Below this the loop is open or unpowered: no position, not "fully closed".
constexpr double kLoopMinMa
Reading from_counts(uint32_t counts)
constexpr uint8_t kStatusOk
cal_status values published beside the position.
constexpr double kAdcMaxCounts
constexpr uint8_t kStatusNoSignal
Output smoothing for calibrated PT pressure, per sensor uid (ESP32 and LabJack T7 alike).
Motorized ball valve position: raw ADC counts -> % open.