Get correct Arduino core version

This commit is contained in:
Oleksii Kutuzov 2022-09-04 15:07:55 +02:00 committed by GitHub
parent 0da7b7af89
commit e8b89850fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -57,7 +57,11 @@
#error THIS SKETCH REQUIRES A LATER VERSION OF THE HOMESPAN LIBRARY
#endif
#define ARDUINO_ESP_VERSION STRINGIFY(ARDUINO_ESP32_GIT_DESC)
#ifdef PLATFORMIO
#define ARDUINO_ESP_VERSION STRINGIFY(ESP_ARDUINO_VERSION_MAJOR) "." STRINGIFY(ESP_ARDUINO_VERSION_MINOR) "." STRINGIFY(ESP_ARDUINO_VERSION_PATCH)
#else
#define ARDUINO_ESP_VERSION STRINGIFY(ARDUINO_ESP32_GIT_DESC)
#endif
#if ESP_ARDUINO_VERSION_MAJOR<2
#error HOMESPAN REQUIRES VERSION 2 OF THE ARDUINO ESP32 LIBRARY