From 45129be83685d731ff0566e9d335ab74ff1b77da Mon Sep 17 00:00:00 2001 From: atse Date: Thu, 8 Aug 2024 17:44:32 +0800 Subject: [PATCH] PwmLimits: Save user set value into flash In place of the machine values derived from the PWM duty / center point calculations --- src/config.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config.rs b/src/config.rs index a7a3e7a..74bbcac 100644 --- a/src/config.rs +++ b/src/config.rs @@ -80,9 +80,9 @@ pub struct PwmLimits { impl PwmLimits { pub fn new(channels: &mut Channels, channel: usize) -> Self { - let (max_v, _) = channels.get_max_v(channel); - let (max_i_pos, _) = channels.get_max_i_pos(channel); - let (max_i_neg, _) = channels.get_max_i_neg(channel); + let (_, max_v) = channels.get_max_v(channel); + let (_, max_i_pos) = channels.get_max_i_pos(channel); + let (_, max_i_neg) = channels.get_max_i_neg(channel); PwmLimits { max_v: max_v.get::(), max_i_pos: max_i_pos.get::(),