Skip to content

Commit 73cb8ef

Browse files
committed
document LoggingCommand
1 parent 489cb9e commit 73cb8ef

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/test/java/org/carlmontrobotics/lib199/safeMode/LoggingCommand.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
import 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+
*/
510
public 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
}

0 commit comments

Comments
 (0)