aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spaghetti-monster/anduril/aux-leds.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/spaghetti-monster/anduril/aux-leds.c b/spaghetti-monster/anduril/aux-leds.c
index 7c0ab10..c819bd7 100644
--- a/spaghetti-monster/anduril/aux-leds.c
+++ b/spaghetti-monster/anduril/aux-leds.c
@@ -32,8 +32,8 @@ void indicator_blink(uint8_t arg) {
#ifdef USE_FANCIER_BLINKING_INDICATOR
// fancy blink, set off/low/high levels here:
- uint8_t seq[] = {0, 1, 2, 1, 0, 0, 0, 0,
- 0, 0, 1, 0, 0, 0, 0, 0};
+ static const uint8_t seq[] = {0, 1, 2, 1, 0, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0, 0, 0};
indicator_led(seq[arg & 15]);
#else // basic blink, 1/8th duty cycle
@@ -51,7 +51,7 @@ void indicator_blink(uint8_t arg) {
#if defined(USE_AUX_RGB_LEDS) && defined(TICK_DURING_STANDBY)
uint8_t voltage_to_rgb() {
- uint8_t levels[] = {
+ static const uint8_t levels[] = {
// voltage, color
0, 0, // 0, R
33, 1, // 1, R+G
@@ -131,8 +131,8 @@ void rgb_led_update(uint8_t mode, uint8_t arg) {
// pick a brightness from the animation sequence
if (pattern == 3) {
// uses an odd length to avoid lining up with rainbow loop
- uint8_t animation[] = {2, 1, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 0, 0, 0, 0, 0, 0, 0, 1};
+ static const uint8_t animation[] = {2, 1, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 1};
frame = (frame + 1) % sizeof(animation);
pattern = animation[frame];
}
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.