aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelene ToyKeeper2018-10-07 18:52:00 -0600
committerSelene ToyKeeper2018-10-07 18:52:00 -0600
commit25e8da3db9acee2c809176fa1f9169a65844f582 (patch)
treed3a88cd063725185244b9527b75f3da69988de5e
parentmerged FF ROT66 updates (supports both 7x7135 and 14x7135 now) (diff)
downloadanduril-25e8da3db9acee2c809176fa1f9169a65844f582.tar.gz
anduril-25e8da3db9acee2c809176fa1f9169a65844f582.tar.bz2
anduril-25e8da3db9acee2c809176fa1f9169a65844f582.zip
First working PL47 build. Does aux LEDs on pin 7 but not pin 3.
-rw-r--r--hwdef-FF_PL47.h24
-rw-r--r--spaghetti-monster/anduril/anduril.c3
-rwxr-xr-xspaghetti-monster/anduril/build-all.sh1
-rw-r--r--spaghetti-monster/anduril/cfg-ff-pl47.h55
-rw-r--r--tk-attiny.h3
5 files changed, 86 insertions, 0 deletions
diff --git a/hwdef-FF_PL47.h b/hwdef-FF_PL47.h
new file mode 100644
index 0000000..4189220
--- /dev/null
+++ b/hwdef-FF_PL47.h
@@ -0,0 +1,24 @@
+/* Fireflies PL47 driver layout
+ */
+// same as a D4S, basically
+#include "hwdef-Emisar_D4S.h"
+#undef FSM_EMISAR_D4S_DRIVER
+#undef FSM_EMISAR_D4_DRIVER
+
+// ... except the PL47 has aux LEDs on pin 7
+#ifdef AUXLED_PIN
+#undef AUXLED_PIN
+#endif
+#define AUXLED_PIN PB2 // pin 7
+
+// ... and switch LEDs on pin 3
+#ifdef AUXLED2_PIN
+#undef AUXLED2_PIN
+#endif
+#define AUXLED2_PIN PB4 // pin 3
+
+// average drop across diode on this hardware
+#ifdef VOLTAGE_FUDGE_FACTOR
+#undef VOLTAGE_FUDGE_FACTOR
+#endif
+#define VOLTAGE_FUDGE_FACTOR 7 // add 0.35V
diff --git a/spaghetti-monster/anduril/anduril.c b/spaghetti-monster/anduril/anduril.c
index 1d4d0d2..4aaea74 100644
--- a/spaghetti-monster/anduril/anduril.c
+++ b/spaghetti-monster/anduril/anduril.c
@@ -102,6 +102,9 @@
#elif defined(FSM_EMISAR_D4S_DRIVER)
#include "cfg-emisar-d4s.h"
+#elif defined(FSM_FF_PL47_DRIVER)
+#include "cfg-ff-pl47.h"
+
#elif defined(FSM_FF_ROT66_DRIVER)
#include "cfg-ff-rot66.h"
diff --git a/spaghetti-monster/anduril/build-all.sh b/spaghetti-monster/anduril/build-all.sh
index f652e16..9e2a83c 100755
--- a/spaghetti-monster/anduril/build-all.sh
+++ b/spaghetti-monster/anduril/build-all.sh
@@ -12,6 +12,7 @@ for TARGET in \
EMISAR_D4_219C \
EMISAR_D4S \
EMISAR_D4S_219C \
+ FF_PL47 \
FF_ROT66 \
FF_ROT66_219 \
FW3A \
diff --git a/spaghetti-monster/anduril/cfg-ff-pl47.h b/spaghetti-monster/anduril/cfg-ff-pl47.h
new file mode 100644
index 0000000..5a623fc
--- /dev/null
+++ b/spaghetti-monster/anduril/cfg-ff-pl47.h
@@ -0,0 +1,55 @@
+// Fireflies PL47 config options for Anduril
+
+// 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
+//#define USE_INDICATOR_LED_WHILE_RAMPING
+// enable blinking indicator LED while off?
+#define TICK_DURING_STANDBY
+
+// If TICK_DURING_STANDBY is enabled...
+// off mode: high (2)
+// lockout: blinking (3)
+#define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 2)
+
+// ... or if TICK_DURING_STANDBY is turned off:
+// off mode: high (2)
+// lockout: off (0)
+//#define INDICATOR_LED_DEFAULT_MODE ((0<<2) + 2)
+
+
+#ifdef RAMP_LENGTH
+#undef RAMP_LENGTH
+#endif
+#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
+
+// ceiling is level 120/150
+#define RAMP_SMOOTH_CEIL (MAX_LEVEL*4/5)
+
+// 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
+
+// regulate down faster when the FET is active, slower otherwise
+#define THERM_FASTER_LEVEL 130 // throttle back faster when high
+
+// play it safe, don't try to regulate above the recommended safe level
+#define THERM_HARD_TURBO_DROP
+
+// don't do this
+#undef BLINK_AT_CHANNEL_BOUNDARIES
+#undef BLINK_AT_RAMP_CEILING
+
diff --git a/tk-attiny.h b/tk-attiny.h
index d121709..54856bf 100644
--- a/tk-attiny.h
+++ b/tk-attiny.h
@@ -96,6 +96,9 @@
#elif defined(FSM_EMISAR_D1S_DRIVER)
#include "hwdef-Emisar_D1S.h"
+#elif defined(FSM_FF_PL47_DRIVER)
+#include "hwdef-FF_PL47.h"
+
#elif defined(FSM_FF_ROT66_DRIVER)
#include "hwdef-FF_ROT66.h"
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.