Remove mono core option for ESP32 BLE
this options is no longer used as now the ESP32 is a stable board with multicore option activated
This commit is contained in:
1 parent
6996867e53
commit
1a0dacaf3f
3 files changed
-27
No files matched your search
@@ -646,12 +646,6 @@ void loop()
|
||||
#ifdef ZgatewayIR
|
||||
IRtoMQTT();
|
||||
#endif
|
||||
#ifdef ZgatewayBT
|
||||
#ifndef multiCore
|
||||
if(BTtoMQTT())
|
||||
trc(F("BTtoMQTT OK"));
|
||||
#endif
|
||||
#endif
|
||||
#ifdef Zgateway2G
|
||||
if(_2GtoMQTT()){
|
||||
trc(F("2GtoMQTT OK"));
|
||||
|
||||
@@ -175,11 +175,6 @@ const byte subnet[] = { 255, 255, 255, 0 }; //ip adress
|
||||
//variables to avoid duplicates
|
||||
#define time_avoid_duplicate 3000 // if you want to avoid duplicate mqtt message received set this to > 0, the value is the time in milliseconds during which we don't publish duplicates
|
||||
|
||||
//uncomment to use multicore function of ESP32 for BLE
|
||||
#ifdef ESP32
|
||||
#define multiCore //comment to don't use multicore function of ESP32 for BLE
|
||||
#endif
|
||||
|
||||
#if defined(ESP8266) || defined(ESP32) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1280__)
|
||||
#define JSON_MSG_BUFFER 512 // Json message max buffer size, don't put 1024 or higher it is causing unexpected behaviour on ESP8266
|
||||
#else // boards with smaller memory
|
||||
|
||||
@@ -154,7 +154,6 @@ vector<BLEdevice> devices;
|
||||
BLEinterval = TimeBtw_Read;
|
||||
trc(F("BLEinterval btw scans"));
|
||||
trc(BLEinterval);
|
||||
#ifdef multiCore
|
||||
// we setup a task with priority one to avoid conflict with other gateways
|
||||
xTaskCreatePinnedToCore(
|
||||
coreTask, /* Function to implement the task */
|
||||
@@ -165,12 +164,8 @@ vector<BLEdevice> devices;
|
||||
NULL, /* Task handle. */
|
||||
taskCore); /* Core where the task should run */
|
||||
trc(F("ZgatewayBT multicore ESP32 setup done "));
|
||||
#else
|
||||
trc(F("ZgatewayBT singlecore ESP32 setup done "));
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef multiCore
|
||||
void coreTask( void * pvParameters ){
|
||||
|
||||
String taskMessage = "BT Task running on core ";
|
||||
@@ -185,17 +180,6 @@ vector<BLEdevice> devices;
|
||||
boolean BTtoMQTT(){ // for on demande BLE scans
|
||||
BLEscan();
|
||||
}
|
||||
#else
|
||||
boolean BTtoMQTT(){
|
||||
unsigned long now = millis();
|
||||
if (now > (timeBLE + BLEinterval)) {
|
||||
timeBLE = now;
|
||||
BLEscan();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
void BLEscan(){
|
||||
|
||||
TIMERG0.wdt_wprotect=TIMG_WDT_WKEY_VALUE;
|
||||
|
||||
Reference in new issue
Block a user