forked from M-Labs/thermostat
main: remove special handling for PwmPin::ISet
This commit is contained in:
parent
b9902929a9
commit
b394cfa3d4
@ -303,7 +303,9 @@ fn main() -> ! {
|
||||
let _ = writeln!(socket, "channel {}: PID enabled to control PWM", channel
|
||||
);
|
||||
}
|
||||
Command::Pwm { channel, pin: PwmPin::ISet, value } => {
|
||||
Command::Pwm { channel, pin, value } => {
|
||||
match pin {
|
||||
PwmPin::ISet => {
|
||||
channels.channel_state(channel).pid_engaged = false;
|
||||
leds.g3.off();
|
||||
let current = ElectricCurrent::new::<ampere>(value);
|
||||
@ -315,11 +317,6 @@ fn main() -> ! {
|
||||
max.into_format_args(ampere, Abbreviation),
|
||||
);
|
||||
}
|
||||
Command::Pwm { channel, pin, value } => {
|
||||
match pin {
|
||||
PwmPin::ISet =>
|
||||
// Handled above
|
||||
unreachable!(),
|
||||
PwmPin::MaxV => {
|
||||
let voltage = ElectricPotential::new::<volt>(value);
|
||||
let (voltage, max) = channels.set_max_v(channel, voltage);
|
||||
|
Loading…
Reference in New Issue
Block a user