Skip to content

Commit ef8667b

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

File tree

4 files changed

+17
-20
lines changed

4 files changed

+17
-20
lines changed

src/AIoTC_Config.h

+6
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

+1-1
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

+2
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

+8-19
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)