From 2c6b8e81862f6e9eff2ea5a780efc86aa1e549ea Mon Sep 17 00:00:00 2001 From: Egor Savkin Date: Fri, 8 Mar 2024 11:16:17 +0800 Subject: [PATCH] add swap status to the report Signed-off-by: Egor Savkin --- src/channels.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/channels.rs b/src/channels.rs index 5ea9315..7b514fe 100644 --- a/src/channels.rs +++ b/src/channels.rs @@ -509,6 +509,7 @@ impl Channels { temperature: state.get_temperature() .map(|temperature| temperature.get::()), pid_engaged: state.pid_engaged, + current_swapped: state.polarity_swapped, i_set, dac_value, dac_feedback: self.adc_read(channel, PinsAdcReadTarget::DacVfb, 1), @@ -607,6 +608,7 @@ pub struct Report { sens: Option, temperature: Option, pid_engaged: bool, + current_swapped: bool, i_set: ElectricCurrent, dac_value: ElectricPotential, dac_feedback: ElectricPotential,