aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/anduril/anduril.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/spaghetti-monster/anduril/anduril.c b/spaghetti-monster/anduril/anduril.c
index 9751296..5a6b6e0 100644
--- a/spaghetti-monster/anduril/anduril.c
+++ b/spaghetti-monster/anduril/anduril.c
@@ -27,6 +27,7 @@
#define USE_RAMPING
#define USE_SET_LEVEL_GRADUALLY
#define RAMP_LENGTH 150
+#define MAX_BIKING_LEVEL 120 // should be 127 or less
#define BLINK_AT_RAMP_BOUNDARIES
//#define BLINK_AT_RAMP_FLOOR
#define USE_BATTCHECK
@@ -414,7 +415,7 @@ uint8_t strobe_state(EventPtr event, uint16_t arg) {
}
// biking mode brighter
else if (strobe_type == 3) {
- if (bike_flasher_brightness < MAX_LEVEL/2)
+ if (bike_flasher_brightness < MAX_BIKING_LEVEL)
bike_flasher_brightness ++;
set_level(bike_flasher_brightness);
}
@@ -430,7 +431,7 @@ uint8_t strobe_state(EventPtr event, uint16_t arg) {
}
// biking mode dimmer
else if (strobe_type == 3) {
- if (bike_flasher_brightness > 1)
+ if (bike_flasher_brightness > 2)
bike_flasher_brightness --;
set_level(bike_flasher_brightness);
}
@@ -958,7 +959,6 @@ void loop() {
#ifdef USE_DYNAMIC_UNDERCLOCKING
auto_clock_speed();
#endif
-
if (0) {}
#ifdef USE_IDLE_MODE
@@ -1034,6 +1034,7 @@ void loop() {
// bike flasher
else if (strobe_type == 3) {
uint8_t burst = bike_flasher_brightness << 1;
+ if (burst > MAX_LEVEL) burst = MAX_LEVEL;
for(uint8_t i=0; i<4; i++) {
set_level(burst);
if (! nice_delay_ms(5)) return;
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.