Run dfu begin first (#1786)

Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
This commit is contained in:
Ben Meadors 2022-10-12 07:55:17 -05:00 committed by GitHub
parent 49a9973548
commit 505e4e8176
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -244,6 +244,8 @@ void NRF52Bluetooth::setup()
Bluefruit.Periph.setConnectCallback(onConnect);
Bluefruit.Periph.setDisconnectCallback(onDisconnect);
bledfu.begin(); // Install the DFU helper
// Configure and Start the Device Information Service
DEBUG_MSG("Configuring the Device Information Service\n");
bledis.setModel(optstr(HW_VERSION));
@ -254,7 +256,7 @@ void NRF52Bluetooth::setup()
DEBUG_MSG("Configuring the Battery Service\n");
blebas.begin();
blebas.write(0); // Unknown battery level for now
bledfu.begin(); // Install the DFU helper
// Setup the Heart Rate Monitor service using
// BLEService and BLECharacteristic classes