Fix switch timer decrement
This commit is contained in:
parent
cde00aee39
commit
b6b2e485cb
|
@ -80,7 +80,13 @@ fn main() -> ! {
|
||||||
// This debouncing sucks ass and isn't good - doesn't matter, just for testing
|
// This debouncing sucks ass and isn't good - doesn't matter, just for testing
|
||||||
switch_count = match switch.is_low() {
|
switch_count = match switch.is_low() {
|
||||||
true => 1.0,
|
true => 1.0,
|
||||||
false => switch_count - 0.2,
|
false => {
|
||||||
|
if switch_count > 0.0 {
|
||||||
|
switch_count - 0.2
|
||||||
|
} else {
|
||||||
|
0.0
|
||||||
|
}
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
let val;
|
let val;
|
||||||
|
|
Loading…
Reference in New Issue