Skip to content

Commit 2e48a0e

Browse files
committed
Move includes on top of file
1 parent c862434 commit 2e48a0e

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

src/utility/time/TimeService.cpp

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,20 @@
1919
* INCLUDE
2020
**************************************************************************************/
2121

22-
#include "TimeService.h"
22+
#include <AIoTC_Config.h>
2323

2424
#include <time.h>
25-
25+
#include "TimeService.h"
2626
#include "NTPUtils.h"
2727

28+
#ifdef ARDUINO_ARCH_SAMD
29+
#include <RTCZero.h>
30+
#endif
31+
32+
#ifdef ARDUINO_ARCH_MBED
33+
#include <mbed_rtc_time.h>
34+
#endif
35+
2836
#ifdef ARDUINO_ARCH_ESP8266
2937
#include "RTCMillis.h"
3038
#endif
@@ -288,9 +296,7 @@ bool TimeService::connected()
288296

289297
unsigned long TimeService::getRemoteTime()
290298
{
291-
#include "../../AIoTC_Config.h"
292299
#ifndef HAS_LORA
293-
294300
if(connected()) {
295301
/* At first try to see if a valid time can be obtained
296302
* using the network time available via the connection

src/utility/time/TimeService.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,6 @@
2424

2525
#include <Arduino_ConnectionHandler.h>
2626

27-
#ifdef ARDUINO_ARCH_SAMD
28-
#include <RTCZero.h>
29-
#endif
30-
31-
#ifdef ARDUINO_ARCH_MBED
32-
#include <mbed_rtc_time.h>
33-
#endif
34-
3527
/**************************************************************************************
3628
* CLASS DECLARATION
3729
**************************************************************************************/

0 commit comments

Comments
 (0)