DigitalInputs are now automatically added the LiveWindow in both C++ and Java

Change-Id: Ic3520737841f2901becfdc99e3900e4e63da8822
This commit is contained in:
Fredric Silberberg
2014-10-30 14:42:51 -04:00
parent 5b2520c35f
commit 345ceafa0d
2 changed files with 4 additions and 0 deletions

View File

@@ -14,6 +14,7 @@ import edu.wpi.first.wpilibj.communication.FRCNetworkCommunicationsLibrary.tReso
import edu.wpi.first.wpilibj.communication.UsageReporting;
import edu.wpi.first.wpilibj.hal.DIOJNI;
import edu.wpi.first.wpilibj.hal.HALUtil;
import edu.wpi.first.wpilibj.livewindow.LiveWindow;
import edu.wpi.first.wpilibj.livewindow.LiveWindowSendable;
import edu.wpi.first.wpilibj.tables.ITable;
@@ -36,6 +37,7 @@ public class DigitalInput extends DigitalSource implements LiveWindowSendable {
public DigitalInput(int channel) {
initDigitalPort(channel, true);
LiveWindow.addSensor("DigitalInput", channel, this);
UsageReporting.report(tResourceType.kResourceType_DigitalInput, channel);
}