Disable BLE for ESP32S2

This commit is contained in:
Magnus Persson 2022-10-15 17:41:17 +02:00
parent 531baa917e
commit 6e0af97574
3 changed files with 7 additions and 7 deletions

View File

@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#if defined(ESP32)
#if defined(ESP32) && !defined(ESP32S2)
#include <ble.hpp>
#include <string>
@ -99,4 +99,4 @@ void BleSender::sendData(float tempF, float gravSG) {
delay(100);
}
#endif // ESP32
#endif // ESP32 && !ESP32S2

View File

@ -24,7 +24,7 @@ SOFTWARE.
#ifndef SRC_BLE_HPP_
#define SRC_BLE_HPP_
#if defined(ESP32)
#if defined(ESP32) && !defined(ESP32S2)
#include <NimBLEBeacon.h>
#include <NimBLEDevice.h>
@ -43,5 +43,5 @@ class BleSender {
void sendData(float tempF, float gravSG);
};
#endif // ESP32
#endif // ESP32 && !ESP32S2
#endif // SRC_BLE_HPP_

View File

@ -159,7 +159,7 @@ void setup() {
LOG_PERF_START("main-config-load");
myConfig.checkFileSystem();
checkResetReason();
//checkResetReason();
myConfig.loadFile();
myWifi.init();
myAdvancedConfig.loadFile();
@ -310,13 +310,13 @@ bool loopReadGravity() {
pushMillis = millis();
LOG_PERF_START("loop-push");
#if defined(ESP32)
#if defined(ESP32) && !defined(ESP32S2)
if (myConfig.isBLEActive()) {
BleSender ble(myConfig.getColorBLE());
ble.sendData(convertCtoF(tempC), gravitySG);
Log.notice(F("MAIN: Broadcast data over bluetooth." CR));
}
#endif
#endif // ESP32 && !ESP32S2
if (myWifi.isConnected()) { // no need to try if there is no wifi
// connection.