Add name to HAL Notifier

This commit is contained in:
Peter Johnson
2019-11-09 11:41:58 -08:00
parent 2da64d15f6
commit 3e049e02f0
10 changed files with 74 additions and 2 deletions

View File

@@ -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.
*

View File

@@ -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);
}