-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTelemetry.java
More file actions
35 lines (28 loc) · 1014 Bytes
/
Telemetry.java
File metadata and controls
35 lines (28 loc) · 1014 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package frc.spectrumLib;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj2.command.CommandScheduler;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
public class Telemetry extends SubsystemBase {
private static boolean disablePrints = false;
public Telemetry() {
super();
/* Display the currently running commands on SmartDashboard*/
SmartDashboard.putData(CommandScheduler.getInstance());
}
/** Disable Print Statement */
public static void disablePrints() {
disablePrints = true;
}
/** Enable Print Statements */
public static void enablePrints() {
disablePrints = false;
}
/** Print a statement if they are enabled */
public static void print(String output) {
if (!disablePrints) {
System.out.println(
"TIME: " + String.format("%.3f", Timer.getFPGATimestamp()) + " || " + output);
}
}
}