diff --git a/fw/HackSpaceCon_AS7/.vs/HackSpaceCon_AS7/v14/.atsuo b/fw/HackSpaceCon_AS7/.vs/HackSpaceCon_AS7/v14/.atsuo index 30334cc..77eee68 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/Arduino/arduino_libraries/tinyNeoPixel_static/tinyNeoPixel_Static.cpp b/fw/HackSpaceCon_AS7/Arduino/arduino_libraries/tinyNeoPixel_static/tinyNeoPixel_Static.cpp index 2cf1aa6..0ea58c7 100644 --- a/fw/HackSpaceCon_AS7/Arduino/arduino_libraries/tinyNeoPixel_static/tinyNeoPixel_Static.cpp +++ b/fw/HackSpaceCon_AS7/Arduino/arduino_libraries/tinyNeoPixel_static/tinyNeoPixel_Static.cpp @@ -1073,6 +1073,8 @@ void tinyNeoPixel::show(uint16_t leds) { interrupts(); + + /* #if (!defined(MILLIS_USE_TIMERNONE) && !defined(MILLIS_USE_TIMERRTC) && !defined(MILLIS_USE_TIMERRTC_XTAL) && !defined(MILLIS_USE_TIMERRTC_XOSC)) endTime = micros(); // Save EOD time for latch on next call @@ -1080,6 +1082,7 @@ void tinyNeoPixel::show(uint16_t leds) { #else #pragma message("micros() is not available because millis is disabled from the tools subemnu. It is your responsibility to ensure a sufficient time has passed between calls to show(). See documentation.") #endif + */ } // Set the output pin number diff --git a/fw/HackSpaceCon_AS7/HSC_Wand/rgbled.cpp b/fw/HackSpaceCon_AS7/HSC_Wand/rgbled.cpp index 8db8673..dacbbaa 100644 --- a/fw/HackSpaceCon_AS7/HSC_Wand/rgbled.cpp +++ b/fw/HackSpaceCon_AS7/HSC_Wand/rgbled.cpp @@ -34,15 +34,13 @@ uint8_t rgbled[3 * RGB_COUNT]; void conf_rgb_timer() { // this timer will run at half speed. - // so 8MHz / 2 (prescale) / 1 (CLK_PER) = 4MHz - // this will allow a full cycle time of ~61Hz. - - _PROTECTED_WRITE(CLKCTRL_MCLKCTRLB, 0); // disable CLK_PER divider + // so 8MHz / 2 (timer prescale) / 2 (CLK_PER) = 2MHz + // this will allow a cycle time with 33333 counts to be 60Hz. disable_rgb_timer(); - TCB0.CTRLA = TCB_CLKSEL_CLKDIV2_gc; // prescale timer to run at half speed - TCB0.CCMP = 0xffff; // count to full + TCB0.CTRLA = TCB_CLKSEL_CLKDIV2_gc; // prescale timer to run at half speed + TCB0.CCMP = 33333 - 1; // count to full TCB0.CNT = 0; }