Fixed C++ side of artf2604 in FRCSim - synchronized C++ codebases, updated examples.

Change-Id: I2fdc9deb4c8e249448dcbda4214fd900c2bc4ea8
This commit is contained in:
Colby Skeggs
2014-06-24 10:37:02 -07:00
parent 02e19a0147
commit ff597e6ac4
72 changed files with 763 additions and 861 deletions

View File

@@ -25,7 +25,7 @@ void AnalogInput::InitAnalogInput(uint32_t channel)
char buf[64];
Resource::CreateResourceObject(&inputs, kAnalogInputs);
if (!checkAnalogInputChannel(channel))
if (!checkAnalogInputChannel(channel))
{
snprintf(buf, 64, "analog input %d", channel);
wpi_setWPIErrorWithContext(ChannelIndexOutOfRange, buf);
@@ -39,14 +39,14 @@ void AnalogInput::InitAnalogInput(uint32_t channel)
return;
}
m_channel = channel;
m_channel = channel;
void* port = getPort(channel);
int32_t status = 0;
m_port = initializeAnalogInputPort(port, &status);
wpi_setErrorWithContext(status, getHALErrorMessage(status));
LiveWindow::GetInstance()->AddSensor("AnalogInput",channel, this);
LiveWindow::GetInstance()->AddSensor("AnalogInput", channel, this);
HALReport(HALUsageReporting::kResourceType_AnalogChannel, channel);
}