Merge from 2.3
This commit is contained in:
@@ -180,7 +180,7 @@ void Bluetooth::processTrainerByte(uint8_t data)
|
||||
break;
|
||||
|
||||
case STATE_DATA_IN_FRAME:
|
||||
if (data == BYTESTUFF) {
|
||||
if (data == BYTE_STUFF) {
|
||||
dataState = STATE_DATA_XOR; // XOR next byte
|
||||
}
|
||||
else if (data == START_STOP) {
|
||||
@@ -225,8 +225,8 @@ void Bluetooth::processTrainerByte(uint8_t data)
|
||||
void Bluetooth::pushByte(uint8_t byte)
|
||||
{
|
||||
crc ^= byte;
|
||||
if (byte == START_STOP || byte == BYTESTUFF) {
|
||||
buffer[bufferIndex++] = 0x7d;
|
||||
if (byte == START_STOP || byte == BYTE_STUFF) {
|
||||
buffer[bufferIndex++] = BYTE_STUFF;
|
||||
byte ^= STUFF_MASK;
|
||||
}
|
||||
buffer[bufferIndex++] = byte;
|
||||
@@ -762,11 +762,11 @@ const char * Bluetooth::flashFirmware(const char * filename, ProgressHandler pro
|
||||
pausePulses();
|
||||
|
||||
bluetoothInit(BLUETOOTH_BOOTLOADER_BAUDRATE, true); // normal mode
|
||||
watchdogSuspend(1000);
|
||||
watchdogSuspend(500 /*5s*/);
|
||||
RTOS_WAIT_MS(1000);
|
||||
|
||||
bluetoothInit(BLUETOOTH_BOOTLOADER_BAUDRATE, false); // bootloader mode
|
||||
watchdogSuspend(1000);
|
||||
watchdogSuspend(500 /*5s*/);
|
||||
RTOS_WAIT_MS(1000);
|
||||
|
||||
const char * result = doFlashFirmware(filename, progressHandler);
|
||||
@@ -785,7 +785,7 @@ const char * Bluetooth::flashFirmware(const char * filename, ProgressHandler pro
|
||||
progressHandler(getBasename(filename), STR_MODULE_RESET, 0, 0);
|
||||
|
||||
/* wait 1s off */
|
||||
watchdogSuspend(1000);
|
||||
watchdogSuspend(500 /*5s*/);
|
||||
RTOS_WAIT_MS(1000);
|
||||
|
||||
state = BLUETOOTH_STATE_OFF;
|
||||
|
||||
Reference in New Issue
Block a user