diff --git a/fw/HackSpaceCon_AS7/.vs/HackSpaceCon_AS7/v14/.atsuo b/fw/HackSpaceCon_AS7/.vs/HackSpaceCon_AS7/v14/.atsuo index 2c86507..385d098 100644 Binary files a/fw/HackSpaceCon_AS7/.vs/HackSpaceCon_AS7/v14/.atsuo and b/fw/HackSpaceCon_AS7/.vs/HackSpaceCon_AS7/v14/.atsuo differ diff --git a/fw/HackSpaceCon_AS7/HSC_Wand/wand_program.cpp b/fw/HackSpaceCon_AS7/HSC_Wand/wand_program.cpp index edb92c8..6af0c65 100644 --- a/fw/HackSpaceCon_AS7/HSC_Wand/wand_program.cpp +++ b/fw/HackSpaceCon_AS7/HSC_Wand/wand_program.cpp @@ -112,6 +112,9 @@ void setup() { // set up the RGB ~61Hz periodic timer conf_rgb_timer(); + // clear initial setup + rgb_run_next = 1; + // enable global interrupts (though they should already be enabled?) sei(); } @@ -145,7 +148,7 @@ void loop() { enable_rgb_timer(); // then start the RGB program timebase. - sleep_cpu(SLPCTRL_SMODE_IDLE_gc); // we can idle CPU after running the program + sleep_cpu(SLEEP_MODE_IDLE); // we can idle CPU after running the program break; } @@ -158,7 +161,7 @@ void loop() { break; } - sleep_cpu(SLPCTRL_SMODE_IDLE_gc); // we can idle CPU after running the program + sleep_cpu(SLEEP_MODE_IDLE); // we can idle CPU after running the program break; } @@ -167,7 +170,7 @@ void loop() { rgb.show(); // send final updates to the led run_rgbprog = RGB_IDLE; - sleep_cpu(SLPCTRL_SMODE_IDLE_gc); // we can idle CPU after running the program + sleep_cpu(SLEEP_MODE_IDLE); // we can idle CPU after running the program break; } @@ -177,7 +180,7 @@ void loop() { digitalWrite(PIN_LED_PWRENA, LOW); // disable LED power supply, run_rgbprog = RGB_IDLE; // and clear run_rgbprog. - sleep_cpu(SLPCTRL_SMODE_STDBY_gc); // finally, go to sleep in standby mode + sleep_cpu(SLEEP_MODE_STANDBY); // finally, go to sleep in standby mode break; }