Add tests for RobotTime class

This commit is contained in:
Keenan D. Buckley
2020-04-08 09:30:16 -06:00
parent 21566c6c15
commit a56ca65d14
2 changed files with 95 additions and 3 deletions
+2 -3
View File
@@ -55,7 +55,7 @@ public class RobotTime {
m_deltaTime = m_robotTime - m_lastRobotTime;
m_frameNumber++;
if (m_matchTime != 0) {
if (m_startMatchTime != 0) {
m_matchTime = m_currTime - m_startMatchTime;
}
}
@@ -64,9 +64,8 @@ public class RobotTime {
* Call this in both the auto and periodic inits
*/
public void startMatchTime() {
if (m_matchTime == 0) {
if (m_startMatchTime == 0) {
m_startMatchTime = m_currTime;
m_matchTime = 1;
}
}