From 43e6a6610f750937debcd962f36bbcc833cd0e65 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Sat, 29 Sep 2018 00:55:30 -0600 Subject: Added MOON_TIMING_HINT, made stepped ramp initial timing the same as smooth ramp. (previously, smooth ramp took 2 timeouts before ramping while stepped took 3) (now both are 2) --- spaghetti-monster/anduril/anduril.c | 16 +++++++++++++++- spaghetti-monster/anduril/build-all.sh | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/spaghetti-monster/anduril/anduril.c b/spaghetti-monster/anduril/anduril.c index fdbc7d5..5547047 100644 --- a/spaghetti-monster/anduril/anduril.c +++ b/spaghetti-monster/anduril/anduril.c @@ -37,6 +37,10 @@ #define USE_THERMAL_REGULATION #define DEFAULT_THERM_CEIL 45 // try not to get hotter than this +// short blip when crossing from "click" to "hold" from off +// (helps the user hit moon mode exactly, instead of holding too long +// or too short) +#define MOON_TIMING_HINT // short blips while ramping #define BLINK_AT_CHANNEL_BOUNDARIES //#define BLINK_AT_RAMP_FLOOR @@ -392,9 +396,19 @@ uint8_t off_state(EventPtr event, uint16_t arg) { } // hold: go to lowest level else if (event == EV_click1_hold) { + #ifdef MOON_TIMING_HINT + if (arg == 0) { + // let the user know they can let go now to stay at moon + uint8_t temp = actual_level; + set_level(0); + delay_4ms(2); + set_level(temp); + } else + #endif // don't start ramping immediately; // give the user time to release at moon level - if (arg >= HOLD_TIMEOUT) { + //if (arg >= HOLD_TIMEOUT) { // smaller + if (arg >= (!ramp_style) * HOLD_TIMEOUT) { // more consistent set_state(steady_state, 1); } return MISCHIEF_MANAGED; diff --git a/spaghetti-monster/anduril/build-all.sh b/spaghetti-monster/anduril/build-all.sh index 794b285..a4fe894 100755 --- a/spaghetti-monster/anduril/build-all.sh +++ b/spaghetti-monster/anduril/build-all.sh @@ -9,6 +9,7 @@ for TARGET in \ EMISAR_D1 \ EMISAR_D1S \ EMISAR_D4 \ + EMISAR_D4_219c \ EMISAR_D4S \ EMISAR_D4S_219c \ FF_ROT66 \ -- cgit v1.2.3