From b91df0356e5e2da49a40c37eb1bec134fd74f204 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20B=C3=B6hlin?= Date: Sun, 11 Aug 2024 19:40:36 +0200 Subject: [PATCH] Fix for platform IO vs arduino lib --- examples/arduino/sleeping_node/sleeping_node.ino | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/arduino/sleeping_node/sleeping_node.ino b/examples/arduino/sleeping_node/sleeping_node.ino index 95ef14c..51b8c99 100644 --- a/examples/arduino/sleeping_node/sleeping_node.ino +++ b/examples/arduino/sleeping_node/sleeping_node.ino @@ -87,8 +87,13 @@ EspNowNode::OnStatus _on_status = [](EspNowNode::Status status) { EspNowPreferences _esp_now_preferences; EspNowCrypt _esp_now_crypt(esp_now_encryption_key, esp_now_encryption_secret); +#ifdef PLATFORMIO // Uses arduino_esp_crt_bundle_attach +EspNowNode _esp_now_node(_esp_now_crypt, _esp_now_preferences, FIRMWARE_VERSION, _on_status, _on_log, + arduino_esp_crt_bundle_attach); +#else // uses esp_crt_bundle_attach EspNowNode _esp_now_node(_esp_now_crypt, _esp_now_preferences, FIRMWARE_VERSION, _on_status, _on_log, esp_crt_bundle_attach); +#endif void setup() { Serial.begin(115200);