diff options
| author | Selene ToyKeeper | 2023-11-30 10:42:15 -0700 |
|---|---|---|
| committer | Selene ToyKeeper | 2023-11-30 10:42:15 -0700 |
| commit | 04f1ae1127affc884d1e73879664af1ad9442ec2 (patch) | |
| tree | 05ebde7a6b92ad087d67c3094509d00d433213c3 | |
| parent | Merge branch 'fix-nofet-bikeflash' of github.com:digitalcircuit/anduril into ... (diff) | |
| download | anduril-04f1ae1127affc884d1e73879664af1ad9442ec2.tar.gz anduril-04f1ae1127affc884d1e73879664af1ad9442ec2.tar.bz2 anduril-04f1ae1127affc884d1e73879664af1ad9442ec2.zip | |
saner defaults for the default biking level
- set DEFAULT_BIKING_LEVEL in bike mode's header file
- use RAMP_SIZE/3 by default
- limit to MAX_BIKING_LEVEL if necessary
- get rid of any ties to MAX_1x7135 because it's kind of an obsolete symbol
| -rw-r--r-- | ui/anduril/load-save-config.h | 8 | ||||
| -rw-r--r-- | ui/anduril/strobe-modes.h | 12 |
2 files changed, 9 insertions, 11 deletions
diff --git a/ui/anduril/load-save-config.h b/ui/anduril/load-save-config.h index eb6d798..3ad477c 100644 --- a/ui/anduril/load-save-config.h +++ b/ui/anduril/load-save-config.h @@ -118,14 +118,6 @@ Config cfg = { .strobe_delays = { 41, 67 }, #endif #ifdef USE_BIKE_FLASHER_MODE - #ifndef DEFAULT_BIKING_LEVEL - #if MAX_1x7135 > MAX_BIKING_LEVEL - // Make sure fallback default doesn't exceed maximum (e.g. noFET) - #define DEFAULT_BIKING_LEVEL MAX_BIKING_LEVEL - #else - #define DEFAULT_BIKING_LEVEL MAX_1x7135 - #endif - #endif .bike_flasher_brightness = DEFAULT_BIKING_LEVEL, #endif #ifdef USE_BEACON_MODE diff --git a/ui/anduril/strobe-modes.h b/ui/anduril/strobe-modes.h index 058cea5..1890b8c 100644 --- a/ui/anduril/strobe-modes.h +++ b/ui/anduril/strobe-modes.h @@ -55,9 +55,15 @@ inline void lightning_storm_iter(); // bike mode config options #ifdef USE_BIKE_FLASHER_MODE -#define MAX_BIKING_LEVEL 120 // should be 127 or less -inline void bike_flasher_iter(); -#endif + #if !defined(DEFAULT_BIKING_LEVEL) + #define DEFAULT_BIKING_LEVEL (RAMP_SIZE/3) + #elif DEFAULT_BIKING_LEVEL > MAX_BIKING_LEVEL + #undef DEFAULT_BIKING_LEVEL + #define DEFAULT_BIKING_LEVEL MAX_BIKING_LEVEL + #endif + #define MAX_BIKING_LEVEL 120 // should be 127 or less + inline void bike_flasher_iter(); +#endif // ifdef USE_BIKE_FLASHER_MODE #ifdef USE_CANDLE_MODE #include "anduril/candle-mode.h" |
