mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-04 03:11:43 +00:00
Added support for digital and analog IO pins on the MXP
Change-Id: I3a4e14ceab885d19a615d6cd45f22a2250ad2856
This commit is contained in:
@@ -31,7 +31,7 @@ void AnalogChannel::InitChannel(uint8_t moduleNumber, uint32_t channel)
|
||||
wpi_setWPIErrorWithContext(ModuleIndexOutOfRange, buf);
|
||||
return;
|
||||
}
|
||||
if (!checkAnalogChannel(channel))
|
||||
if (!checkAnalogInputChannel(channel))
|
||||
{
|
||||
snprintf(buf, 64, "Analog Channel %d", channel);
|
||||
wpi_setWPIErrorWithContext(ChannelIndexOutOfRange, buf);
|
||||
@@ -49,7 +49,7 @@ void AnalogChannel::InitChannel(uint8_t moduleNumber, uint32_t channel)
|
||||
|
||||
void* port = getPortWithModule(moduleNumber, channel);
|
||||
int32_t status = 0;
|
||||
m_port = initializeAnalogPort(port, &status);
|
||||
m_port = initializeAnalogInputPort(port, &status);
|
||||
wpi_setErrorWithContext(status, getHALErrorMessage(status));
|
||||
|
||||
LiveWindow::GetInstance()->AddSensor("AnalogChannel",channel, GetModuleNumber(), this);
|
||||
|
||||
Reference in New Issue
Block a user