Add voltage offset to the test to confirm it works
This was one of my theories for why the wrist wasn't working.
Change-Id: If79465b562a799587b7b0f953143381cb290c6a5
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/frc971/control_loops/subsystem_simulator.h b/frc971/control_loops/subsystem_simulator.h
index 29d62c7..0a23a38 100644
--- a/frc971/control_loops/subsystem_simulator.h
+++ b/frc971/control_loops/subsystem_simulator.h
@@ -72,6 +72,11 @@
void set_controller_index(size_t index) { plant_->set_index(index); }
+ double voltage_offset() const { return plant_->voltage_offset(); }
+ void set_voltage_offset(double voltage_offset) {
+ plant_->set_voltage_offset(voltage_offset);
+ }
+
PositionSensorSimulator *encoder() { return &encoder_; }
private:
@@ -88,4 +93,4 @@
const std::chrono::nanoseconds dt_;
};
-} // namespace frc971::control_loops
\ No newline at end of file
+} // namespace frc971::control_loops