aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/anduril/ff-strobe-modes.c3
-rw-r--r--spaghetti-monster/anduril/ff-strobe-modes.h2
-rw-r--r--spaghetti-monster/anduril/strobe-modes.c5
-rw-r--r--spaghetti-monster/anduril/strobe-modes.h8
4 files changed, 8 insertions, 10 deletions
diff --git a/spaghetti-monster/anduril/ff-strobe-modes.c b/spaghetti-monster/anduril/ff-strobe-modes.c
index ee62e7e..4c12630 100644
--- a/spaghetti-monster/anduril/ff-strobe-modes.c
+++ b/spaghetti-monster/anduril/ff-strobe-modes.c
@@ -24,8 +24,7 @@
uint8_t boring_strobe_state(Event event, uint16_t arg) {
// police strobe and SOS, meh
- // 'st' reduces ROM size by avoiding access to a volatile var
- // (maybe I should just make it nonvolatile?)
+ // 'st' reduces ROM size slightly
uint8_t st = boring_strobe_type;
if (event == EV_enter_state) {
diff --git a/spaghetti-monster/anduril/ff-strobe-modes.h b/spaghetti-monster/anduril/ff-strobe-modes.h
index 29d3799..a3e0a27 100644
--- a/spaghetti-monster/anduril/ff-strobe-modes.h
+++ b/spaghetti-monster/anduril/ff-strobe-modes.h
@@ -22,7 +22,7 @@
uint8_t boring_strobe_state(Event event, uint16_t arg);
inline void boring_strobe_state_iter();
-volatile uint8_t boring_strobe_type = 0;
+uint8_t boring_strobe_type = 0;
void sos_blink(uint8_t num, uint8_t dah);
#ifdef USE_POLICE_STROBE_MODE
inline void police_strobe_iter();
diff --git a/spaghetti-monster/anduril/strobe-modes.c b/spaghetti-monster/anduril/strobe-modes.c
index 7d046bf..92ada9d 100644
--- a/spaghetti-monster/anduril/strobe-modes.c
+++ b/spaghetti-monster/anduril/strobe-modes.c
@@ -26,8 +26,7 @@
uint8_t strobe_state(Event event, uint16_t arg) {
static int8_t ramp_direction = 1;
- // 'st' reduces ROM size by avoiding access to a volatile var
- // (maybe I should just make it nonvolatile?)
+ // 'st' reduces ROM size slightly
strobe_mode_te st = strobe_type;
#ifdef USE_MOMENTARY_MODE
@@ -165,7 +164,7 @@ uint8_t strobe_state(Event event, uint16_t arg) {
// runs repeatedly in FSM loop() whenever UI is in strobe_state or momentary strobe
inline void strobe_state_iter() {
- uint8_t st = strobe_type;
+ uint8_t st = strobe_type; // can't use switch() on an enum
switch(st) {
#if defined(USE_PARTY_STROBE_MODE) || defined(USE_TACTICAL_STROBE_MODE)
diff --git a/spaghetti-monster/anduril/strobe-modes.h b/spaghetti-monster/anduril/strobe-modes.h
index d432eea..e2389ba 100644
--- a/spaghetti-monster/anduril/strobe-modes.h
+++ b/spaghetti-monster/anduril/strobe-modes.h
@@ -45,9 +45,9 @@ const int NUM_STROBES = strobe_mode_END;
// which strobe mode is active?
#ifdef USE_CANDLE_MODE
-volatile strobe_mode_te strobe_type = candle_mode_e;
+strobe_mode_te strobe_type = candle_mode_e;
#else
-volatile strobe_mode_te strobe_type = 0;
+strobe_mode_te strobe_type = 0;
#endif
#endif
@@ -70,7 +70,7 @@ inline void strobe_state_iter();
#if defined(USE_PARTY_STROBE_MODE) || defined(USE_TACTICAL_STROBE_MODE)
// party / tactical strobe timing
-volatile uint8_t strobe_delays[] = { 41, 67 }; // party strobe 24 Hz, tactical strobe 10 Hz
+uint8_t strobe_delays[] = { 41, 67 }; // party strobe 24 Hz, tactical strobe 10 Hz
inline void party_tactical_strobe_mode_iter(uint8_t st);
#endif
@@ -81,7 +81,7 @@ inline void lightning_storm_iter();
// bike mode config options
#ifdef USE_BIKE_FLASHER_MODE
#define MAX_BIKING_LEVEL 120 // should be 127 or less
-volatile uint8_t bike_flasher_brightness = MAX_1x7135;
+uint8_t bike_flasher_brightness = MAX_1x7135;
inline void bike_flasher_iter();
#endif