From 99e4f7dd2c497d24016b7cb0e6fe16b04d2db1e8 Mon Sep 17 00:00:00 2001 From: Thad House Date: Mon, 25 Feb 2019 18:48:22 -0800 Subject: [PATCH] Fix SPI CS1 not working correctly (#1614) It was failing the check when remapping digital sources --- hal/src/main/native/athena/DigitalInternal.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hal/src/main/native/athena/DigitalInternal.cpp b/hal/src/main/native/athena/DigitalInternal.cpp index 1db6c7e1b5..bdba75b1e2 100644 --- a/hal/src/main/native/athena/DigitalInternal.cpp +++ b/hal/src/main/native/athena/DigitalInternal.cpp @@ -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;