Let neutral mode be set in talonfx
This becomes useful when we need a motor to be on coast mode for testing
or bringup
Signed-off-by: Maxwell Henderson <mxwhenderson@gmail.com>
Change-Id: Iad4fc08cbf5e3eedb110e77437e5c43fe1c2941f
diff --git a/frc971/wpilib/talonfx.h b/frc971/wpilib/talonfx.h
index a3e3066..1f64b5b 100644
--- a/frc971/wpilib/talonfx.h
+++ b/frc971/wpilib/talonfx.h
@@ -79,6 +79,10 @@
supply_current_limit_ = supply_current_limit;
}
+ void set_neutral_mode(ctre::phoenix6::signals::NeutralModeValue value) {
+ neutral_mode_ = value;
+ }
+
static double SafeSpeed(double voltage) {
return (::aos::Clip(voltage, -kMaxBringupPower, kMaxBringupPower) / 12.0);
}
@@ -87,6 +91,7 @@
ctre::phoenix6::hardware::TalonFX talon_;
int device_id_;
+ ctre::phoenix6::signals::NeutralModeValue neutral_mode_;
ctre::phoenix6::signals::InvertedValue inverted_;
ctre::phoenix6::StatusSignal<units::temperature::celsius_t> device_temp_;