Skip to content

Commit

Permalink
Fix SPI CS1 not working correctly (wpilibsuite#1614)
Browse files Browse the repository at this point in the history
It was failing the check when remapping digital sources
  • Loading branch information
ThadHouse authored and amrelk committed Apr 4, 2019
1 parent c530aa5 commit fb31b39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hal/src/main/native/athena/DigitalInternal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fb31b39

Please sign in to comment.