Added hook to change battery voltage.
Change-Id: Ide009e808fb6ba21d0463166e71cb5b19f300fe0
diff --git a/aos/common/controls/control_loop_test.h b/aos/common/controls/control_loop_test.h
index 4ab4774..14fdd60 100644
--- a/aos/common/controls/control_loop_test.h
+++ b/aos/common/controls/control_loop_test.h
@@ -41,6 +41,11 @@
++reader_pid_;
}
+ // Sets the battery voltage in robot_state.
+ void set_battery_voltage(double battery_voltage) {
+ battery_voltage_ = battery_voltage;
+ }
+
private:
static constexpr ::aos::time::Time kTimeTick = ::aos::time::Time::InUS(5000);
static constexpr ::aos::time::Time kDSPacketTime =
@@ -48,6 +53,7 @@
uint16_t team_id_ = 971;
int32_t reader_pid_ = 1;
+ double battery_voltage_ = 12.4;
::aos::time::Time last_ds_time_ = ::aos::time::Time::InSeconds(0);
::aos::time::Time current_time_ = ::aos::time::Time::InSeconds(0);