diff --git a/source/bluetooth/MicroBitBLEManager.cpp b/source/bluetooth/MicroBitBLEManager.cpp index 2d5f0bb..f007733 100644 --- a/source/bluetooth/MicroBitBLEManager.cpp +++ b/source/bluetooth/MicroBitBLEManager.cpp @@ -383,6 +383,9 @@ void MicroBitBLEManager::init(ManagedString deviceName, ManagedString serialNumb // Bring up core BLE services. #if CONFIG_ENABLED(MICROBIT_BLE_DFU_SERVICE) new MicroBitDFUService(*ble); +#endif + +#if CONFIG_ENABLED(MICROBIT_BLE_PARTIAL_FLASHING) new MicroBitPartialFlashingService(*ble, messageBus); #endif diff --git a/source/bluetooth/MicroBitPartialFlashingService.cpp b/source/bluetooth/MicroBitPartialFlashingService.cpp index 81b62c3..f0d1b3f 100644 --- a/source/bluetooth/MicroBitPartialFlashingService.cpp +++ b/source/bluetooth/MicroBitPartialFlashingService.cpp @@ -113,7 +113,6 @@ void MicroBitPartialFlashingService::onDataWritten(const GattWriteCallbackParams break; } -#if CONFIG_ENABLED(MICROBIT_BLE_PARTIAL_FLASHING) case FLASH_DATA: { // Process FLASH data packet @@ -130,7 +129,6 @@ void MicroBitPartialFlashingService::onDataWritten(const GattWriteCallbackParams MicroBitEvent evt(MICROBIT_ID_PARTIAL_FLASHING, END_OF_TRANSMISSION); break; } -#endif case MICROBIT_STATUS: { /* @@ -159,14 +157,6 @@ void MicroBitPartialFlashingService::onDataWritten(const GattWriteCallbackParams } break; } - default: - { - /* Return command unknown - */ - uint8_t unknownCommandBuffer[] = {data[0], 0xAB, 0xCD, 0xEF}; - ble.gattServer().notify(partialFlashCharacteristicHandle, (const uint8_t *)unknownCommandBuffer, sizeof(unknownCommandBuffer)); - break; - } } } }