Skip to content

Commit 37ae480

Browse files
committed
chore: Enable IDE compilation
1 parent a8e89dc commit 37ae480

File tree

10 files changed

+23
-26
lines changed

10 files changed

+23
-26
lines changed

examples/ArduinoIoTCloud-Advanced/arduino_secrets.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/* A complete list of supported boards with WiFi is available here:
44
* https://github.com/arduino-libraries/ArduinoIoTCloud/#what
55
*/
6-
#if defined(BOARD_HAS_WIFI)
6+
#if defined(USE_NOTECARD) || defined(BOARD_HAS_WIFI)
77
#define SECRET_WIFI_SSID "YOUR_WIFI_NETWORK_NAME"
88
#define SECRET_WIFI_PASS "YOUR_WIFI_PASSWORD"
99
#endif

examples/ArduinoIoTCloud-Basic/arduino_secrets.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/* A complete list of supported boards with WiFi is available here:
44
* https://github.com/arduino-libraries/ArduinoIoTCloud/#what
55
*/
6-
#if defined(BOARD_HAS_WIFI)
6+
#if defined(USE_NOTECARD) || defined(BOARD_HAS_WIFI)
77
#define SECRET_WIFI_SSID "YOUR_WIFI_NETWORK_NAME"
88
#define SECRET_WIFI_PASS "YOUR_WIFI_PASSWORD"
99
#endif

examples/ArduinoIoTCloud-Callbacks/arduino_secrets.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/* A complete list of supported boards with WiFi is available here:
44
* https://github.com/arduino-libraries/ArduinoIoTCloud/#what
55
*/
6-
#if defined(BOARD_HAS_WIFI)
6+
#if defined(USE_NOTECARD) || defined(BOARD_HAS_WIFI)
77
#define SECRET_WIFI_SSID "YOUR_WIFI_NETWORK_NAME"
88
#define SECRET_WIFI_PASS "YOUR_WIFI_PASSWORD"
99
#endif

examples/ArduinoIoTCloud-DeferredOTA/arduino_secrets.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/* A complete list of supported boards with WiFi is available here:
44
* https://github.com/arduino-libraries/ArduinoIoTCloud/#what
55
*/
6-
#if defined(BOARD_HAS_WIFI)
6+
#if defined(USE_NOTECARD) || defined(BOARD_HAS_WIFI)
77
#define SECRET_WIFI_SSID "YOUR_WIFI_NETWORK_NAME"
88
#define SECRET_WIFI_PASS "YOUR_WIFI_PASSWORD"
99
#endif

examples/ArduinoIoTCloud-Schedule/arduino_secrets.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/* A complete list of supported boards with WiFi is available here:
44
* https://github.com/arduino-libraries/ArduinoIoTCloud/#what
55
*/
6-
#if defined(BOARD_HAS_WIFI)
6+
#if defined(USE_NOTECARD) || defined(BOARD_HAS_WIFI)
77
#define SECRET_WIFI_SSID "YOUR_WIFI_NETWORK_NAME"
88
#define SECRET_WIFI_PASS "YOUR_WIFI_PASSWORD"
99
#endif

examples/utility/ArduinoIoTCloud_Travis_CI/arduino_secrets.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/* A complete list of supported boards with WiFi is available here:
44
* https://github.com/arduino-libraries/ArduinoIoTCloud/#what
55
*/
6-
#if defined(BOARD_HAS_WIFI)
6+
#if defined(USE_NOTECARD) || defined(BOARD_HAS_WIFI)
77
#define SECRET_WIFI_SSID "YOUR_WIFI_NETWORK_NAME"
88
#define SECRET_WIFI_PASS "YOUR_WIFI_PASSWORD"
99
#endif

src/AIoTC_Config.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@
1818
#ifndef ARDUINO_AIOTC_CONFIG_H_
1919
#define ARDUINO_AIOTC_CONFIG_H_
2020

21+
#if defined __has_include
22+
#if __has_include (<Notecard.h>)
23+
#define USE_NOTECARD
24+
#endif
25+
#endif
26+
2127
#include <ArduinoECCX08Config.h>
2228

2329
/******************************************************************************

src/ArduinoIoTCloudNotecard.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ ArduinoIoTCloudNotecard::State ArduinoIoTCloudNotecard::handle_ConfigureNotehub(
211211
#if defined(BOARD_HAS_SECRET_KEY)
212212
if (reinterpret_cast<NotecardConnectionHandler *>(_connection)->syncSecretDeviceKey(_secret_device_key)) {
213213
DEBUG_WARNING("ArduinoIoTCloudNotecard::%s failed to set secret device key", __FUNCTION__);
214-
DEBUG_WARNING("You may manually enter the secret key on Notehub as a device level environment variable named `arduino_iot_cloud_secret_key`");
214+
DEBUG_WARNING("You may manually enter the secret key on Notehub as a device level environment variable named `arduino_iot_cloud_secret_device_key`");
215215
}
216216
#endif
217217

src/utility/time/RTCMillis.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
* INCLUDE
2020
**************************************************************************************/
2121

22+
#include "AIoTC_Config.h"
23+
2224
#if defined(USE_NOTECARD) || defined(ARDUINO_ARCH_ESP8266)
2325

2426
#include <Arduino.h>

src/utility/time/TimeService.cpp

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,35 +19,24 @@
1919
* INCLUDE
2020
**************************************************************************************/
2121

22-
#include <AIoTC_Config.h>
2322

2423
#include <time.h>
25-
#include "TimeService.h"
26-
#include "NTPUtils.h"
24+
25+
#include "AIoTC_Config.h"
2726
#include "AIoTC_Const.h"
27+
#include "NTPUtils.h"
28+
#include "TimeService.h"
2829

29-
#ifdef USE_NOTECARD
30+
#if defined(USE_NOTECARD) || defined(ARDUINO_ARCH_ESP8266)
3031
#include "RTCMillis.h"
31-
#else
32-
33-
#ifdef ARDUINO_ARCH_SAMD
32+
#elif defined(ARDUINO_ARCH_SAMD)
3433
#include <RTCZero.h>
35-
#endif
36-
37-
#ifdef ARDUINO_ARCH_MBED
34+
#elif defined(ARDUINO_ARCH_MBED)
3835
#include <mbed_rtc_time.h>
39-
#endif
40-
41-
#ifdef ARDUINO_ARCH_ESP8266
42-
#include "RTCMillis.h"
43-
#endif
44-
45-
#ifdef ARDUINO_ARCH_RENESAS
36+
#elif defined(ARDUINO_ARCH_RENESAS)
4637
#include "RTC.h"
4738
#endif
4839

49-
#endif /* USE_NOTECARD */
50-
5140
/**************************************************************************************
5241
* GLOBAL VARIABLES
5342
**************************************************************************************/

0 commit comments

Comments
 (0)