PwmLimits: Save user set value into flash

In place of the machine values derived from the PWM duty / center point
calculations
This commit is contained in:
atse 2024-08-08 17:44:32 +08:00
parent 227a157e9e
commit 45129be836
1 changed files with 3 additions and 3 deletions

View File

@ -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::<volt>(),
max_i_pos: max_i_pos.get::<ampere>(),