forked from M-Labs/thermostat
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
cfc0f371c1
commit
c0bddc03b9
@ -80,9 +80,9 @@ pub struct PwmLimits {
|
|||||||
|
|
||||||
impl PwmLimits {
|
impl PwmLimits {
|
||||||
pub fn new(channels: &mut Channels, channel: usize) -> Self {
|
pub fn new(channels: &mut Channels, channel: usize) -> Self {
|
||||||
let (max_v, _) = channels.get_max_v(channel);
|
let (_, max_v) = channels.get_max_v(channel);
|
||||||
let (max_i_pos, _) = channels.get_max_i_pos(channel);
|
let (_, max_i_pos) = channels.get_max_i_pos(channel);
|
||||||
let (max_i_neg, _) = channels.get_max_i_neg(channel);
|
let (_, max_i_neg) = channels.get_max_i_neg(channel);
|
||||||
PwmLimits {
|
PwmLimits {
|
||||||
max_v: max_v.get::<volt>(),
|
max_v: max_v.get::<volt>(),
|
||||||
max_i_pos: max_i_pos.get::<ampere>(),
|
max_i_pos: max_i_pos.get::<ampere>(),
|
||||||
|
Loading…
Reference in New Issue
Block a user