Fix SPI CS1 not working correctly (#1614)

It was failing the check when remapping digital sources
This commit is contained in:
Thad House
2019-02-25 18:48:22 -08:00
committed by Peter Johnson
parent 60c2f59051
commit 9dec5fdb5c

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;