Cleaned up integer type usage in wpilibc (#92)

Replaced all unsigned types to signed and int32_t with int in wpilibc
This commit is contained in:
Tyler Veness
2016-09-06 00:01:45 -07:00
committed by Peter Johnson
parent ff93050b31
commit 0cd05d1a42
169 changed files with 914 additions and 943 deletions

View File

@@ -21,13 +21,13 @@
*
* @param channel The channel number on the roboRIO to represent.
*/
AnalogOutput::AnalogOutput(uint32_t channel) {
AnalogOutput::AnalogOutput(int channel) {
std::stringstream buf;
buf << "analog input " << channel;
if (!SensorBase::CheckAnalogOutputChannel(channel)) {
wpi_setWPIErrorWithContext(ChannelIndexOutOfRange, buf.str());
m_channel = std::numeric_limits<uint32_t>::max();
m_channel = std::numeric_limits<int>::max();
m_port = HAL_kInvalidHandle;
return;
}
@@ -40,7 +40,7 @@ AnalogOutput::AnalogOutput(uint32_t channel) {
if (status != 0) {
wpi_setErrorWithContextRange(status, 0, HAL_GetNumAnalogOutputs(), channel,
HAL_GetErrorMessage(status));
m_channel = std::numeric_limits<uint32_t>::max();
m_channel = std::numeric_limits<int>::max();
m_port = HAL_kInvalidHandle;
return;
}