summaryrefslogtreecommitdiff
path: root/src/app/blinkencat3
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-10-17 20:00:34 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-10-17 20:00:34 +0200
commit8e0cde61737f46ba492768d86c54cff998da07a1 (patch)
tree061c447e7600550cc1dafca7c32ea1fa8014a741 /src/app/blinkencat3
parent86bd556dbdf7555a515ba292b195f47d3b206a9b (diff)
blinkencat3: rotate colours clockwise
Diffstat (limited to 'src/app/blinkencat3')
-rw-r--r--src/app/blinkencat3/main.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/app/blinkencat3/main.cc b/src/app/blinkencat3/main.cc
index 263822e..12c3f14 100644
--- a/src/app/blinkencat3/main.cc
+++ b/src/app/blinkencat3/main.cc
@@ -115,8 +115,8 @@ void Blinkencat::check_battery(void)
ADCSRA |= _BV(ADIF);
//kout << "VCC is " << vcc << endl;
- // 3 V under load ~~ 3.5 V idle
- if (vcc < 3000) {
+ // 3.1 V under load ~~ 3.5 V idle
+ if (vcc < 3100) {
for (uint8_t i = 0; i < 5; i++) {
for (uint8_t i = 0; i < NUM_PIXELS; i++) {
np.setPixelColor(i, np.Color(0, 0, 0));
@@ -170,7 +170,7 @@ void Blinkencat::loop(void)
case RGBWHEEL_SLOW:
for (uint16_t i = 0; i < NUM_PIXELS; i++) {
uint16_t hsv = (i * 252 + rgbwheel_offset) % 6553;
- np.setPixelColor(i, np.gamma32(np.ColorHSV(hsv * 10, 255, 127)));
+ np.setPixelColor((NUM_PIXELS-1) - i, np.gamma32(np.ColorHSV(hsv * 10, 255, 127)));
}
rgbwheel_offset = (rgbwheel_offset + 10) % 6553;
np.show();
@@ -195,7 +195,7 @@ void Blinkencat::loop(void)
case BRIGHTRGBWHEEL_SLOW:
for (uint16_t i = 0; i < NUM_PIXELS; i++) {
uint16_t hsv = (i * 252 + rgbwheel_offset) % 6553;
- np.setPixelColor(i, np.gamma32(np.ColorHSV(hsv * 10)));
+ np.setPixelColor((NUM_PIXELS-1) - i, np.gamma32(np.ColorHSV(hsv * 10)));
}
rgbwheel_offset = (rgbwheel_offset + 10) % 6553;
np.show();