aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelene ToyKeeper2023-11-30 10:42:47 -0700
committerSelene ToyKeeper2023-11-30 10:42:47 -0700
commit4ec967517f3a745210048e3a9e8bacab6cd0bb33 (patch)
tree05ebde7a6b92ad087d67c3094509d00d433213c3
parentsofirn-lt1s-pro: disable memory timer and extended simple UI by default (diff)
parentsaner defaults for the default biking level (diff)
downloadanduril-4ec967517f3a745210048e3a9e8bacab6cd0bb33.tar.gz
anduril-4ec967517f3a745210048e3a9e8bacab6cd0bb33.tar.bz2
anduril-4ec967517f3a745210048e3a9e8bacab6cd0bb33.zip
Merge branch 'pr23-digitalcircuit-fix-nofet-bikeflash' into trunk
Fixed bike mode's default brightness so it won't be wildly miscalibrated on lights with high regulated modes. * pr23-digitalcircuit-fix-nofet-bikeflash: saner defaults for the default biking level bikeflash: Cap default brightness to max, define
-rw-r--r--ui/anduril/load-save-config.h2
-rw-r--r--ui/anduril/strobe-modes.h12
2 files changed, 10 insertions, 4 deletions
diff --git a/ui/anduril/load-save-config.h b/ui/anduril/load-save-config.h
index 514fcbb..3ad477c 100644
--- a/ui/anduril/load-save-config.h
+++ b/ui/anduril/load-save-config.h
@@ -118,7 +118,7 @@ Config cfg = {
.strobe_delays = { 41, 67 },
#endif
#ifdef USE_BIKE_FLASHER_MODE
- .bike_flasher_brightness = MAX_1x7135,
+ .bike_flasher_brightness = DEFAULT_BIKING_LEVEL,
#endif
#ifdef USE_BEACON_MODE
// beacon timing
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"
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.