solved a bug with button-state
This commit is contained in:
parent
1830ce7c93
commit
3bb23b50ff
@ -102,12 +102,10 @@ impl<OP: OutputPin, IP: InputPin> LedButton<OP, IP> {
|
||||
match self.button.read() {
|
||||
ButtonState::Released => {
|
||||
if led_while_pressed { let _ = self.led.off(); }
|
||||
self.state = ButtonState::NotPressed;
|
||||
ButtonState::Released
|
||||
}
|
||||
ButtonState::LongReleased => {
|
||||
if led_while_pressed { let _ = self.led.off(); }
|
||||
self.state = ButtonState::NotPressed;
|
||||
ButtonState::LongReleased
|
||||
}
|
||||
ButtonState::Flank => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user