mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
Add name to HAL Notifier
This commit is contained in:
@@ -138,6 +138,16 @@ public class Notifier implements AutoCloseable {
|
||||
m_thread.start();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the name of the notifier. Used for debugging purposes only.
|
||||
*
|
||||
* @param name Name
|
||||
*/
|
||||
public void setName(String name) {
|
||||
m_thread.setName(name);
|
||||
NotifierJNI.setNotifierName(m_notifier.get(), name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the handler function.
|
||||
*
|
||||
|
||||
@@ -43,6 +43,7 @@ public class TimedRobot extends IterativeRobotBase {
|
||||
*/
|
||||
protected TimedRobot(double period) {
|
||||
super(period);
|
||||
NotifierJNI.setNotifierName(m_notifier, "TimedRobot");
|
||||
|
||||
HAL.report(tResourceType.kResourceType_Framework, tInstances.kFramework_Timed);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user