aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2019-12-11 00:59:20 -0700
committerSelene ToyKeeper2019-12-11 00:59:20 -0700
commit1a7a2b70d83882f71ddb59080f2cac82085a3b26 (patch)
tree6d3d2c3825cc2b641503db8cbaaa6cddb23e7da2 /spaghetti-monster
parentadded a compile-time flag to enable/disable momentary mode (suggested by Agro) (diff)
downloadanduril-1a7a2b70d83882f71ddb59080f2cac82085a3b26.tar.gz
anduril-1a7a2b70d83882f71ddb59080f2cac82085a3b26.tar.bz2
anduril-1a7a2b70d83882f71ddb59080f2cac82085a3b26.zip
added support for Fireflies ROT66 G2 and PL47 G2
Diffstat (limited to '')
-rw-r--r--spaghetti-monster/anduril/cfg-ff-pl47g2.h60
-rw-r--r--spaghetti-monster/anduril/cfg-ff-rot66g2.h49
2 files changed, 109 insertions, 0 deletions
diff --git a/spaghetti-monster/anduril/cfg-ff-pl47g2.h b/spaghetti-monster/anduril/cfg-ff-pl47g2.h
new file mode 100644
index 0000000..d5dd79d
--- /dev/null
+++ b/spaghetti-monster/anduril/cfg-ff-pl47g2.h
@@ -0,0 +1,60 @@
+// Fireflies PL47 G2 config options for Anduril
+#include "hwdef-FF_PL47.h"
+
+// the button lights up
+#define USE_INDICATOR_LED
+// the aux LEDs are in the same place as the main LEDs
+#ifdef USE_INDICATOR_LED_WHILE_RAMPING
+#undef USE_INDICATOR_LED_WHILE_RAMPING
+#endif
+// enable blinking indicator LED while off?
+#define TICK_DURING_STANDBY
+#define STANDBY_TICK_SPEED 3 // every 0.128 s
+#define USE_FANCIER_BLINKING_INDICATOR
+
+// If TICK_DURING_STANDBY is enabled...
+// off mode: low (1)
+// lockout: blinking (3)
+#define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 1)
+
+
+#define RAMP_LENGTH 150
+
+// driver is a FET + 3x7135, ~400 lm at highest regulated level
+// ramp copied from Emisar D4S ramp
+#define PWM1_LEVELS 1,1,2,2,3,3,4,4,5,5,6,6,7,8,8,9,10,10,11,12,13,14,15,16,17,18,19,21,22,23,25,26,27,29,31,32,34,36,38,40,42,44,46,49,51,54,56,59,62,65,68,71,74,78,81,85,89,93,97,101,106,110,115,120,125,130,136,141,147,153,160,166,173,180,187,195,202,210,219,227,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,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,1,3,4,5,7,8,10,11,13,14,16,18,19,21,23,25,27,29,31,34,36,38,41,43,46,48,51,54,57,60,63,66,69,72,76,79,83,87,91,95,99,103,107,112,116,121,126,131,136,141,146,152,158,163,169,175,182,188,195,202,209,216,223,231,239,247,255
+#define MAX_1x7135 83
+#define HALFSPEED_LEVEL 13
+#define QUARTERSPEED_LEVEL 6
+
+// thermal regulation parameters
+#ifdef MIN_THERM_STEPDOWN
+#undef MIN_THERM_STEPDOWN // this should be lower, because 3x7135 instead of 1x7135
+#endif
+#define MIN_THERM_STEPDOWN 60 // lowest value it'll step down to
+
+// ceiling is level 120/150
+#define RAMP_SMOOTH_CEIL 120
+
+// 10, 28, 46, 65, [83], 101, 120
+#define RAMP_DISCRETE_FLOOR 10
+#define RAMP_DISCRETE_CEIL 120
+#define RAMP_DISCRETE_STEPS 7
+
+// ~25 lm to ~300 lm
+#define MUGGLE_FLOOR 30
+#define MUGGLE_CEILING MAX_1x7135
+
+// regulate down faster when the FET is active, slower otherwise
+#define THERM_FASTER_LEVEL 135 // throttle back faster when high
+
+// hard drop doesn't seem to be needed on this light
+#ifdef THERM_HARD_TURBO_DROP
+#undef THERM_HARD_TURBO_DROP
+#endif
+
+// don't do this
+#undef BLINK_AT_RAMP_MIDDLE
+#undef BLINK_AT_RAMP_CEILING
+
diff --git a/spaghetti-monster/anduril/cfg-ff-rot66g2.h b/spaghetti-monster/anduril/cfg-ff-rot66g2.h
new file mode 100644
index 0000000..4e353a8
--- /dev/null
+++ b/spaghetti-monster/anduril/cfg-ff-rot66g2.h
@@ -0,0 +1,49 @@
+// Fireflies ROT66 G2 config options for Anduril
+#include "cfg-ff-rot66.h"
+
+// if the "low" mode was disabled, turn it back on
+#ifdef INDICATOR_LED_SKIP_LOW
+#undef INDICATOR_LED_SKIP_LOW
+#endif
+// enable blinking indicator LED while off
+#define TICK_DURING_STANDBY
+#define STANDBY_TICK_SPEED 3 // every 0.128 s
+#define USE_FANCIER_BLINKING_INDICATOR
+
+// lockout: blinking (3), off: low (1)
+#ifdef INDICATOR_LED_DEFAULT_MODE
+#undef INDICATOR_LED_DEFAULT_MODE
+#endif
+#define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 1)
+
+// ramp shape is different than original ROT66
+// 1x7135: 150 lm
+// Nx7135: 1200 lm
+// FET: 4500 lm
+// ../../../bin/level_calc.py 7.0 3 150 7135 1 4 180.16 7135 8 1 1374.48 FET 1 10 4000
+// (plus some manual tweaks)
+#undef PWM1_LEVELS
+#undef PWM2_LEVELS
+#undef PWM3_LEVELS
+#define PWM1_LEVELS 1,1,2,3,3,4,4,5,6,7,7,8,9,10,11,12,16,17,18,19,20,21,22,24,26,28,30,32,35,37,40,42,45,48,51,55,58,62,65,69,74,78,83,87,92,98,103,109,115,121,128,134,142,149,157,165,173,182,191,201,211,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,255,255,255,255,255,255,255,255,255,255,255,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,9,11,13,14,16,18,20,22,24,26,28,30,33,35,38,41,43,46,49,52,55,59,62,66,69,73,77,81,85,89,94,98,103,108,113,118,124,129,135,141,147,153,160,166,173,180,188,195,203,211,219,228,237,246,255,255,255,255,255,255,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,11,17,23,29,36,42,49,56,63,71,78,86,94,102,111,119,128,137,147,156,166,176,187,197,208,219,231,243,255
+
+#undef MAX_1x7135
+#undef MAX_Nx7135
+#define MAX_1x7135 65 // ~150 lm
+#define MAX_Nx7135 120 // ~1200 m
+#undef HALFSPEED_LEVEL
+#undef QUARTERSPEED_LEVEL
+#define HALFSPEED_LEVEL 17
+#define QUARTERSPEED_LEVEL 6
+
+// higher floor than default, and stop at highest regulated level
+#define RAMP_SMOOTH_FLOOR 1 // ~0.3 lm
+#define RAMP_SMOOTH_CEIL MAX_Nx7135 // ~1200 lm
+// 10, 28, 46, [65], 83, 101, [120]
+#define RAMP_DISCRETE_FLOOR 10
+#define RAMP_DISCRETE_CEIL MAX_Nx7135
+#define RAMP_DISCRETE_STEPS 7
+
+
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.