Removed done state from fridge
Change-Id: Ifb2b69b078f38b2533b8ac6ec73f1116146e6e94
diff --git a/aos/common/controls/control_loops.q b/aos/common/controls/control_loops.q
index 823005e..2b0bfb1 100644
--- a/aos/common/controls/control_loops.q
+++ b/aos/common/controls/control_loops.q
@@ -1,14 +1,10 @@
package aos.control_loops;
-interface IsDone {
- bool done;
-};
-
interface ControlLoop {
queue goal;
queue position;
queue output;
- queue IsDone status;
+ queue status;
};
message Goal {
diff --git a/frc971/control_loops/fridge/fridge.cc b/frc971/control_loops/fridge/fridge.cc
index 3347da9..ad44f72 100644
--- a/frc971/control_loops/fridge/fridge.cc
+++ b/frc971/control_loops/fridge/fridge.cc
@@ -508,8 +508,7 @@
}
// TODO(austin): Populate these fully.
- status->zeroed = false;
- status->done = false;
+ status->zeroed = state_ == RUNNING;
status->angle = arm_loop_->X_hat(0, 0);
status->height = elevator_loop_->X_hat(0, 0);
if (unsafe_goal) {
diff --git a/frc971/control_loops/fridge/fridge.q b/frc971/control_loops/fridge/fridge.q
index 90cebd4..e8105d6 100644
--- a/frc971/control_loops/fridge/fridge.q
+++ b/frc971/control_loops/fridge/fridge.q
@@ -47,9 +47,6 @@
message Status {
// Are both the arm and elevator zeroed?
bool zeroed;
- // Are we zeroed and have reached our goal position on both the arm and
- // elevator?
- bool done;
// Angle of the arm.
double angle;
@@ -58,7 +55,7 @@
// state of the grabber pistons
GrabberPistons grabbers;
- // TODO(austin): Internal state.
+ // If true, we have aborted.
bool estopped;
// The internal state of the state machine.