add swap status to the report

Signed-off-by: Egor Savkin <es@m-labs.hk>
This commit is contained in:
Egor Savkin 2024-03-08 11:16:17 +08:00 committed by atse
parent f02bf414b5
commit 37a8bde445

View File

@ -508,6 +508,7 @@ impl Channels {
temperature: state.get_temperature()
.map(|temperature| temperature.get::<degree_celsius>()),
pid_engaged: state.pid_engaged,
current_swapped: state.polarity_swapped,
i_set,
dac_value,
dac_feedback: self.adc_read(channel, PinsAdcReadTarget::DacVfb, 1),
@ -606,6 +607,7 @@ pub struct Report {
sens: Option<ElectricalResistance>,
temperature: Option<f64>,
pid_engaged: bool,
current_swapped: bool,
i_set: ElectricCurrent,
dac_value: ElectricPotential,
dac_feedback: ElectricPotential,