Fix switch timer decrement

This commit is contained in:
~erin 2023-07-02 10:27:47 -04:00
parent cde00aee39
commit b6b2e485cb
1 changed files with 7 additions and 1 deletions

View File

@ -80,7 +80,13 @@ fn main() -> ! {
// This debouncing sucks ass and isn't good - doesn't matter, just for testing
switch_count = match switch.is_low() {
true => 1.0,
false => switch_count - 0.2,
false => {
if switch_count > 0.0 {
switch_count - 0.2
} else {
0.0
}
},
};
let val;