From 057ba09d3f0b32555eb4b488a9cb4eda3d06eda7 Mon Sep 17 00:00:00 2001 From: 4712 <4712@outlook.de> Date: Sun, 10 Apr 2022 14:50:35 +0200 Subject: [PATCH] widening range of BLHeli/_S device id widening range of BLHeli/_S device id filtering to ease integration of upcoming MCU types to ease integration of upcoming MCU types --- src/main/io/serial_4way.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/io/serial_4way.c b/src/main/io/serial_4way.c index 0648090ea9..4f2b1f7509 100644 --- a/src/main/io/serial_4way.c +++ b/src/main/io/serial_4way.c @@ -76,7 +76,7 @@ // *** change to adapt Revision #define SERIAL_4WAY_VER_MAIN 20 #define SERIAL_4WAY_VER_SUB_1 (uint8_t) 0 -#define SERIAL_4WAY_VER_SUB_2 (uint8_t) 05 +#define SERIAL_4WAY_VER_SUB_2 (uint8_t) 06 #define SERIAL_4WAY_PROTOCOL_VER 108 // *** end @@ -332,10 +332,8 @@ uint16_t _crc_xmodem_update (uint16_t crc, uint8_t data) { #define ATMEL_DEVICE_MATCH ((pDeviceInfo->words[0] == 0x9307) || (pDeviceInfo->words[0] == 0x930A) || \ (pDeviceInfo->words[0] == 0x930F) || (pDeviceInfo->words[0] == 0x940B)) -#define SILABS_DEVICE_MATCH ((pDeviceInfo->words[0] == 0xF310) || (pDeviceInfo->words[0] == 0xF330) || \ - (pDeviceInfo->words[0] == 0xF410) || (pDeviceInfo->words[0] == 0xF390) || \ - (pDeviceInfo->words[0] == 0xF850) || (pDeviceInfo->words[0] == 0xE8B1) || \ - (pDeviceInfo->words[0] == 0xE8B2)) +#define SILABS_DEVICE_MATCH (pDeviceInfo->words[0] > 0xE800) // && (pDeviceInfo->words[0] < 0xF900)) + // BLHeli_32 MCU ID hi > 0x00 and < 0x90 / lo always = 0x06 #define ARM_DEVICE_MATCH ((pDeviceInfo->bytes[1] > 0x00) && (pDeviceInfo->bytes[1] < 0x90) && (pDeviceInfo->bytes[0] == 0x06))