aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2023-10-28 07:34:07 -0600
committerSelene ToyKeeper2023-10-28 07:34:07 -0600
commit2e192ce780b0a70f11142eb7c33880b0529df6eb (patch)
tree1becea10c591e9cd5948d98f9a41bc9f10f2d7a1 /spaghetti-monster
parentswitched blf-lt1-t1616 from plain PWM to PWM+DSM (diff)
downloadanduril-2e192ce780b0a70f11142eb7c33880b0529df6eb.tar.gz
anduril-2e192ce780b0a70f11142eb7c33880b0529df6eb.tar.bz2
anduril-2e192ce780b0a70f11142eb7c33880b0529df6eb.zip
converted emisar-d18 to new API
(it's mostly the same as FW3A)
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/anduril/cfg-emisar-d18.h39
-rw-r--r--spaghetti-monster/anduril/cfg-fw3a.h10
2 files changed, 32 insertions, 17 deletions
diff --git a/spaghetti-monster/anduril/cfg-emisar-d18.h b/spaghetti-monster/anduril/cfg-emisar-d18.h
index d59199c..3e5d3ae 100644
--- a/spaghetti-monster/anduril/cfg-emisar-d18.h
+++ b/spaghetti-monster/anduril/cfg-emisar-d18.h
@@ -4,25 +4,28 @@
#pragma once
#define MODEL_NUMBER "0141"
-#include "hwdef-Emisar_D18.h"
+#include "hwdef-emisar-d18.h"
#include "hank-cfg.h"
+#define RAMP_SIZE 150
+
// level_calc.py seventh 3 150 7135 1 1.4 117.99 7135 6 1 1706.86 FET 3 10 13000
// (designed to make 1x hit at level 50, and Nx hit at level 100)
-#define RAMP_LENGTH 150
#define PWM1_LEVELS 1,1,2,2,3,4,4,5,6,7,8,9,10,11,15,16,18,20,22,24,26,28,30,33,36,39,43,47,51,56,61,66,72,78,85,92,99,107,116,125,135,145,156,168,180,194,208,222,238,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,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,7,8,10,11,13,14,16,18,19,21,23,26,28,30,33,35,38,41,44,47,51,54,58,62,66,70,75,79,84,90,95,101,106,112,119,126,133,140,147,155,164,172,181,190,200,210,221,232,243,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,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 PWM3_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,0,0,0,0,0,0,0,0,0,0,5,7,9,11,13,15,18,20,23,25,28,31,34,37,40,44,47,51,54,58,62,66,70,75,79,84,89,94,99,104,110,115,121,127,134,140,147,154,161,168,176,183,191,200,208,217,226,235,245,255
-#define MAX_1x7135 50
-#define MAX_Nx7135 100
-#define HALFSPEED_LEVEL 15
-#define QUARTERSPEED_LEVEL 6
+
+#define DEFAULT_LEVEL 50
+#define MAX_1x7135 50
+#define MAX_Nx7135 100
+#define HALFSPEED_LEVEL 15
+#define QUARTERSPEED_LEVEL 6
// start at ~2000 lm after battery change, not ~150 lm (at Emisar's request)
//#define DEFAULT_LEVEL MAX_Nx7135
// go up to ~4000 lm
-#define RAMP_SMOOTH_FLOOR 1
+#define RAMP_SMOOTH_FLOOR 1
#define RAMP_SMOOTH_CEIL 117
// 20 36 52 68 84 [100] 117
#define RAMP_DISCRETE_FLOOR 20
@@ -30,17 +33,29 @@
#define RAMP_DISCRETE_STEPS 7
// safe limit ~20% power / max regulated
-#define SIMPLE_UI_FLOOR 20
-#define SIMPLE_UI_CEIL MAX_Nx7135
-#define SIMPLE_UI_STEPS 5
+// 20 40 60 80 100
+#define SIMPLE_UI_FLOOR 20
+#define SIMPLE_UI_CEIL MAX_Nx7135
+#define SIMPLE_UI_STEPS 5
// only blink at max regulated level and ceiling
-#define BLINK_AT_RAMP_MIDDLE
-#define BLINK_AT_RAMP_MIDDLE_1 MAX_Nx7135
+//#define BLINK_AT_RAMP_MIDDLE
+//#define BLINK_AT_RAMP_MIDDLE_1 MAX_Nx7135
#define BLINK_AT_RAMP_CEIL
+#ifdef BLINK_AT_RAMP_MIDDLE
+#undef BLINK_AT_RAMP_MIDDLE
+#endif
// stop panicking at about ~40% power or ~5000 lm
#define THERM_FASTER_LEVEL 125
+// enable extra features
+#define USE_SMOOTH_STEPS
+
+// for compatibility with other models
+#define USE_SOFT_FACTORY_RESET
+
// too big, turn off extra features
#undef USE_TACTICAL_MODE
+#undef USE_SOS_MODE
+
diff --git a/spaghetti-monster/anduril/cfg-fw3a.h b/spaghetti-monster/anduril/cfg-fw3a.h
index 7a8f417..1802f9b 100644
--- a/spaghetti-monster/anduril/cfg-fw3a.h
+++ b/spaghetti-monster/anduril/cfg-fw3a.h
@@ -15,11 +15,11 @@
#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,2,4,6,8,10,13,15,17,19,22,24,26,29,31,34,37,39,42,45,48,51,54,57,60,64,67,70,74,77,81,85,88,92,96,100,104,108,112,116,121,125,130,134,139,143,148,153,158,163,168,173,179,184,189,195,201,206,212,218,224,230,236,243,249,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0
#define PWM3_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,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,8,19,31,43,55,67,79,91,104,117,130,143,157,170,184,198,212,226,240,255
-#define DEFAULT_LEVEL 50
-#define MAX_1x7135 65
-#define MAX_Nx7135 130
-#define HALFSPEED_LEVEL 15
-#define QUARTERSPEED_LEVEL 6
+#define DEFAULT_LEVEL 50
+#define MAX_1x7135 65
+#define MAX_Nx7135 130
+#define HALFSPEED_LEVEL 15
+#define QUARTERSPEED_LEVEL 6
#define RAMP_SMOOTH_FLOOR 1
#define RAMP_SMOOTH_CEIL MAX_Nx7135
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.