only one announcer seems supported in ESP32 BLE, so use that for our mesh service

This commit is contained in:
geeksville
2020-02-13 11:53:46 -08:00
parent 59aaffa3e5
commit a7b5da5dd2
2 changed files with 13 additions and 9 deletions

View File

@@ -382,6 +382,9 @@ void setup()
DEBUG_MSG("Starting bluetooth\n");
BLEServer *serve = initBLE(getDeviceName(), HW_VENDOR, APP_VERSION); // FIXME, use a real name based on the macaddr
createMeshBluetoothService(serve);
// Start advertising - this must be done _after_ creating all services
serve->getAdvertising()->start();
}
enableModemSleep();
@@ -422,9 +425,12 @@ void loop()
if (axp.isVbusRemoveIRQ())
isCharging = false;
// This is not a GPIO actually connected on the tbeam board
// digitalWrite(2, !digitalRead(2));
axp.clearIRQ();
if (axp.isAcinPlugInIRQ())
fixme - cleanup all this is chrarging crap.just read the status registers then clear the irq
isUSBPowered = true
// This is not a GPIO actually connected on the tbeam board
// digitalWrite(2, !digitalRead(2));
axp.clearIRQ();
}
#endif
}