File tree Expand file tree Collapse file tree
src/test/java/org/carlmontrobotics/lib199/safeMode Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33import edu .wpi .first .wpilibj2 .command .CommandBase ;
44
5+ /**
6+ * A command that counts how many times it has been initialized and executed for the purposes of testing safe mode functionality.
7+ *
8+ * @see SafeModeCommandsTest
9+ */
510public class LoggingCommand extends CommandBase {
611
712 private int initializedCount = 0 , executeCount = 0 ;
@@ -16,14 +21,23 @@ public void execute() {
1621 executeCount ++;
1722 }
1823
24+ /**
25+ * Resets the initialized and execute counts to zero.
26+ */
1927 public void reset () {
2028 initializedCount = executeCount = 0 ;
2129 }
2230
31+ /**
32+ * @return The number of times this command has been initialized.
33+ */
2334 public int getInitializedCount () {
2435 return initializedCount ;
2536 }
2637
38+ /**
39+ * @return The number of times this command has been executed.
40+ */
2741 public int getExecuteCount () {
2842 return executeCount ;
2943 }
You can’t perform that action at this time.
0 commit comments