diff options
| author | Selene ToyKeeper | 2018-09-05 04:04:22 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2018-09-05 04:04:22 -0600 |
| commit | 927ddf4fe1891f9dd4ce05e10022e099317ce4cc (patch) | |
| tree | 273d7cdcf634fd92356d641c894afa7b36baeac2 | |
| parent | merged updates from fsm branch (diff) | |
| download | anduril-927ddf4fe1891f9dd4ce05e10022e099317ce4cc.tar.gz anduril-927ddf4fe1891f9dd4ce05e10022e099317ce4cc.tar.bz2 anduril-927ddf4fe1891f9dd4ce05e10022e099317ce4cc.zip | |
made aux LED default mode configurable per hardware target,
and changed the ROT66 default to something more sensible
| -rw-r--r-- | spaghetti-monster/anduril/anduril.c | 22 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/cfg-ff-rot66.h | 5 |
2 files changed, 18 insertions, 9 deletions
diff --git a/spaghetti-monster/anduril/anduril.c b/spaghetti-monster/anduril/anduril.c index 14faf5f..40d3f5d 100644 --- a/spaghetti-monster/anduril/anduril.c +++ b/spaghetti-monster/anduril/anduril.c @@ -281,15 +281,19 @@ volatile uint8_t ramp_discrete_steps = RAMP_DISCRETE_STEPS; uint8_t ramp_discrete_step_size; // don't set this #ifdef USE_INDICATOR_LED -// bits 2-3 control lockout mode -// bits 0-1 control "off" mode -// modes are: 0=off, 1=low, 2=high, 3=blinking (if TICK_DURING_STANDBY enabled) -#ifdef USE_INDICATOR_LED_WHILE_RAMPING -//uint8_t indicator_led_mode = (1<<2) + 2; -uint8_t indicator_led_mode = (2<<2) + 1; -#else -uint8_t indicator_led_mode = (3<<2) + 1; -#endif + // bits 2-3 control lockout mode + // bits 0-1 control "off" mode + // modes are: 0=off, 1=low, 2=high, 3=blinking (if TICK_DURING_STANDBY enabled) + #ifdef INDICATOR_LED_DEFAULT_MODE + uint8_t indicator_led_mode = INDICATOR_LED_DEFAULT_MODE; + #else + #ifdef USE_INDICATOR_LED_WHILE_RAMPING + //uint8_t indicator_led_mode = (1<<2) + 2; + uint8_t indicator_led_mode = (2<<2) + 1; + #else + uint8_t indicator_led_mode = (3<<2) + 1; + #endif + #endif #endif // calculate the nearest ramp level which would be valid at the moment diff --git a/spaghetti-monster/anduril/cfg-ff-rot66.h b/spaghetti-monster/anduril/cfg-ff-rot66.h index c336dcd..a454eb3 100644 --- a/spaghetti-monster/anduril/cfg-ff-rot66.h +++ b/spaghetti-monster/anduril/cfg-ff-rot66.h @@ -8,6 +8,11 @@ // (no, it doesn't really make sense on this light) #define TICK_DURING_STANDBY +// off mode: high (2) +// lockout: blinking (3) +#define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 2) + + #ifdef RAMP_LENGTH #undef RAMP_LENGTH #endif |
