aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2018-11-14 18:03:04 -0700
committerSelene ToyKeeper2018-11-14 18:03:04 -0700
commit75e17a578a8c7a7138f8557b08aa0ffa23453a53 (patch)
tree26a73c7f794ad5b6b6102e7738813985bf1e9f46 /spaghetti-monster
parentMade build script print the command it runs, so it'll be easier to copy/paste... (diff)
downloadanduril-75e17a578a8c7a7138f8557b08aa0ffa23453a53.tar.gz
anduril-75e17a578a8c7a7138f8557b08aa0ffa23453a53.tar.bz2
anduril-75e17a578a8c7a7138f8557b08aa0ffa23453a53.zip
added a fancier blinking mode for button/aux LEDs, enabled on D4S / Q8 / SP36
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/anduril/anduril.c11
-rw-r--r--spaghetti-monster/anduril/cfg-blf-q8.h2
-rw-r--r--spaghetti-monster/anduril/cfg-emisar-d4s.h2
3 files changed, 15 insertions, 0 deletions
diff --git a/spaghetti-monster/anduril/anduril.c b/spaghetti-monster/anduril/anduril.c
index ec16497..d1d2a1a 100644
--- a/spaghetti-monster/anduril/anduril.c
+++ b/spaghetti-monster/anduril/anduril.c
@@ -1687,12 +1687,23 @@ void blink_confirm(uint8_t num) {
#if defined(USE_INDICATOR_LED) && defined(TICK_DURING_STANDBY)
// beacon-like mode for the indicator LED
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};
+ indicator_led(seq[arg & 15]);
+
+ #else // basic blink, 1/8th duty cycle
+
if (! (arg & 7)) {
indicator_led(2);
}
else {
indicator_led(0);
}
+
+ #endif
}
#endif
diff --git a/spaghetti-monster/anduril/cfg-blf-q8.h b/spaghetti-monster/anduril/cfg-blf-q8.h
index 1b9b971..84c6dcd 100644
--- a/spaghetti-monster/anduril/cfg-blf-q8.h
+++ b/spaghetti-monster/anduril/cfg-blf-q8.h
@@ -6,6 +6,8 @@
#define USE_INDICATOR_LED_WHILE_RAMPING
// enable blinking indicator LED while off
#define TICK_DURING_STANDBY
+#define STANDBY_TICK_SPEED 3 // every 0.128 s
+#define USE_FANCIER_BLINKING_INDICATOR
// copied from Emisar D4 ramp
// ../../bin/level_calc.py 1 65 7135 1 0.8 150
diff --git a/spaghetti-monster/anduril/cfg-emisar-d4s.h b/spaghetti-monster/anduril/cfg-emisar-d4s.h
index ef55668..1070ee7 100644
--- a/spaghetti-monster/anduril/cfg-emisar-d4s.h
+++ b/spaghetti-monster/anduril/cfg-emisar-d4s.h
@@ -8,6 +8,8 @@
#endif
// enable blinking indicator LED while off
#define TICK_DURING_STANDBY
+#define STANDBY_TICK_SPEED 3 // every 0.128 s
+#define USE_FANCIER_BLINKING_INDICATOR
#ifdef RAMP_LENGTH
#undef RAMP_LENGTH
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.