mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
Enforce leading/trailing zeros in Java numeric constants (#2105)
Enforce that integer literals must not have leading zeros and that floating point literals must have leading or trailing zeros in Java.
This commit is contained in:
committed by
Peter Johnson
parent
fa85fbfc1c
commit
4ebae17123
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2008-2018 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -232,14 +232,14 @@ public abstract class AbstractComsSetup {
|
||||
// reached then continue to run this loop
|
||||
for (timeoutIndex = 0; timeoutIndex < (timeout * 100) && !correctState.getAsBoolean();
|
||||
timeoutIndex++) {
|
||||
Timer.delay(.01);
|
||||
Timer.delay(0.01);
|
||||
}
|
||||
if (correctState.getAsBoolean()) {
|
||||
simpleLog(level, message + " took " + (timeoutIndex * .01) + " seconds");
|
||||
simpleLog(level, message + " took " + (timeoutIndex * 0.01) + " seconds");
|
||||
} else {
|
||||
simpleLog(level, message + " timed out after " + (timeoutIndex * .01) + " seconds");
|
||||
simpleLog(level, message + " timed out after " + (timeoutIndex * 0.01) + " seconds");
|
||||
}
|
||||
return timeoutIndex * .01;
|
||||
return timeoutIndex * 0.01;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user