aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster/fsm-ramping.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 /spaghetti-monster/fsm-ramping.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 'spaghetti-monster/fsm-ramping.h')
-rw-r--r--spaghetti-monster/fsm-ramping.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/spaghetti-monster/fsm-ramping.h b/spaghetti-monster/fsm-ramping.h
index c1f6064..de090c2 100644
--- a/spaghetti-monster/fsm-ramping.h
+++ b/spaghetti-monster/fsm-ramping.h
@@ -48,26 +48,26 @@ void update_tint();
// auto-detect the data type for PWM tables
#ifndef PWM_BITS
-#define PWM_BITS 8
-#define PWM_TOP 255
+ #define PWM_BITS 8
+ #define PWM_TOP 255
#endif
#if PWM_BITS <= 8
-#define PWM_DATATYPE uint8_t
-#define PWM_DATATYPE2 uint16_t
-#define PWM_TOP 255
-#define PWM_GET(x,y) pgm_read_byte(x+y)
+ #define PWM_DATATYPE uint8_t
+ #define PWM_DATATYPE2 uint16_t
+ #define PWM_TOP 255
+ #define PWM_GET(x,y) pgm_read_byte(x+y)
#else
-#define PWM_DATATYPE uint16_t
-#ifndef PWM_DATATYPE2
-#define PWM_DATATYPE2 uint32_t
-#endif
-#ifndef PWM_TOP
-#define PWM_TOP 1023 // 10 bits by default
-#endif
-// pointer plus 2*y bytes
-//#define PWM_GET(x,y) pgm_read_word(x+(2*y))
-// nope, the compiler was already doing the math correctly
-#define PWM_GET(x,y) pgm_read_word(x+y)
+ #define PWM_DATATYPE uint16_t
+ #ifndef PWM_DATATYPE2
+ #define PWM_DATATYPE2 uint32_t
+ #endif
+ #ifndef PWM_TOP
+ #define PWM_TOP 1023 // 10 bits by default
+ #endif
+ // pointer plus 2*y bytes
+ //#define PWM_GET(x,y) pgm_read_word(x+(2*y))
+ // nope, the compiler was already doing the math correctly
+ #define PWM_GET(x,y) pgm_read_word(x+y)
#endif
// use UI-defined ramp tables if they exist