Make make pi's work on 9971
Turret doesn't actually move so fake that out by just reporting it as
being at pi all the time.
Change-Id: I8552b3a7566624230f808bfabeb87ad84ab66974
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/y2020/control_loops/superstructure/superstructure.cc b/y2020/control_loops/superstructure/superstructure.cc
index b3c36f0..dce958f 100644
--- a/y2020/control_loops/superstructure/superstructure.cc
+++ b/y2020/control_loops/superstructure/superstructure.cc
@@ -145,10 +145,19 @@
: nullptr;
flatbuffers::Offset<PotAndAbsoluteEncoderProfiledJointStatus>
- turret_status_offset = turret_.Iterate(
- turret_goal, position->turret(),
- output != nullptr ? &(output_struct.turret_voltage) : nullptr,
- status->fbb());
+ turret_status_offset;
+ if (has_turret_) {
+ turret_status_offset = turret_.Iterate(
+ turret_goal, position->turret(),
+ output != nullptr ? &(output_struct.turret_voltage) : nullptr,
+ status->fbb());
+ } else {
+ PotAndAbsoluteEncoderProfiledJointStatus::Builder turret_builder(
+ *status->fbb());
+ turret_builder.add_position(M_PI);
+ turret_builder.add_velocity(0.0);
+ turret_status_offset = turret_builder.Finish();
+ }
flatbuffers::Offset<ShooterStatus> shooter_status_offset =
shooter_.RunIteration(
diff --git a/y2020/y2020_logger.json b/y2020/y2020_logger.json
index a068b10..9d6addb 100644
--- a/y2020/y2020_logger.json
+++ b/y2020/y2020_logger.json
@@ -478,6 +478,7 @@
"hostname": "logger",
"hostnames": [
"pi-971-6",
+ "pi-9971-6",
"ASchuh-T480s",
"aschuh-3950x"
],