diff options
| author | Selene ToyKeeper | 2020-09-18 23:02:02 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2020-09-18 23:02:02 -0600 |
| commit | c77a7e0add4dec8e0bcefc6027282a24f0a30624 (patch) | |
| tree | c57fef8a4b497b7164c0c2eb028835494ec7f3ae /spaghetti-monster | |
| parent | forgot to add hybrid memory to the documentation (diff) | |
| download | anduril-c77a7e0add4dec8e0bcefc6027282a24f0a30624.tar.gz anduril-c77a7e0add4dec8e0bcefc6027282a24f0a30624.tar.bz2 anduril-c77a7e0add4dec8e0bcefc6027282a24f0a30624.zip | |
added USE_2C_MAX_TURBO option from Tom E
Makes "Ramp 2C" behave like Anduril1 instead of Anduril2.
So it goes to full power turbo in the advanced UI, or ceiling in the simple UI.
Otherwise, default Anduril2 behavior is for "Ramp 2C" to go to/from the ceiling
level... unless already ramped up to that level in advanced mode, in which case
it'll go to full turbo.
Diffstat (limited to 'spaghetti-monster')
| -rw-r--r-- | spaghetti-monster/anduril/config-default.h | 7 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/ramp-mode.c | 16 |
2 files changed, 19 insertions, 4 deletions
diff --git a/spaghetti-monster/anduril/config-default.h b/spaghetti-monster/anduril/config-default.h index 1c2083e..31fcbf4 100644 --- a/spaghetti-monster/anduril/config-default.h +++ b/spaghetti-monster/anduril/config-default.h @@ -66,6 +66,13 @@ #define BLINK_AT_RAMP_CEIL //#define BLINK_AT_STEPS // whenever a discrete ramp mode is passed in smooth mode +// Uncomment for Anduril1 "Ramp 2C" behavior: +// - Ramp 2C goes to turbo (advanced UI) or ceiling (simple UI), like in Anduril1 +// Or comment out to use Anduril2 behavior instead: +// - Ramp 2C goes to ceiling, unless already at ceiling or in simple UI. +// (Advanced UI ceiling 2C goes to turbo) +//#define USE_2C_MAX_TURBO + // make the ramps configurable by the user #define USE_RAMP_CONFIG diff --git a/spaghetti-monster/anduril/ramp-mode.c b/spaghetti-monster/anduril/ramp-mode.c index 6d177cc..944e0e2 100644 --- a/spaghetti-monster/anduril/ramp-mode.c +++ b/spaghetti-monster/anduril/ramp-mode.c @@ -104,12 +104,20 @@ uint8_t steady_state(Event event, uint16_t arg) { // full UI: to/from ceiling if mem < ceiling, // or to/from turbo if mem >= ceiling uint8_t turbo_level; - if ((memorized_level < mode_max) + #ifdef USE_2C_MAX_TURBO // 2C = turbo (Anduril1 behavior) #ifdef USE_SIMPLE_UI - || simple_ui_active + if (simple_ui_active) turbo_level = mode_max; + else #endif - ) { turbo_level = mode_max; } - else { turbo_level = MAX_LEVEL; } + turbo_level = MAX_LEVEL; + #else // 2C = ceiling, unless already at ceiling (Anduril2 default) + if ((memorized_level < mode_max) + #ifdef USE_SIMPLE_UI + || simple_ui_active + #endif + ) { turbo_level = mode_max; } + else { turbo_level = MAX_LEVEL; } + #endif if (actual_level < turbo_level) { // true turbo, not the mode-specific ceiling |
