aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/anduril/config-default.h7
-rw-r--r--spaghetti-monster/anduril/ramp-mode.c16
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