Merge from 2.3

This commit is contained in:
Bertrand Songis
2019-12-05 09:29:11 +01:00
161 changed files with 3682 additions and 10305 deletions
+6 -6
View File
@@ -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;