added a Cap function to make testing easier
diff --git a/frc971/output/motor_writer.cc b/frc971/output/motor_writer.cc
index 54ff7d9..dca221b 100644
--- a/frc971/output/motor_writer.cc
+++ b/frc971/output/motor_writer.cc
@@ -26,6 +26,12 @@
static constexpr ::aos::time::Time kOldLogInterval =
::aos::time::Time::InSeconds(0.5);
+ double Cap(double value, double max) {
+ if (value > max) return max;
+ if (value < -max) return -max;
+ return value;
+ }
+
virtual void RunIteration() {
values_.digital_module = 0;
values_.pressure_switch_channel = 1;