Bluetooth jdy33 #4653

This commit is contained in:
rusefillc 2022-11-16 18:29:50 -05:00
parent 92d47d1814
commit 4baf779b6d
1 changed files with 2 additions and 2 deletions

View File

@ -118,7 +118,7 @@ static void runCommands() {
tsChannel->stop(); tsChannel->stop();
chThdSleepMilliseconds(10); // safety chThdSleepMilliseconds(10); // safety
if (chThdShouldTerminateX() || (baudIdx == ARRAY_SIZE(baudRates))) { if (chThdShouldTerminateX() || (baudIdx == efi::size(baudRates))) {
if (baudIdx == ARRAY_SIZE(baudRates)) if (baudIdx == ARRAY_SIZE(baudRates))
efiPrintf("Failed to find current BT module baudrate"); efiPrintf("Failed to find current BT module baudrate");
tsChannel->start(engineConfiguration->tunerStudioSerialSpeed); tsChannel->start(engineConfiguration->tunerStudioSerialSpeed);
@ -284,7 +284,7 @@ void bluetoothStart(bluetooth_module_e moduleType, const char *baudRate, const c
int baud = atoi(baudRate); int baud = atoi(baudRate);
// find a known baud rate in our list // find a known baud rate in our list
setBaudIdx = -1; setBaudIdx = -1;
for (size_t i = 0; i < ARRAY_SIZE(baudRates); i++) { for (size_t i = 0; i < efi::size(baudRates); i++) {
if (baudRates[i] == baud) { if (baudRates[i] == baud) {
setBaudIdx = i; setBaudIdx = i;
break; break;