Fix broken move constructor in HybridStateFeedbackLoop
This was corrupting P and causing the observer to fail.
Change-Id: I5f99802536266e929013745b681e14715afc1d13
diff --git a/frc971/control_loops/state_feedback_loop.h b/frc971/control_loops/state_feedback_loop.h
index 83a54f0..d63bca7 100644
--- a/frc971/control_loops/state_feedback_loop.h
+++ b/frc971/control_loops/state_feedback_loop.h
@@ -397,11 +397,11 @@
: plant_(::std::move(other.plant_)),
controller_(::std::move(other.controller_)),
observer_(::std::move(other.observer_)) {
+ ff_U_.swap(other.ff_U_);
R_.swap(other.R_);
next_R_.swap(other.next_R_);
U_.swap(other.U_);
U_uncapped_.swap(other.U_uncapped_);
- ff_U_.swap(other.ff_U_);
}
virtual ~StateFeedbackLoop() {}