Converted trapezoid_profile over to monotonic_clock
This also involves updating all the callers, and updating
control_loop's frequency variable.
Change-Id: Ic88d2715db30efcc25721da2dd8c89910ede7788
diff --git a/y2015/control_loops/claw/claw.cc b/y2015/control_loops/claw/claw.cc
index e6ab9e7..ad8aaee 100644
--- a/y2015/control_loops/claw/claw.cc
+++ b/y2015/control_loops/claw/claw.cc
@@ -13,6 +13,7 @@
namespace control_loops {
using ::aos::time::Time;
+namespace chrono = ::std::chrono;
constexpr double kZeroingVoltage = 4.0;
@@ -169,8 +170,9 @@
SetClawOffset(claw_estimator_.offset());
} else if (!disable) {
claw_goal_velocity = claw_zeroing_velocity();
- claw_goal_ +=
- claw_goal_velocity * ::aos::controls::kLoopFrequency.ToSeconds();
+ claw_goal_ += claw_goal_velocity *
+ chrono::duration_cast<chrono::duration<double>>(
+ ::aos::controls::kLoopFrequency).count();
}
// Clear the current profile state if we are zeroing.