Skip to content

Commit

Permalink
reset slowclock for MidiUSB activation timer
Browse files Browse the repository at this point in the history
  • Loading branch information
jmamma committed Jul 14, 2022
1 parent 1364946 commit 2fb794f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions avr/cores/megacommand/MCL/MCL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ void MCL::setup() {
grid_task.init();

GUI.addTask(&grid_task);
slowclock = 0;
GUI.addTask(&midi_active_peering);

uint8_t boot = true;
Expand Down
2 changes: 1 addition & 1 deletion avr/cores/megacommand/MCL/MidiActivePeering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ void MidiActivePeering::run() {
resource_loaded = false;

//Setting USB turbo speed too early can cause OS upload to fail
if (turbo_light.lookup_speed(mcl_cfg.usb_turbo) != MidiUartUSB.speed && slowclock > 3500 && usb_set_speed) {
if (turbo_light.lookup_speed(mcl_cfg.usb_turbo) != MidiUartUSB.speed && slowclock > 3000 && usb_set_speed) {
turbo_light.set_speed(turbo_light.lookup_speed(mcl_cfg.usb_turbo), MidiUSB.uart);
usb_set_speed = false;
}
Expand Down

0 comments on commit 2fb794f

Please sign in to comment.