Skip to content

Commit

Permalink
perf: add switches
Browse files Browse the repository at this point in the history
  • Loading branch information
paripalpp committed Mar 5, 2024
1 parent 8fe037b commit 1bc5b35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,13 @@ fn main() -> ! {

let mut switchs_state_prev = switchs_state;

let mut scheduler = Scheduler::new(30_000, &timer);
let mut encoder_scheduler = Scheduler::new(30_000, &timer);
let mut switchs_scheduler = Scheduler::new(500_000, &timer);
loop {
// A welcome message at the beginning
let mut read_buffer = [0u8; 64];
let _ = serial.read(&mut read_buffer);
if scheduler.update() {
if encoder_scheduler.update() {
let time = timer.get_counter().ticks();
let counter = [ENCODER1.read(), ENCODER2.read(), ENCODER3.read()];
let speeds = [
Expand Down

0 comments on commit 1bc5b35

Please sign in to comment.