Implement BLE OTA
This commit is contained in:
@@ -133,6 +133,9 @@ void onCommandWrite(uint16_t h, BLECharacteristic* c, uint8_t* d, uint16_t l) {
|
||||
if (l < 1) return;
|
||||
if (d[0] == 0x01) pendingCal = true;
|
||||
if (d[0] == 0xFF) pendingReset = true;
|
||||
#ifdef FEATURE_OTA
|
||||
if (d[0] == 0x02) pendingOTA = true;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef FEATURE_IMU_STREAM
|
||||
@@ -153,7 +156,7 @@ void setupConfigService() {
|
||||
cfgBlob.begin();
|
||||
pushConfigBlob();
|
||||
|
||||
cfgCommand.setProperties(CHR_PROPS_WRITE);
|
||||
cfgCommand.setProperties(CHR_PROPS_WRITE | CHR_PROPS_WRITE_WO_RESP);
|
||||
cfgCommand.setPermission(SECMODE_OPEN, SECMODE_OPEN);
|
||||
cfgCommand.setFixedLen(1);
|
||||
cfgCommand.setWriteCallback(onCommandWrite);
|
||||
|
||||
Reference in New Issue
Block a user