aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2023-04-07 17:06:08 -0600
committerSelene ToyKeeper2023-04-07 17:06:08 -0600
commitf4430bb7f2bcef62e6563f9c436b9a24d4482532 (patch)
treefdf8d73cebe9193147c9922d5152df54f3171020 /spaghetti-monster
parentadded a "tactical mode" on "Off -> 6C" (diff)
downloadanduril-f4430bb7f2bcef62e6563f9c436b9a24d4482532.tar.gz
anduril-f4430bb7f2bcef62e6563f9c436b9a24d4482532.tar.bz2
anduril-f4430bb7f2bcef62e6563f9c436b9a24d4482532.zip
merging gchart's changes, part 1...
+ added Sofirn LT1S Pro + added Sofirn SC21 Pro + added Wurkkos TS10 + added Wurkkos TS25 * small changes to other models * improved dual voltage support + added attiny1616 flashing python script w/ pymcuprog These changes are incomplete. It does not yet include: - extended simple UI - t1616 WDT reset detection - gchart's OUTPUT_MUX code (I plan to rewrite the entire tint system)
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/anduril/BRANDS1
-rw-r--r--spaghetti-monster/anduril/MODELS4
-rw-r--r--spaghetti-monster/anduril/aux-leds.c11
-rw-r--r--spaghetti-monster/anduril/cfg-mateminco-mt35-mini.h5
-rw-r--r--spaghetti-monster/anduril/cfg-sofirn-lt1s-pro.c22
-rw-r--r--spaghetti-monster/anduril/cfg-sofirn-lt1s-pro.h90
-rw-r--r--spaghetti-monster/anduril/cfg-sofirn-sc21-pro.h10
-rw-r--r--spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h6
-rw-r--r--spaghetti-monster/anduril/cfg-wurkkos-ts10.h82
-rw-r--r--spaghetti-monster/anduril/cfg-wurkkos-ts25.h78
10 files changed, 309 insertions, 0 deletions
diff --git a/spaghetti-monster/anduril/BRANDS b/spaghetti-monster/anduril/BRANDS
index 4e73002..059f311 100644
--- a/spaghetti-monster/anduril/BRANDS
+++ b/spaghetti-monster/anduril/BRANDS
@@ -7,4 +7,5 @@ Lumintop 0300 - 0399
Fireflies 0400 - 0499
Mateminco 0500 - 0599
Sofirn 0600 - 0699
+Wurkkos 0700 - 0799
gChart 1600 - 1699
diff --git a/spaghetti-monster/anduril/MODELS b/spaghetti-monster/anduril/MODELS
index 3071b60..dfe1190 100644
--- a/spaghetti-monster/anduril/MODELS
+++ b/spaghetti-monster/anduril/MODELS
@@ -59,7 +59,11 @@ Model Name MCU
0614 sofirn-sp36-t1616 attiny1616
0621 blf-lantern attiny85
0622 blf-lantern-t1616 attiny1616
+0623 sofirn-lt1s-pro attiny1616
0631 sofirn-sp10-pro attiny1616
+0632 sofirn-sc21-pro attiny1616
+0714 wurkkos-ts10 attiny1616
+0715 wurkkos-ts25 attiny1616
1618 gchart-fet1-t1616 attiny1616
Duplicates:
diff --git a/spaghetti-monster/anduril/aux-leds.c b/spaghetti-monster/anduril/aux-leds.c
index a3b905e..bb184f9 100644
--- a/spaghetti-monster/anduril/aux-leds.c
+++ b/spaghetti-monster/anduril/aux-leds.c
@@ -27,14 +27,21 @@
void indicator_led_update(uint8_t mode, uint8_t tick) {
//uint8_t volts = voltage; // save a few bytes by caching volatile value
// turn off when battery is too low
+ #ifdef DUAL_VOLTAGE_FLOOR
+ if (((voltage < VOLTAGE_LOW) && (voltage > DUAL_VOLTAGE_FLOOR))
+ || (voltage < DUAL_VOLTAGE_LOW_LOW)) {
+ #else
if (voltage < VOLTAGE_LOW) {
+ #endif
indicator_led(0);
}
//#ifdef USE_INDICATOR_LOW_BAT_WARNING
+ #ifndef DUAL_VOLTAGE_FLOOR // this isn't set up for dual-voltage lights like the Sofirn SP10 Pro
// fast blink a warning when battery is low but not critical
else if (voltage < VOLTAGE_RED) {
indicator_led(mode & (((tick & 0b0010)>>1) - 3));
}
+ #endif
//#endif
// normal steady output, 0/1/2 = off / low / high
else if ((mode & 0b00001111) < 3) {
@@ -96,7 +103,11 @@ void rgb_led_update(uint8_t mode, uint8_t arg) {
// turn off aux LEDs when battery is empty
// (but if voltage==0, that means we just booted and don't know yet)
uint8_t volts = voltage; // save a few bytes by caching volatile value
+ #ifdef DUAL_VOLTAGE_FLOOR
+ if ((volts) && (((voltage < VOLTAGE_LOW) && (voltage > DUAL_VOLTAGE_FLOOR)) || (voltage < DUAL_VOLTAGE_LOW_LOW))) {
+ #else
if ((volts) && (volts < VOLTAGE_LOW)) {
+ #endif
rgb_led_set(0);
#ifdef USE_BUTTON_LED
button_led_set(0);
diff --git a/spaghetti-monster/anduril/cfg-mateminco-mt35-mini.h b/spaghetti-monster/anduril/cfg-mateminco-mt35-mini.h
index c5b40e2..d7264a2 100644
--- a/spaghetti-monster/anduril/cfg-mateminco-mt35-mini.h
+++ b/spaghetti-monster/anduril/cfg-mateminco-mt35-mini.h
@@ -51,4 +51,9 @@
#define USE_SIMPLE_UI_RAMPING_TOGGLE
// too big, turn off extra features
+//#undef USE_SOS_MODE
+//#undef USE_RAMP_AFTER_MOON_CONFIG
+//#undef USE_RAMP_SPEED_CONFIG
+//#undef USE_VOLTAGE_CORRECTION
+//#undef USE_2C_STYLE_CONFIG
#undef USE_TACTICAL_MODE
diff --git a/spaghetti-monster/anduril/cfg-sofirn-lt1s-pro.c b/spaghetti-monster/anduril/cfg-sofirn-lt1s-pro.c
new file mode 100644
index 0000000..571bbdc
--- /dev/null
+++ b/spaghetti-monster/anduril/cfg-sofirn-lt1s-pro.c
@@ -0,0 +1,22 @@
+// this is inserted into fsm-ramping.c :: set_level()
+// (it overrides part of the function, but not all of it)
+uint8_t output_mux; // pre-define this variable since the overrides file gets included before the ramp-mode.h file
+inline void set_level_override(uint8_t level) {
+ if (level == 0) { // off
+ TINT1_LVL = 0; // disable the first white channel
+ TINT2_LVL = 0; // disable the second white channel
+ PWM3_LVL = 0; // disable the red LEDs
+ } else {
+ level --;
+
+ if (output_mux == 0) { // main white LEDs
+ PWM3_LVL = 0; // disable the red LEDs
+ PWM1_LVL = PWM_GET(pwm1_levels, level); // get the PWM value
+ update_tint(); // set the warm-cool level balance
+ } else { // red LEDs
+ TINT1_LVL = 0; // disable the first white channel
+ TINT2_LVL = 0; // disable the second white channel
+ PWM3_LVL = PWM_GET(pwm1_levels, level); // set the red LED PWM
+ }
+ }
+} \ No newline at end of file
diff --git a/spaghetti-monster/anduril/cfg-sofirn-lt1s-pro.h b/spaghetti-monster/anduril/cfg-sofirn-lt1s-pro.h
new file mode 100644
index 0000000..4e5993b
--- /dev/null
+++ b/spaghetti-monster/anduril/cfg-sofirn-lt1s-pro.h
@@ -0,0 +1,90 @@
+// Sofirn LT1S Pro
+#define MODEL_NUMBER "0623"
+#include "hwdef-Sofirn_LT1S-Pro.h"
+// ATTINY: 1616
+// this model requires some special code
+#define OVERRIDES_FILE cfg-sofirn-lt1s-pro.c
+#define OVERRIDE_SET_LEVEL
+inline void set_level_override(uint8_t level);
+
+// uses 4C action while On to switch between white and red channels (overrides lockout action)
+#define USE_OUTPUT_MUX
+
+// the button lights up
+#define USE_INDICATOR_LED
+// the button is visible while main LEDs are on
+#define USE_INDICATOR_LED_WHILE_RAMPING
+// off mode: high (1)
+// lockout: blinking (3)
+#define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 1)
+
+// the lantern has two PWM channels, but they drive different sets of emitters
+// (one channel for warm emitters, one channel for cold)
+// so enable a special ramping mode which changes tint instead of brightness
+#define USE_TINT_RAMPING
+// how much to increase total brightness at middle tint
+// (0 = 100% brightness, 64 = 200% brightness)
+#define TINT_RAMPING_CORRECTION 10 // 115%
+
+#ifdef RAMP_LENGTH
+#undef RAMP_LENGTH
+#endif
+
+// level_calc.py 1 150 7135 1 30 800
+#define RAMP_LENGTH 150
+#define PWM1_LEVELS 1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,11,11,12,13,13,14,15,15,16,17,18,18,19,20,21,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,43,44,45,46,48,49,50,51,53,54,56,57,58,60,61,63,64,66,67,69,70,72,74,75,77,79,80,82,84,85,87,89,91,93,95,97,98,100,102,104,106,108,111,113,115,117,119,121,124,126,128,130,133,135,137,140,142,145,147,150,152,155,157,160,163,165,168,171,173,176,179,182,185,188,190,193,196,199,202,205,209,212,215,218,221,224,228,231,234,238,241,245,248,251,255
+#define MAX_1x7135 65
+#define HALFSPEED_LEVEL 256 // red LEDs use a QX7138 chip which has max PWM speed of 10 kHz, so never run faster than halfspeed
+#define QUARTERSPEED_LEVEL 5
+
+// the default of 26 looks a bit flat, so increase it
+#define CANDLE_AMPLITUDE 40
+
+// override default ramp style
+#undef RAMP_STYLE
+#define RAMP_STYLE 1 // 0 = smooth, 1 = stepped
+// set floor and ceiling as far apart as possible
+// because this lantern isn't overpowered
+#define RAMP_SMOOTH_FLOOR 1
+#define RAMP_SMOOTH_CEIL 150
+#define RAMP_DISCRETE_FLOOR 10
+#define RAMP_DISCRETE_CEIL RAMP_SMOOTH_CEIL
+#define RAMP_DISCRETE_STEPS 5
+
+// LT1S can handle heat well, so don't limit simple mode
+#define SIMPLE_UI_FLOOR RAMP_DISCRETE_FLOOR
+#define SIMPLE_UI_CEIL RAMP_DISCRETE_CEIL
+#define SIMPLE_UI_STEPS RAMP_DISCRETE_STEPS
+
+// Allow 3C in Simple UI for switching between smooth and stepped ramping
+#define USE_SIMPLE_UI_RAMPING_TOGGLE
+
+// allow Aux Config and Strobe Modes in Simple UI
+#define USE_EXTENDED_SIMPLE_UI
+
+// enable 2 click turbo (Anduril 1 style)
+#define DEFAULT_2C_STYLE 1
+
+#define USE_SOS_MODE
+#define USE_SOS_MODE_IN_BLINKY_GROUP
+
+// the sensor (attiny) is nowhere near the emitters
+// so thermal regulation can't work
+#ifdef USE_THERMAL_REGULATION
+#undef USE_THERMAL_REGULATION
+#endif
+
+// don't blink while ramping
+#ifdef BLINK_AT_RAMP_MIDDLE
+#undef BLINK_AT_RAMP_MIDDLE
+#endif
+#ifdef BLINK_AT_RAMP_FLOOR
+#undef BLINK_AT_RAMP_FLOOR
+#endif
+#ifdef BLINK_AT_RAMP_CEIL
+#undef BLINK_AT_RAMP_CEIL
+#endif
+
+#ifndef USE_SOFT_FACTORY_RESET
+#define USE_SOFT_FACTORY_RESET
+#endif \ No newline at end of file
diff --git a/spaghetti-monster/anduril/cfg-sofirn-sc21-pro.h b/spaghetti-monster/anduril/cfg-sofirn-sc21-pro.h
new file mode 100644
index 0000000..cee8172
--- /dev/null
+++ b/spaghetti-monster/anduril/cfg-sofirn-sc21-pro.h
@@ -0,0 +1,10 @@
+// Sofirn SC21 Pro - same setup as a Wurkkos TS10, but with the aux indicator on while ramping
+#include "cfg-wurkkos-ts10.h"
+#undef MODEL_NUMBER
+#define MODEL_NUMBER "0632"
+// ATTINY: 1616
+
+// turn on the aux LED while main LED is on
+#ifndef USE_INDICATOR_LED_WHILE_RAMPING
+#define USE_INDICATOR_LED_WHILE_RAMPING
+#endif
diff --git a/spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h b/spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h
index bcfc80e..c1f1ed8 100644
--- a/spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h
+++ b/spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h
@@ -3,7 +3,13 @@
#include "hwdef-Sofirn_SP10-Pro.h"
// ATTINY: 1616
+// don't blink during the ramp or at the ceiling
+#ifdef BLINK_AT_RAMP_MIDDLE
#undef BLINK_AT_RAMP_MIDDLE
+#endif
+#ifdef BLINK_AT_RAMP_CEIL
+#undef BLINK_AT_RAMP_CEIL
+#endif
#define USE_DYNAMIC_UNDERCLOCKING
diff --git a/spaghetti-monster/anduril/cfg-wurkkos-ts10.h b/spaghetti-monster/anduril/cfg-wurkkos-ts10.h
new file mode 100644
index 0000000..6f92abf
--- /dev/null
+++ b/spaghetti-monster/anduril/cfg-wurkkos-ts10.h
@@ -0,0 +1,82 @@
+// Wurkkos TS10 (originally used Sofirn SP36-t1616 firmware) config options for Anduril using the Attiny1616
+// same as the BLF Q8 T1616, mostly (added Dynamic PWM)
+#define MODEL_NUMBER "0714"
+#include "hwdef-Wurkkos_TS10.h"
+// ATTINY: 1616
+
+// uses forward-facing aux LEDs
+#define USE_INDICATOR_LED
+// don't turn on the aux LEDs while main LEDs are on
+#ifdef USE_INDICATOR_LED_WHILE_RAMPING
+#undef USE_INDICATOR_LED_WHILE_RAMPING
+#endif
+// the high button LED mode on this light uses too much power, default to low
+// off mode: low (1)
+// lockout: blinking (3)
+#define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 1)
+
+// voltage readings were a little high with the Q8 value
+#undef VOLTAGE_FUDGE_FACTOR
+#define VOLTAGE_FUDGE_FACTOR 5 // add 0.25V, not 0.35V
+
+/*
+// copied from Emisar D4 ramp
+// ../../bin/level_calc.py 1 65 7135 1 0.8 150
+// ... mixed with this:
+// ../../bin/level_calc.py 2 150 7135 4 0.33 150 FET 1 10 1500
+#define RAMP_LENGTH 150
+#define PWM1_LEVELS 1,1,2,2,3,3,4,4,5,6,7,8,9,10,12,13,14,15,17,19,20,22,24,26,29,31,34,36,39,42,45,48,51,55,59,62,66,70,75,79,84,89,93,99,104,110,115,121,127,134,140,147,154,161,168,176,184,192,200,209,217,226,236,245,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0
+#define PWM2_LEVELS 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,5,7,8,9,11,12,14,15,17,19,20,22,24,25,27,29,31,33,35,37,39,41,43,45,48,50,52,55,57,59,62,64,67,70,72,75,78,81,84,87,90,93,96,99,102,105,109,112,115,119,122,126,129,133,137,141,144,148,152,156,160,165,169,173,177,182,186,191,195,200,205,209,214,219,224,229,234,239,244,250,255
+#define MAX_1x7135 65
+#define HALFSPEED_LEVEL 14
+#define QUARTERSPEED_LEVEL 5
+*/
+// level 1 by hand, for the rest
+// level_calc.py 7.01 2 149 7135 3 0.5 125 FET 1 10 1200 --pwm dyn:63:2048:255
+#define RAMP_LENGTH 150
+#define USE_DYN_PWM
+#define PWM1_LEVELS 1,3,3,4,5,6,7,8,9,10,12,13,14,16,17,19,20,22,24,25,27,29,31,33,35,37,40,42,44,47,49,52,54,57,59,62,64,67,70,72,75,77,80,82,85,87,89,91,93,95,96,98,99,100,100,101,100,100,99,97,95,93,90,86,82,87,91,96,100,106,111,116,122,128,134,141,147,155,162,169,177,186,194,203,213,222,232,243,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0
+#define PWM2_LEVELS 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,6,7,9,11,12,14,16,18,20,22,24,27,29,31,34,37,39,42,45,48,51,54,57,61,64,68,72,75,79,83,88,92,97,101,106,111,116,121,126,132,138,144,150,156,162,169,176,183,190,197,205,213,221,229,237,246,255
+#define PWM_TOPS 2047,2047,1198,1322,1584,1676,1701,1691,1662,1622,1774,1703,1631,1692,1613,1639,1558,1564,1559,1478,1464,1444,1420,1392,1361,1329,1331,1293,1256,1246,1207,1192,1152,1133,1094,1074,1035,1013,991,954,932,897,875,842,820,790,760,731,704,678,646,622,593,566,534,510,478,452,423,393,364,338,310,280,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
+#define MAX_1x7135 90
+#define HALFSPEED_LEVEL 2
+#define QUARTERSPEED_LEVEL 2
+
+#define RAMP_SMOOTH_FLOOR 1
+#define RAMP_SMOOTH_CEIL 120
+// 10 28 46 [65] 83 101 120
+#define RAMP_DISCRETE_FLOOR 10
+#define RAMP_DISCRETE_CEIL RAMP_SMOOTH_CEIL
+#define RAMP_DISCRETE_STEPS 7
+
+// at Wurkkos's request, reduce the Simple UI ceiling a little bit
+#define SIMPLE_UI_FLOOR RAMP_DISCRETE_FLOOR
+#define SIMPLE_UI_CEIL 144
+#define SIMPLE_UI_STEPS 5
+
+// enable 2 click turbo (Anduril 1 style)
+#define DEFAULT_2C_STYLE 1
+
+// enable SOS in the blinkies group
+#define USE_SOS_MODE
+#define USE_SOS_MODE_IN_BLINKY_GROUP
+
+// Allow 3C in Simple UI for switching between smooth and stepped ramping
+#define USE_SIMPLE_UI_RAMPING_TOGGLE
+
+// allow Aux Config and Strobe Modes in Simple UI
+#define USE_EXTENDED_SIMPLE_UI
+
+// enable factory reset on 13H without loosening tailcap
+#define USE_SOFT_FACTORY_RESET
+
+// stop panicking at ~55% power
+#define THERM_FASTER_LEVEL 130 // throttle back faster when high
+
+// don't blink during the ramp or at the ceiling
+#ifdef BLINK_AT_RAMP_MIDDLE
+#undef BLINK_AT_RAMP_MIDDLE
+#endif
+#ifdef BLINK_AT_RAMP_CEIL
+#undef BLINK_AT_RAMP_CEIL
+#endif \ No newline at end of file
diff --git a/spaghetti-monster/anduril/cfg-wurkkos-ts25.h b/spaghetti-monster/anduril/cfg-wurkkos-ts25.h
new file mode 100644
index 0000000..a339cdb
--- /dev/null
+++ b/spaghetti-monster/anduril/cfg-wurkkos-ts25.h
@@ -0,0 +1,78 @@
+// Wurkkos TS25, modelled after the TS10 but with RGB Aux
+#define MODEL_NUMBER "0715"
+#include "hwdef-Wurkkos_TS25.h"
+// ATTINY: 1616
+
+// this light has three aux LED channels: R, G, B
+#define USE_AUX_RGB_LEDS
+
+// don't turn on the aux LEDs while main LEDs are on
+#ifdef USE_INDICATOR_LED_WHILE_RAMPING
+#undef USE_INDICATOR_LED_WHILE_RAMPING
+#endif
+
+// voltage readings were a little high with the Q8 value
+#undef VOLTAGE_FUDGE_FACTOR
+#define VOLTAGE_FUDGE_FACTOR 5 // add 0.25V, not 0.35V
+
+/*
+// copied from Emisar D4 ramp
+// ../../bin/level_calc.py 1 65 7135 1 0.8 150
+// ... mixed with this:
+// ../../bin/level_calc.py 2 150 7135 4 0.33 150 FET 1 10 1500
+#define RAMP_LENGTH 150
+#define PWM1_LEVELS 1,1,2,2,3,3,4,4,5,6,7,8,9,10,12,13,14,15,17,19,20,22,24,26,29,31,34,36,39,42,45,48,51,55,59,62,66,70,75,79,84,89,93,99,104,110,115,121,127,134,140,147,154,161,168,176,184,192,200,209,217,226,236,245,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0
+#define PWM2_LEVELS 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,5,7,8,9,11,12,14,15,17,19,20,22,24,25,27,29,31,33,35,37,39,41,43,45,48,50,52,55,57,59,62,64,67,70,72,75,78,81,84,87,90,93,96,99,102,105,109,112,115,119,122,126,129,133,137,141,144,148,152,156,160,165,169,173,177,182,186,191,195,200,205,209,214,219,224,229,234,239,244,250,255
+#define MAX_1x7135 65
+#define HALFSPEED_LEVEL 14
+#define QUARTERSPEED_LEVEL 5
+*/
+// level 1 by hand, for the rest
+// level_calc.py 7.01 2 149 7135 3 0.5 125 FET 1 10 1200 --pwm dyn:63:2048:255
+#define RAMP_LENGTH 150
+#define USE_DYN_PWM
+#define PWM1_LEVELS 1,3,3,4,5,6,7,8,9,10,12,13,14,16,17,19,20,22,24,25,27,29,31,33,35,37,40,42,44,47,49,52,54,57,59,62,64,67,70,72,75,77,80,82,85,87,89,91,93,95,96,98,99,100,100,101,100,100,99,97,95,93,90,86,82,87,91,96,100,106,111,116,122,128,134,141,147,155,162,169,177,186,194,203,213,222,232,243,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0
+#define PWM2_LEVELS 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,6,7,9,11,12,14,16,18,20,22,24,27,29,31,34,37,39,42,45,48,51,54,57,61,64,68,72,75,79,83,88,92,97,101,106,111,116,121,126,132,138,144,150,156,162,169,176,183,190,197,205,213,221,229,237,246,255
+#define PWM_TOPS 2047,2047,1198,1322,1584,1676,1701,1691,1662,1622,1774,1703,1631,1692,1613,1639,1558,1564,1559,1478,1464,1444,1420,1392,1361,1329,1331,1293,1256,1246,1207,1192,1152,1133,1094,1074,1035,1013,991,954,932,897,875,842,820,790,760,731,704,678,646,622,593,566,534,510,478,452,423,393,364,338,310,280,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
+#define MAX_1x7135 90
+#define HALFSPEED_LEVEL 2
+#define QUARTERSPEED_LEVEL 2
+
+#define RAMP_SMOOTH_FLOOR 1
+#define RAMP_SMOOTH_CEIL 120
+// 10 28 46 [65] 83 101 120
+#define RAMP_DISCRETE_FLOOR 10
+#define RAMP_DISCRETE_CEIL RAMP_SMOOTH_CEIL
+#define RAMP_DISCRETE_STEPS 7
+
+// at Wurkkos's request, reduce the Simple UI ceiling a little bit
+#define SIMPLE_UI_FLOOR RAMP_DISCRETE_FLOOR
+#define SIMPLE_UI_CEIL 135
+#define SIMPLE_UI_STEPS 5
+
+// enable 2 click turbo (Anduril 1 style)
+#define DEFAULT_2C_STYLE 1
+
+// enable SOS in the blinkies group
+#define USE_SOS_MODE
+#define USE_SOS_MODE_IN_BLINKY_GROUP
+
+// Allow 3C in Simple UI for switching between smooth and stepped ramping
+#define USE_SIMPLE_UI_RAMPING_TOGGLE
+
+// allow Aux Config and Strobe Modes in Simple UI
+#define USE_EXTENDED_SIMPLE_UI
+
+// enable factory reset on 13H without loosening tailcap
+#define USE_SOFT_FACTORY_RESET
+
+// stop panicking at ~55% power
+#define THERM_FASTER_LEVEL 130 // throttle back faster when high
+
+// don't blink during the ramp or at the ceiling
+#ifdef BLINK_AT_RAMP_MIDDLE
+#undef BLINK_AT_RAMP_MIDDLE
+#endif
+#ifdef BLINK_AT_RAMP_CEIL
+#undef BLINK_AT_RAMP_CEIL
+#endif \ No newline at end of file
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.