aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorGabriel Hart2021-10-29 12:32:30 -0500
committerGabriel Hart2021-10-29 12:32:30 -0500
commit17027a533661d14082f6566848bfb9cd122d03c6 (patch)
treedb1c2baf2697bf153a911e3ea8f464bd3d466b30 /spaghetti-monster
parentSP10 Pro: lower AA LVP to 0.7v (diff)
downloadanduril-17027a533661d14082f6566848bfb9cd122d03c6.tar.gz
anduril-17027a533661d14082f6566848bfb9cd122d03c6.tar.bz2
anduril-17027a533661d14082f6566848bfb9cd122d03c6.zip
Add thefreeman's DAC linear driver (beta); also update Sofirn bilds to use the new 2C_STYLE defines
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/anduril/cfg-blf-lantern.h4
-rw-r--r--spaghetti-monster/anduril/cfg-blf-q8-t1616.h4
-rw-r--r--spaghetti-monster/anduril/cfg-blf-q8.h4
-rw-r--r--spaghetti-monster/anduril/cfg-thefreeman-lin16dac.h45
-rw-r--r--spaghetti-monster/anduril/version.h2
5 files changed, 52 insertions, 7 deletions
diff --git a/spaghetti-monster/anduril/cfg-blf-lantern.h b/spaghetti-monster/anduril/cfg-blf-lantern.h
index ff28a98..a989ca4 100644
--- a/spaghetti-monster/anduril/cfg-blf-lantern.h
+++ b/spaghetti-monster/anduril/cfg-blf-lantern.h
@@ -53,8 +53,8 @@
#define SIMPLE_UI_CEIL RAMP_DISCRETE_CEIL
#define SIMPLE_UI_STEPS RAMP_DISCRETE_STEPS
-// also at Sofirn's request, enable 2 click turbo
-#define USE_2C_MAX_TURBO
+// also at Sofirn's request, enable 2 click turbo (Anduril 1 style)
+#define DEFAULT_2C_STYLE 1
#define USE_SOS_MODE
#define USE_SOS_MODE_IN_BLINKY_GROUP
diff --git a/spaghetti-monster/anduril/cfg-blf-q8-t1616.h b/spaghetti-monster/anduril/cfg-blf-q8-t1616.h
index 340faa1..30a3368 100644
--- a/spaghetti-monster/anduril/cfg-blf-q8-t1616.h
+++ b/spaghetti-monster/anduril/cfg-blf-q8-t1616.h
@@ -34,8 +34,8 @@
#define SIMPLE_UI_CEIL 150
#define SIMPLE_UI_STEPS 5
-// also at Sofirn's request, enable 2 click turbo
-#define USE_2C_MAX_TURBO
+// also at Sofirn's request, enable 2 click turbo (Anduril 1 style)
+#define DEFAULT_2C_STYLE 1
// enable SOS in the blinkies group
#define USE_SOS_MODE
diff --git a/spaghetti-monster/anduril/cfg-blf-q8.h b/spaghetti-monster/anduril/cfg-blf-q8.h
index 00bdd8a..6a5055c 100644
--- a/spaghetti-monster/anduril/cfg-blf-q8.h
+++ b/spaghetti-monster/anduril/cfg-blf-q8.h
@@ -33,8 +33,8 @@
#define SIMPLE_UI_CEIL 150
#define SIMPLE_UI_STEPS 5
-// also at Sofirn's request, enable 2 click turbo
-#define USE_2C_MAX_TURBO
+// also at Sofirn's request, enable 2 click turbo (Anduril 1 style)
+#define DEFAULT_2C_STYLE 1
// enable SOS in the blinkies group
#define USE_SOS_MODE
diff --git a/spaghetti-monster/anduril/cfg-thefreeman-lin16dac.h b/spaghetti-monster/anduril/cfg-thefreeman-lin16dac.h
new file mode 100644
index 0000000..64dcd8c
--- /dev/null
+++ b/spaghetti-monster/anduril/cfg-thefreeman-lin16dac.h
@@ -0,0 +1,45 @@
+// thefreeman's Linear 16 driver using DAC control
+#define MODEL_NUMBER "0000" // TBD
+#include "hwdef-thefreeman-lin16dac.h"
+// ATTINY: 1616
+
+// 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: low (1)
+// lockout: blinking (3)
+#define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 1)
+
+#undef BLINK_AT_RAMP_MIDDLE
+
+// We're abusing the Dynamic PWM functionality to set the VREF instead of PWM TOP.
+// We don't want the Gradual functionality to mess with the PWM_TOP value.
+#ifdef USE_SET_LEVEL_GRADUALLY
+#undef USE_SET_LEVEL_GRADUALLY
+#endif
+
+// level_calc.py ninth 2 150 7135 1 0.03 6.4 7135 1 6.3 1600
+#define RAMP_LENGTH 150
+#define USE_DYN_PWM
+
+// PWM1: DAC Data, PWM Tops: VREF selector
+#define PWM1_LEVELS 25,25,33,41,41,50,58,66,75,83,92,108,117,133,150,167,192,209,234,58,64,71,80,90,99,110,121,134,149,163,180,198,218,241,1,1,1,1,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,5,5,6,6,7,7,8,8,9,10,11,11,12,13,14,15,16,18,19,20,22,23,25,26,28,30,32,34,36,39,41,44,47,50,53,56,59,63,67,71,75,79,84,89,94,100,105,112,118,124,131,139,146,154,163,172,181,191,201,212,223,234,246,57,60,63,66,69,73,76,80,84,88,93,97,102,107,112,117,123,129,135,141,147,154,161,169,176,184,193,201,210,220,229,239,250,255
+#define PWM_TOPS 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18
+
+#define MAX_1x7135 34
+#define HALFSPEED_LEVEL 14
+#define QUARTERSPEED_LEVEL 6
+
+#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
+
+// stop panicking at ~30% power
+#define THERM_FASTER_LEVEL 123
+
+// enable 2 click turbo
+#define DEFAULT_2C_STYLE 1
diff --git a/spaghetti-monster/anduril/version.h b/spaghetti-monster/anduril/version.h
index 0da142b..7560ef2 100644
--- a/spaghetti-monster/anduril/version.h
+++ b/spaghetti-monster/anduril/version.h
@@ -1 +1 @@
-#define VERSION_NUMBER "20210920"
+#define VERSION_NUMBER "20211029"
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.