76 const std::vector<T7CalChannel>&
all()
const {
80 std::vector<uint8_t>
tc_slots()
const;
82 std::vector<std::pair<uint8_t, uint8_t>>
raw_tables()
const;
90 std::map<std::pair<uint8_t, uint8_t>,
size_t>
by_table_;
std::map< uint16_t, size_t > by_uid_
const T7CalChannel * by_uid(uint16_t uid) const
std::vector< uint8_t > tc_slots() const
Slots with at least one TC (they publish a cold-junction table).
std::vector< T7CalChannel > channels_
std::map< std::pair< uint8_t, uint8_t >, size_t > by_table_
T7CalibrationMap()=default
const std::vector< T7CalChannel > & all() const
std::vector< std::pair< uint8_t, uint8_t > > raw_tables() const
Raw tables calibration_service subscribes to: every input above, plus each TC slot's CJC.
const T7CalChannel * by_table(uint8_t slot, uint8_t ain) const
The input behind raw table {0x26, (slot-1)*0x20 + ain}, or nullptr.
constexpr uint8_t kCjcTableOffset
Raw-table offset (within a slot's 32-entry block) of the cold-junction table: AIN15 does not exist on...
std::array< uint8_t, 2 > cjc_table_id(uint8_t slot)
Cold-junction table id for a slot.
int32_t t7_counts(double volts)
The calibration "ADC code" for a T7 reading: microvolts, rounded and clamped to int32.
double t7_volts(double counts)
Volts from a calibration code.
constexpr uint8_t kT7LogicalBase
First logical calibration channel for T7 inputs.
uint16_t t7_uid(int board_id, int ain)
uid of a T7 input: board_id * 100 + ain, the ESP32 scheme with the AIN as connector.
uint8_t t7_logical_channel(uint8_t slot, uint8_t ain)
Logical calibration channel for a T7 input.
Motorized ball valve position: raw ADC counts -> % open.
The whole parsed config.toml, restricted to what C++ consumes.
One streamed analog input.
One T7 input as calibration sees it.
config::T7Channel channel
std::string board_key
"labjack_1" — the <board> in [calibration_model_<board>] etc.
static double volts(uint32_t code)
Shunt volts for a code, as calibration_main's convert_hp_pt_to_pressure computes it.