aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2018-06-17 19:43:35 -0600
committerSelene ToyKeeper2018-06-17 19:43:35 -0600
commita66c9fbbdd898138beec63fc70c9133675b15dfe (patch)
tree015166f858cd4853f9f522630bbaf9e818c1ac5e /spaghetti-monster
parentChanged halfsleep mode to TICK_DURING_STANDBY. Added blinking indicator LED ... (diff)
downloadanduril-a66c9fbbdd898138beec63fc70c9133675b15dfe.tar.gz
anduril-a66c9fbbdd898138beec63fc70c9133675b15dfe.tar.bz2
anduril-a66c9fbbdd898138beec63fc70c9133675b15dfe.zip
Started adding support for aux LEDs which go out the front instead of lighting up the button.
(so they should only be on when the main LEDs are off)
Diffstat (limited to '')
-rw-r--r--spaghetti-monster/anduril/anduril.c5
-rw-r--r--spaghetti-monster/fsm-ramping.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/spaghetti-monster/anduril/anduril.c b/spaghetti-monster/anduril/anduril.c
index ba9afa5..b64d487 100644
--- a/spaghetti-monster/anduril/anduril.c
+++ b/spaghetti-monster/anduril/anduril.c
@@ -62,6 +62,7 @@
// specific settings for known driver types
#ifdef FSM_BLF_Q8_DRIVER
#define USE_INDICATOR_LED
+#define USE_INDICATOR_LED_WHILE_RAMPING
#define TICK_DURING_STANDBY
#define VOLTAGE_FUDGE_FACTOR 7 // add 0.35V
@@ -73,6 +74,7 @@
#elif defined(FSM_BLF_GT_DRIVER)
#define USE_INDICATOR_LED
+#define USE_INDICATOR_LED_WHILE_RAMPING
#define TICK_DURING_STANDBY
#undef BLINK_AT_CHANNEL_BOUNDARIES
#undef BLINK_AT_RAMP_CEILING
@@ -220,7 +222,8 @@ uint8_t ramp_discrete_step_size; // don't set this
// bits 0-1 control "off" mode
// modes are: 0=off, 1=low, 2=high
// (TODO: 3=blinking)
-uint8_t indicator_led_mode = (1<<2) + 2;
+//uint8_t indicator_led_mode = (1<<2) + 2;
+uint8_t indicator_led_mode = (2<<2) + 1;
#endif
// calculate the nearest ramp level which would be valid at the moment
diff --git a/spaghetti-monster/fsm-ramping.c b/spaghetti-monster/fsm-ramping.c
index ec132ae..01df46a 100644
--- a/spaghetti-monster/fsm-ramping.c
+++ b/spaghetti-monster/fsm-ramping.c
@@ -29,11 +29,15 @@ void set_level(uint8_t level) {
gradual_target = level;
#endif
#ifdef USE_INDICATOR_LED
+ #ifdef USE_INDICATOR_LED_WHILE_RAMPING
if (! go_to_standby)
indicator_led((level > 0) + (level > MAX_1x7135));
//if (level > MAX_1x7135) indicator_led(2);
//else if (level > 0) indicator_led(1);
//else if (! go_to_standby) indicator_led(0);
+ #else
+ indicator_led(0);
+ #endif
#endif
//TCCR0A = PHASE;
if (level == 0) {