From 1a0dacaf3facfba938489c6ab16308e9d80f8ae2 Mon Sep 17 00:00:00 2001 From: Florian <1technophile@users.noreply.github.com> Date: Fri, 21 Jun 2019 23:03:37 +0200 Subject: [PATCH] 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 --- OpenMQTTGateway.ino | 6 ------ User_config.h | 5 ----- ZgatewayBT.ino | 16 ---------------- 3 files changed, 27 deletions(-) diff --git a/OpenMQTTGateway.ino b/OpenMQTTGateway.ino index 1a9d723..9fdb49b 100644 --- a/OpenMQTTGateway.ino +++ b/OpenMQTTGateway.ino @@ -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")); diff --git a/User_config.h b/User_config.h index 42bba21..367cd5c 100644 --- a/User_config.h +++ b/User_config.h @@ -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 diff --git a/ZgatewayBT.ino b/ZgatewayBT.ino index 67ced07..3ed36a9 100644 --- a/ZgatewayBT.ino +++ b/ZgatewayBT.ino @@ -154,7 +154,6 @@ vector 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 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 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;