From 4a8c30772029babea965414b1e44cf9ab590312a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 2 Jun 2019 17:38:25 +1000 Subject: [PATCH] AP_UAVCAN: fixed build error of F4 boards with CAN --- libraries/AP_UAVCAN/AP_UAVCAN_SLCAN.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libraries/AP_UAVCAN/AP_UAVCAN_SLCAN.cpp b/libraries/AP_UAVCAN/AP_UAVCAN_SLCAN.cpp index 6ddd8225e5..c8c2256e37 100644 --- a/libraries/AP_UAVCAN/AP_UAVCAN_SLCAN.cpp +++ b/libraries/AP_UAVCAN/AP_UAVCAN_SLCAN.cpp @@ -39,7 +39,7 @@ static uint8_t nibble2hex(uint8_t x) static bool hex2nibble_error; -static uint8_t hex2nibble(char ch) +static uint8_t hex2nibble(char c) { // Must go into RAM, not flash, because flash is slow static uint8_t NumConversionTable[] = { @@ -52,14 +52,14 @@ static uint8_t hex2nibble(char ch) uint8_t out = 255; - if (ch >= '0' && ch <= '9') { - out = NumConversionTable[int(ch) - int('0')]; + if (c >= '0' && c <= '9') { + out = NumConversionTable[int(c) - int('0')]; } - else if (ch >= 'a' && ch <= 'f') { - out = AlphaConversionTable[int(ch) - int('a')]; + else if (c >= 'a' && c <= 'f') { + out = AlphaConversionTable[int(c) - int('a')]; } - else if (ch >= 'A' && ch <= 'F') { - out = AlphaConversionTable[int(ch) - int('A')]; + else if (c >= 'A' && c <= 'F') { + out = AlphaConversionTable[int(c) - int('A')]; } if (out == 255) {