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:
parent
227a157e9e
commit
45129be836
|
@ -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>(),
|
||||
|
|
Loading…
Reference in New Issue