aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelene ToyKeeper2023-11-28 13:12:05 -0700
committerSelene ToyKeeper2023-11-28 13:12:05 -0700
commit4373ed25154fb77f44d3b0ba6d3f5cc78127cc45 (patch)
tree3bf8097425174f5910bc7c692e6b5d02912a709a
parentfixed FW3X thermal regulation (diff)
downloadanduril-4373ed25154fb77f44d3b0ba6d3f5cc78127cc45.tar.gz
anduril-4373ed25154fb77f44d3b0ba6d3f5cc78127cc45.tar.bz2
anduril-4373ed25154fb77f44d3b0ba6d3f5cc78127cc45.zip
prevent future issues like the FW3X had
1/3rd of the ramp size is probably a more reliable default than MAX_1x7135. The 7135-based reference points need to eventually be removed entirely and replaced by something more universal, but for now at least don't fail when a thermal stepdown isn't defined.
Diffstat (limited to '')
-rw-r--r--ui/anduril/ramp-mode.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/ui/anduril/ramp-mode.h b/ui/anduril/ramp-mode.h
index 59c8db0..1392981 100644
--- a/ui/anduril/ramp-mode.h
+++ b/ui/anduril/ramp-mode.h
@@ -4,14 +4,15 @@
#pragma once
-#ifndef RAMP_LENGTH
-#define RAMP_LENGTH 150 // default, if not overridden in a driver cfg file
+#ifndef RAMP_SIZE
+#define RAMP_SIZE 150 // default, if not overridden in a driver cfg file
#endif
+// TODO: Replace MAX_Xx7135 with MAX_CH1, MAX_CH2, MAX_REGULATED, etc
+
// thermal properties, if not defined per-driver
#ifndef MIN_THERM_STEPDOWN
-// TODO: Replace MAX_Xx7135 with MAX_CH1, MAX_CH2, MAX_REGULATED, etc
-#define MIN_THERM_STEPDOWN MAX_1x7135 // lowest value it'll step down to
+#define MIN_THERM_STEPDOWN (RAMP_SIZE/3) // lowest value it'll step down to
#endif
#ifndef THERM_FASTER_LEVEL
#ifdef MAX_Nx7135