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

@@ -8,6 +8,7 @@
//#include "NetworkCommunication/UsageReporting.h"
#include "Resource.h"
#include "WPIErrors.h"
#include "LiveWindow/LiveWindow.h"
/**
* Create an instance of a DigitalInput.
@@ -31,6 +32,7 @@ void DigitalInput::InitDigitalInput(uint32_t channel)
allocateDIO(m_digital_ports[channel], true, &status);
wpi_setErrorWithContext(status, getHALErrorMessage(status));
LiveWindow::GetInstance()->AddSensor("DigitalInput", channel, this);
HALReport(HALUsageReporting::kResourceType_DigitalInput, channel);
}