aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelene ToyKeeper2021-08-31 15:03:48 -0600
committerSelene ToyKeeper2021-08-31 15:03:48 -0600
commit8869bcd869da0451e4a3c12f1e026dad0da2c365 (patch)
tree1285882e72ff804251ba89857a1a469144088d89
parentadded runtime option to choose Anduril 1 or Anduril 2 double-click turbo style (diff)
downloadanduril-8869bcd869da0451e4a3c12f1e026dad0da2c365.tar.gz
anduril-8869bcd869da0451e4a3c12f1e026dad0da2c365.tar.bz2
anduril-8869bcd869da0451e4a3c12f1e026dad0da2c365.zip
added third 2C style: 0 = no turbo (but it's still available as momentary)
(also, adding this reduced the ROM size somehow)
-rw-r--r--spaghetti-monster/anduril/config-default.h4
-rw-r--r--spaghetti-monster/anduril/ramp-mode.c8
2 files changed, 10 insertions, 2 deletions
diff --git a/spaghetti-monster/anduril/config-default.h b/spaghetti-monster/anduril/config-default.h
index 16c7b49..7670df4 100644
--- a/spaghetti-monster/anduril/config-default.h
+++ b/spaghetti-monster/anduril/config-default.h
@@ -92,6 +92,10 @@
//#define USE_2C_MAX_TURBO
// Or uncomment to let the user decide which style they want:
#define USE_2C_STYLE_CONFIG
+// 0 = no turbo
+// 1 = A1 style: Off 2C = ceil, On 2C = turbo
+// 2 = A2 style: Off 2C = ceil, On 2C = ceil, Ramped ceil 2C = turbo
+// All styles allow momentary turbo in advanced UI
//#define DEFAULT_2C_STYLE 2 // default to Anduril 2 style
// make the ramps configurable by the user
diff --git a/spaghetti-monster/anduril/ramp-mode.c b/spaghetti-monster/anduril/ramp-mode.c
index 5317b27..4922e2c 100644
--- a/spaghetti-monster/anduril/ramp-mode.c
+++ b/spaghetti-monster/anduril/ramp-mode.c
@@ -115,7 +115,11 @@ uint8_t steady_state(Event event, uint16_t arg) {
if (simple_ui_active) turbo_level = mode_max;
else
#endif
- if (ramp_2c_style <= 1) turbo_level = MAX_LEVEL;
+ // 0 = no turbo
+ // 1 = Anduril 1 direct to turbo
+ // 2 = Anduril 2 direct to ceiling, or turbo if already at ceiling
+ if (0 == ramp_2c_style) turbo_level = mode_max;
+ else if (1 == ramp_2c_style) turbo_level = MAX_LEVEL;
else {
if (memorized_level < mode_max) { turbo_level = mode_max; }
else { turbo_level = MAX_LEVEL; }
@@ -517,7 +521,7 @@ void ramp_extras_config_save(uint8_t step, uint8_t value) {
// 1 = Anduril 1, 2C turbo
// 2+ = Anduril 2, 2C ceiling
else if (4 == step) {
- if (value) ramp_2c_style = value;
+ ramp_2c_style = value;
}
#endif
}