aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2018-09-13 04:02:40 -0600
committerSelene ToyKeeper2018-09-13 04:02:40 -0600
commit90d4d514851192f74819a141b81cf515089209c7 (patch)
tree54e2abbf2e7c0d222c329e50af69b1a85e8551ef /spaghetti-monster
parentAdded tint ramping. Not tested yet. Also added BLF Lantern build target. (diff)
downloadanduril-90d4d514851192f74819a141b81cf515089209c7.tar.gz
anduril-90d4d514851192f74819a141b81cf515089209c7.tar.bz2
anduril-90d4d514851192f74819a141b81cf515089209c7.zip
oops, forgot to add lantern config file
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/anduril/cfg-blf-lantern.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/spaghetti-monster/anduril/cfg-blf-lantern.h b/spaghetti-monster/anduril/cfg-blf-lantern.h
new file mode 100644
index 0000000..05b89ca
--- /dev/null
+++ b/spaghetti-monster/anduril/cfg-blf-lantern.h
@@ -0,0 +1,59 @@
+// BLF Lantern config options for Anduril
+
+// basically the same as a Q8... sort of
+#define FSM_BLF_Q8_DRIVER
+
+// the button lights up
+#define USE_INDICATOR_LED
+// the button is visible while main LEDs are on
+#define USE_INDICATOR_LED_WHILE_RAMPING
+// enable blinking indicator LED while off
+#define TICK_DURING_STANDBY
+
+// the lantern has two PWM channels, but they drive different sets of emitters
+// (one channel for warm emitters, one channel for cold)
+// so enable a special ramping mode which changes tint instead of brightness
+#define USE_TINT_RAMPING
+
+#ifdef RAMP_LENGTH
+#undef RAMP_LENGTH
+#endif
+
+// level_calc.py 1 150 7135 1 30 800
+#define RAMP_LENGTH 150
+#define PWM1_LEVELS 1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,11,11,12,13,13,14,15,15,16,17,18,18,19,20,21,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,43,44,45,46,48,49,50,51,53,54,56,57,58,60,61,63,64,66,67,69,70,72,74,75,77,79,80,82,84,85,87,89,91,93,95,97,98,100,102,104,106,108,111,113,115,117,119,121,124,126,128,130,133,135,137,140,142,145,147,150,152,155,157,160,163,165,168,171,173,176,179,182,185,188,190,193,196,199,202,205,209,212,215,218,221,224,228,231,234,238,241,245,248,251,255
+#define MAX_1x7135 65
+#define HALFSPEED_LEVEL 14
+#define QUARTERSPEED_LEVEL 5
+
+// set floor and ceiling as far apart as possible
+// because this lantern isn't overpowered
+#define RAMP_SMOOTH_FLOOR 1
+#define RAMP_SMOOTH_CEILING 150
+#define RAMP_DISCRETE_FLOOR RAMP_SMOOTH_FLOOR
+#define RAMP_DISCRETE_CEILING RAMP_SMOOTH_CEILING
+
+// the sensor (attiny85) is nowhere near the emitters
+// so thermal regulation can't work
+#ifdef USE_THERMAL_REGULATION
+#undef USE_THERMAL_REGULATION
+#endif
+
+// also, the set_level_gradually() thing isn't compatible with tint ramping
+// (but unsetting it here doesn't actually do anything, because the thermal
+// regulation define enables it later... so this is mostly just a note to
+// make this compatibility issue explicit)
+#ifdef USE_SET_LEVEL_GRADUALLY
+#undef USE_SET_LEVEL_GRADUALLY
+#endif
+
+// don't blink while ramping
+#ifdef BLINK_AT_CHANNEL_BOUNDARIES
+#undef BLINK_AT_CHANNEL_BOUNDARIES
+#endif
+#ifdef BLINK_AT_RAMP_CEILING
+#undef BLINK_AT_RAMP_CEILING
+#endif
+#ifdef BLINK_AT_RAMP_FLOOR
+#undef BLINK_AT_RAMP_FLOOR
+#endif
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.