blynkkk / blynk-library

Blynk library for IoT boards. Works with Arduino, ESP32, ESP8266, Raspberry Pi, Particle, ARM Mbed, etc.
https://blynk.io
MIT License
3.81k stars 1.38k forks source link

ESP32 Bluetooth (classic) compilation error in BlynkSimpleEsp32_BT.h #563

Closed FedericoBusero closed 2 years ago

FedericoBusero commented 2 years ago

Description

Fix compilation problem on ESP32 using Bluetooth Classic

Issues Resolved

In https://github.com/blynkkk/blynk-library/pull/555 a fix was introduced to solve a compilation problem on ESP32 Fixing "error: 'ESP_BT_SCAN_MODE_CONNECTABLE_DISCOVERABLE' was not declared in this scope"

But this fix introduces a compilation error in previous versions of IDF / ESP32 Arduino Core.

Now it will check the IDF version and depending on version 3 or 4, it will compile using other code.