aboutsummaryrefslogtreecommitdiff
path: root/hwdef-Emisar_D4Sv2-tintramp.h
diff options
context:
space:
mode:
authorSelene ToyKeeper2021-09-08 22:21:50 -0600
committerSelene ToyKeeper2021-09-08 22:21:50 -0600
commit68c4818b68af698ee475611954c5cd52d030900b (patch)
treeb3d267f3e3c6cb0e87558b76bf035d08be070990 /hwdef-Emisar_D4Sv2-tintramp.h
parentgot BLF LT1 working again, using new tint-ramping code (diff)
downloadanduril-68c4818b68af698ee475611954c5cd52d030900b.tar.gz
anduril-68c4818b68af698ee475611954c5cd52d030900b.tar.bz2
anduril-68c4818b68af698ee475611954c5cd52d030900b.zip
changed D4Sv2-tintramp from 255 to 511 for lowest PWM TOP value,
to make its thermal regulation smoother and generally increase tint ramp resolution in middle modes (also, tried thermal regulation, and it works)
Diffstat (limited to 'hwdef-Emisar_D4Sv2-tintramp.h')
-rw-r--r--hwdef-Emisar_D4Sv2-tintramp.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/hwdef-Emisar_D4Sv2-tintramp.h b/hwdef-Emisar_D4Sv2-tintramp.h
index a0300ad..64550c3 100644
--- a/hwdef-Emisar_D4Sv2-tintramp.h
+++ b/hwdef-Emisar_D4Sv2-tintramp.h
@@ -42,10 +42,10 @@
#define PWM_CHANNELS 1 // 1 virtual channel (1 for main LEDs + 1 for 2nd LEDs)
#define PWM_BITS 14 // 0 to 16383 at variable Hz, not 0 to 255 at 16 kHz
-#define PWM_TOP 255
+#define PWM_TOP 511
// dynamic PWM with tint ramping
#define USE_DYN_PWM // dynamic frequency and speed
-#define PWM_DATATYPE2 uint16_t // doesn't need 32-bit math
+#define PWM_DATATYPE2 uint32_t // only needs 32-bit if ramp values go over 255
#define SWITCH_PIN PA7 // pin 20
#define SWITCH_PCINT PCINT7 // pin 20 pin change interrupt