Compare commits

...

1 Commits

Author SHA1 Message Date
Thad House
99e4f7dd2c Fix SPI CS1 not working correctly (#1614)
It was failing the check when remapping digital sources
2019-02-25 18:48:22 -08:00

View File

@@ -145,7 +145,7 @@ bool remapDigitalSource(HAL_Handle digitalSourceHandle,
return true;
} else if (isHandleType(digitalSourceHandle, HAL_HandleEnum::DIO)) {
int32_t index = getHandleIndex(digitalSourceHandle);
if (index > kNumDigitalHeaders + kNumDigitalMXPChannels) {
if (index >= kNumDigitalHeaders + kNumDigitalMXPChannels) {
// channels 10-15, so need to add headers to remap index
channel = remapSPIChannel(index) + kNumDigitalHeaders;
module = 0;