mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
DigitalInputs are now automatically added the LiveWindow in both C++ and Java
Change-Id: Ic3520737841f2901becfdc99e3900e4e63da8822
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user