Commit random stuff that was still here
This commit is contained in:
parent
4746d427eb
commit
4854c68d8b
1 changed files with 5 additions and 7 deletions
|
@ -76,18 +76,16 @@ fn main() -> ! {
|
|||
let mut channel_b = pwm.channel_b;
|
||||
use embedded_hal::PwmPin;
|
||||
let _channel_pin_b_3 = channel_b.output_to(pins.gpio3);
|
||||
channel_b.set_duty(u16::MAX);
|
||||
channel_b.set_duty(u16::MAX / 2);
|
||||
channel_b.enable();
|
||||
info!("PWM enabled");
|
||||
|
||||
loop {
|
||||
let command = red_commands.next();
|
||||
command.map(|message| {
|
||||
if let red_commands::RedCommand::SetSpindleSpeed(duty) = message {
|
||||
channel_b.set_duty(duty);
|
||||
info!("Duty: {}", channel_b.get_duty());
|
||||
}
|
||||
});
|
||||
if let Some(red_commands::RedCommand::SetSpindleSpeed(duty)) = command {
|
||||
channel_b.set_duty(duty);
|
||||
info!("Duty: {}", channel_b.get_duty());
|
||||
};
|
||||
|
||||
delay.delay_ms(10);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue