aboutsummaryrefslogtreecommitdiff
path: root/hw/wurkkos/ts25/boost/anduril.h
diff options
context:
space:
mode:
authorSelene ToyKeeper2023-12-06 19:07:31 -0700
committerSelene ToyKeeper2023-12-06 19:07:31 -0700
commit7f9f0f13489ff19bdc499bc825db51b78e7f6e58 (patch)
treef55acf5231537706fff21ab579d7dff0449760e9 /hw/wurkkos/ts25/boost/anduril.h
parentmoved version string calculation to bin/version-string.sh (diff)
downloadanduril-7f9f0f13489ff19bdc499bc825db51b78e7f6e58.tar.gz
anduril-7f9f0f13489ff19bdc499bc825db51b78e7f6e58.tar.bz2
anduril-7f9f0f13489ff19bdc499bc825db51b78e7f6e58.zip
added wurkkos-ts25-boost (early version made from spec, no clue if it works)
Diffstat (limited to '')
-rw-r--r--hw/wurkkos/ts25/boost/anduril.h79
1 files changed, 79 insertions, 0 deletions
diff --git a/hw/wurkkos/ts25/boost/anduril.h b/hw/wurkkos/ts25/boost/anduril.h
new file mode 100644
index 0000000..b2fae56
--- /dev/null
+++ b/hw/wurkkos/ts25/boost/anduril.h
@@ -0,0 +1,79 @@
+// Wurkkos TS25 Boost
+// Copyright (C) 2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
+#define HWDEF_H wurkkos/ts25/boost/hwdef.h
+#include "wurkkos/anduril.h"
+
+// 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
+
+#define VOLTAGE_FUDGE_FACTOR 5 // add 0.25V, not 0.35V
+
+#define RAMP_SIZE 150
+
+// delta-sigma modulated PWM (0b0HHHHHHHHLLLLLLL = 0, 8xHigh, 7xLow bits)
+// level_calc.py 5.01 1 150 7135 0 0.2 2000 --pwm 32640
+// (max is (255 << 7), because it's 8-bit PWM plus 7 bits of DSM)
+#define PWM1_LEVELS 0,1,2,3,4,5,6,7,9,10,12,14,17,19,22,25,28,32,36,41,45,50,56,62,69,76,84,92,101,110,121,132,143,156,169,184,199,215,232,251,270,291,313,336,360,386,414,442,473,505,539,574,612,651,693,736,782,829,880,932,987,1045,1105,1168,1233,1302,1374,1449,1527,1608,1693,1781,1873,1969,2068,2172,2279,2391,2507,2628,2753,2883,3018,3158,3303,3454,3609,3771,3938,4111,4289,4475,4666,4864,5068,5280,5498,5724,5957,6197,6445,6701,6965,7237,7518,7808,8106,8413,8730,9056,9392,9737,10093,10459,10835,11223,11621,12031,12452,12884,13329,13786,14255,14737,15232,15741,16262,16798,17347,17911,18489,19082,19691,20314,20954,21609,22281,22969,23674,24397,25137,25895,26671,27465,28279,29111,29963,30835,31727,32640
+#define MIN_THERM_STEPDOWN 50
+#define DEFAULT_LEVEL 70
+#define MAX_1x7135 150
+// moon at 1/4th speed for max runtime
+// the rest at half speed, to reduce ripple
+// but not full speed because 8 kHz PWM is enough for this circuit
+// and speed changes make a big visible bump
+#define HALFSPEED_LEVEL 255
+#define QUARTERSPEED_LEVEL 2
+
+#define RAMP_SMOOTH_FLOOR 1
+#define RAMP_SMOOTH_CEIL 150
+// 10, 30, 50, [70], 90, 110, 130
+#define RAMP_DISCRETE_FLOOR 10
+#define RAMP_DISCRETE_CEIL 130
+#define RAMP_DISCRETE_STEPS 7
+
+// at Wurkkos's request, reduce the Simple UI ceiling a little bit
+// 25 50 [75] 100 125
+#define SIMPLE_UI_FLOOR 25
+#define SIMPLE_UI_CEIL 125
+#define SIMPLE_UI_STEPS 5
+
+// stop panicking at ~50% power
+#define THERM_FASTER_LEVEL 120 // throttle back faster when high
+
+#define BLINK_BRIGHTNESS 50
+#define BLINK_ONCE_TIME 12
+
+// show each channel while it scroll by in the menu
+#define USE_CONFIG_COLORS
+
+// blink numbers on the main LEDs by default
+// (so battcheck will be visible while charging)
+#define DEFAULT_BLINK_CHANNEL CM_MAIN
+// blink numbers on the aux LEDs by default
+//#define DEFAULT_BLINK_CHANNEL CM_AUXWHT
+
+// slow down party strobe; this driver can't pulse for 2ms or less
+#define PARTY_STROBE_ONTIME 3
+
+// use aux red + aux blue for police strobe
+#define USE_POLICE_COLOR_STROBE_MODE
+#define POLICE_STROBE_USES_AUX
+#define POLICE_COLOR_STROBE_CH1 CM_AUXRED
+#define POLICE_COLOR_STROBE_CH2 CM_AUXBLU
+
+// the default of 26 looks a bit rough, so increase it to make it smoother
+#define CANDLE_AMPLITUDE 33
+
+// don't blink mid-ramp
+#ifdef BLINK_AT_RAMP_MIDDLE
+#undef BLINK_AT_RAMP_MIDDLE
+#endif
+