Fixed a few more small TODOs

Timer::Get now compensates for the FPGA time rolling over after 71 minutes

UltraSonic::Ping doesn't bother disabling automatic mode, since it asserts
that it's not in automatic mode on the line before.

Change-Id: I6b0f45327c453abd8a846ec8da0f9676e210d909
This commit is contained in:
Thomas Clark
2014-08-04 15:25:41 -04:00
parent d521eb79b9
commit e73c8d06eb
2 changed files with 21 additions and 14 deletions

View File

@@ -230,9 +230,7 @@ void Ultrasonic::SetAutomaticMode(bool enabling)
*/
void Ultrasonic::Ping()
{
// TODO: Either assert or disable, not both.
wpi_assert(!m_automaticEnabled);
SetAutomaticMode(false); // turn off automatic round robin if pinging single sensor
m_counter->Reset(); // reset the counter to zero (invalid data now)
m_pingChannel->Pulse(kPingTime); // do the ping to start getting a single range
}