Added BLE on ESP32 target.
This commit is contained in:
@ -30,6 +30,7 @@ SOFTWARE.
|
||||
#include <tempsensor.hpp>
|
||||
#include <webserver.hpp>
|
||||
#include <wifi.hpp>
|
||||
#include <ble.hpp>
|
||||
|
||||
// Define constats for this program
|
||||
#ifdef DEACTIVATE_SLEEPMODE
|
||||
@ -248,6 +249,14 @@ bool loopReadGravity() {
|
||||
angle, tempC, gravity, corrGravity);
|
||||
#endif
|
||||
|
||||
#if defined (ESP32)
|
||||
if (myConfig.isBLEActive()) {
|
||||
BleSender ble(myConfig.getColorBLE());
|
||||
ble.sendData( convertCtoF(tempC), gravitySG);
|
||||
Log.notice(F("MAIN: Broadcast data over bluetooth." CR));
|
||||
}
|
||||
#endif
|
||||
|
||||
bool pushExpired = (abs((int32_t)(millis() - pushMillis)) >
|
||||
(myConfig.getSleepInterval() * 1000));
|
||||
|
||||
|
Reference in New Issue
Block a user