Reorded network table init to avoid error and added disabledInit to template (artf3841, artf3840)

Change-Id: I5d1b1925f594e8019541033b20f70be003798d82
This commit is contained in:
Brad Miller
2014-12-03 17:19:58 -05:00
parent b59f4141c4
commit 70825be690
2 changed files with 12 additions and 2 deletions

View File

@@ -53,8 +53,8 @@ public class LiveWindow {
private static Vector sensors = new Vector();
// private static Vector actuators = new Vector();
private static Hashtable components = new Hashtable();
private static ITable livewindowTable = NetworkTable.getTable("LiveWindow");
private static ITable statusTable = livewindowTable.getSubTable("~STATUS~");
private static ITable livewindowTable;
private static ITable statusTable;
private static boolean liveWindowEnabled = false;
private static boolean firstTime = true;
@@ -67,6 +67,8 @@ public class LiveWindow {
*/
private static void initializeLiveWindowComponents() {
System.out.println("Initializing the components first time");
livewindowTable = NetworkTable.getTable("LiveWindow");
statusTable = livewindowTable.getSubTable("~STATUS~");
for (Enumeration e = components.keys(); e.hasMoreElements();) {
LiveWindowSendable component = (LiveWindowSendable) e.nextElement();
LiveWindowComponent c = (LiveWindowComponent) components.get(component);