Fix a couple of files which were relying on implicit conversions
Change-Id: Ib8ee503ccbb6f2a299f5f30d14703bee043fb5ba
diff --git a/y2015/control_loops/claw/claw.cc b/y2015/control_loops/claw/claw.cc
index c1a734e..e487024 100644
--- a/y2015/control_loops/claw/claw.cc
+++ b/y2015/control_loops/claw/claw.cc
@@ -291,12 +291,12 @@
status->goal_velocity = claw_goal_velocity;
if (output) {
- status->rollers_open =
- !output->rollers_closed &&
- (Time::Now() - last_piston_edge_ >= values.claw.piston_switch_time);
- status->rollers_closed =
- output->rollers_closed &&
- (Time::Now() - last_piston_edge_ >= values.claw.piston_switch_time);
+ status->rollers_open = !output->rollers_closed &&
+ ((Time::Now() - last_piston_edge_).ToSeconds() >=
+ values.claw.piston_switch_time);
+ status->rollers_closed = output->rollers_closed &&
+ ((Time::Now() - last_piston_edge_).ToSeconds() >=
+ values.claw.piston_switch_time);
} else {
status->rollers_open = false;
status->rollers_closed = false;
diff --git a/y2015_bot3/control_loops/intake/intake_lib_test.cc b/y2015_bot3/control_loops/intake/intake_lib_test.cc
index 6d598fe..1c8b604 100644
--- a/y2015_bot3/control_loops/intake/intake_lib_test.cc
+++ b/y2015_bot3/control_loops/intake/intake_lib_test.cc
@@ -60,9 +60,9 @@
}
// Runs iterations until the specified amount of simulated time has elapsed.
- void RunForTime(const Time &run_for, bool enabled = true) {
+ void RunForTime(double run_for, bool enabled = true) {
const auto start_time = Time::Now();
- while (Time::Now() < start_time + run_for) {
+ while (Time::Now() < start_time + Time::InSeconds(run_for)) {
RunIteration(enabled);
}
}