aboutsummaryrefslogtreecommitdiff
path: root/fsm/ramping.c
diff options
context:
space:
mode:
authorSiteRelEnby2024-04-20 14:28:02 -0500
committerSiteRelEnby2024-04-20 14:28:02 -0500
commitcf3d68ce31ca47eab4980e8b07a44345ea44cebc (patch)
tree8a83bc31998f8121d9b07994adb8261066959a84 /fsm/ramping.c
parentAdd a feature to make RGB voltage configurable (diff)
parentinclude hardware-specific readme files in the release .zip (diff)
downloadanduril-cf3d68ce31ca47eab4980e8b07a44345ea44cebc.tar.gz
anduril-cf3d68ce31ca47eab4980e8b07a44345ea44cebc.tar.bz2
anduril-cf3d68ce31ca47eab4980e8b07a44345ea44cebc.zip
Merge branch 'main' into rgb-voltage-configurable
Diffstat (limited to 'fsm/ramping.c')
-rw-r--r--fsm/ramping.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fsm/ramping.c b/fsm/ramping.c
index b3b3b23..e0c391a 100644
--- a/fsm/ramping.c
+++ b/fsm/ramping.c
@@ -64,6 +64,11 @@ inline void set_level_aux_rgb_leds(uint8_t level) {
void set_level(uint8_t level) {
+ #ifdef USE_RAMP_LEVEL_HARD_LIMIT
+ if (ramp_level_hard_limit && (level > ramp_level_hard_limit))
+ level = ramp_level_hard_limit;
+ #endif
+
#ifdef USE_JUMP_START
// maybe "jump start" the engine, if it's prone to slow starts
// (pulse the output high for a moment to wake up the power regulator)