aboutsummaryrefslogtreecommitdiff
path: root/hwdef-BLF_LT1.h
diff options
context:
space:
mode:
authorSelene ToyKeeper2021-10-31 02:35:49 -0600
committerSelene ToyKeeper2021-10-31 02:35:49 -0600
commit4b4353ade4c026c196e2b6edacbb0dc437e3ddda (patch)
treefdba5c77f4e8b703af0722ff64684f3ead40d8e6 /hwdef-BLF_LT1.h
parentClarified Ramp->2C behavior a bit more. (diff)
downloadanduril-4b4353ade4c026c196e2b6edacbb0dc437e3ddda.tar.gz
anduril-4b4353ade4c026c196e2b6edacbb0dc437e3ddda.tar.bz2
anduril-4b4353ade4c026c196e2b6edacbb0dc437e3ddda.zip
added "200%" turbo on tint-ramping lights: D4S and LT1
Normal ramp from 0% to 100% power on levels 1 to 130, then 101% to 200% power at levels 131 to 150 using both channels at maximum for turbo. When either channel would go over 100%, the extra spills over to the other channel.
Diffstat (limited to 'hwdef-BLF_LT1.h')
-rw-r--r--hwdef-BLF_LT1.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/hwdef-BLF_LT1.h b/hwdef-BLF_LT1.h
index d0c2821..16e1c90 100644
--- a/hwdef-BLF_LT1.h
+++ b/hwdef-BLF_LT1.h
@@ -14,7 +14,7 @@
#include <avr/io.h>
#define PWM_CHANNELS 1 // 1 virtual channel (1 for main LEDs + 1 for 2nd LEDs)
-#define PWM_BITS 8 // 0 to 255 at 15.6 kHz
+#define PWM_BITS 9 // 0 to 255 at 15.6 kHz, but goes to 510 for "200%" turbo
#define PWM_TOP 255
// dynamic PWM with tint ramping (not supported on attiny85)
@@ -25,7 +25,7 @@
// it out to a soft brightness value, in order to handle tint ramping
// (this allows smooth thermal regulation to work, and makes things
// otherwise simpler and easier)
-uint8_t PWM1_LVL;
+uint16_t PWM1_LVL;
#define PWM1_PIN PB0 // pin 5, warm tint PWM
#define TINT1_LVL OCR0A // OCR0A is the output compare register for PB0