Fixes MotorSafetyHelper locking and race conditions (#762)

Closes #760
This commit is contained in:
Thad House
2017-11-23 00:36:57 -08:00
committed by Peter Johnson
parent 614093c0c4
commit d36d72bd4f
4 changed files with 63 additions and 23 deletions

View File

@@ -945,6 +945,10 @@ public class DriverStation implements RobotState.Interface {
HAL.waitForDSData();
getData();
if (isDisabled()) {
safetyCounter = 0;
}
if (++safetyCounter >= 4) {
MotorSafetyHelper.checkMotors();
safetyCounter = 0;