diff options
| author | Selene ToyKeeper | 2023-12-15 04:45:51 -0700 |
|---|---|---|
| committer | Selene ToyKeeper | 2023-12-15 04:45:51 -0700 |
| commit | 8572911b9a8902d25480ed08a9c6b6486b8735ba (patch) | |
| tree | ff322cfacb945ae7502298be4cd9a787dba360b8 | |
| parent | clarified which-hex-file.md a bit; make sure the model number matches (diff) | |
| download | anduril-8572911b9a8902d25480ed08a9c6b6486b8735ba.tar.gz anduril-8572911b9a8902d25480ed08a9c6b6486b8735ba.tar.bz2 anduril-8572911b9a8902d25480ed08a9c6b6486b8735ba.zip | |
use BLIP_LEVEL instead of 0 for "blip"s
This helps when using a regulator which doesn't like being turned off
and back on quickly.
Diffstat (limited to '')
| -rw-r--r-- | hw/thefreeman/avr32dd20-devkit/anduril.h | 1 | ||||
| -rw-r--r-- | ui/anduril/misc.c | 4 | ||||
| -rw-r--r-- | ui/anduril/misc.h | 4 |
3 files changed, 7 insertions, 2 deletions
diff --git a/hw/thefreeman/avr32dd20-devkit/anduril.h b/hw/thefreeman/avr32dd20-devkit/anduril.h index 02d5de3..3152183 100644 --- a/hw/thefreeman/avr32dd20-devkit/anduril.h +++ b/hw/thefreeman/avr32dd20-devkit/anduril.h @@ -110,6 +110,7 @@ #define PARTY_STROBE_ONTIME 1 // slow down party strobe #define STROBE_OFF_LEVEL 1 // keep the regulator chip on between pulses +#define BLIP_LEVEL 1 // same // smoother candle mode with bigger oscillations #define CANDLE_AMPLITUDE 40 diff --git a/ui/anduril/misc.c b/ui/anduril/misc.c index 3715f34..9144b28 100644 --- a/ui/anduril/misc.c +++ b/ui/anduril/misc.c @@ -25,7 +25,7 @@ void blink_confirm(uint8_t num) { void blink_once() { uint8_t brightness = actual_level; uint8_t bump = brightness + BLINK_BRIGHTNESS; - if (bump > MAX_LEVEL) bump = 0; + if (bump > MAX_LEVEL) bump = BLIP_LEVEL; set_level(bump); delay_4ms(BLINK_ONCE_TIME/4); @@ -35,7 +35,7 @@ void blink_once() { // Just go dark for a moment to indicate to user that something happened void blip() { uint8_t temp = actual_level; - set_level(0); + set_level(BLIP_LEVEL); delay_4ms(3); set_level(temp); } diff --git a/ui/anduril/misc.h b/ui/anduril/misc.h index 0f2992a..b259a6e 100644 --- a/ui/anduril/misc.h +++ b/ui/anduril/misc.h @@ -4,6 +4,10 @@ #pragma once +#ifndef BLIP_LEVEL +#define BLIP_LEVEL 0 +#endif + //void blink_confirm(uint8_t num); // no longer used void blink_once(); void blip(); |
