timemanager added (v1.7.32)
This commit is contained in:
1 parent
34eb681955
commit
3d26f737be
19 files changed
+277
-310
No files matched your search
@@ -1,15 +0,0 @@
|
||||
#ifndef _CLOCKCONTROLLER_H
|
||||
#define _CLOCKCONTROLLER_H
|
||||
|
||||
#include "globals.h"
|
||||
|
||||
#ifdef HAS_IF482
|
||||
#include "if482.h"
|
||||
#elif defined HAS_DCF77
|
||||
#include "dcf77.h"
|
||||
#endif
|
||||
|
||||
void clock_init(void);
|
||||
void clock_loop(void *pvParameters);
|
||||
|
||||
#endif // _CLOCKCONTROLLER_H
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
#include "senddata.h"
|
||||
#include "rcommand.h"
|
||||
#include "spislave.h"
|
||||
#include "rtctime.h"
|
||||
#include "timemanager.h"
|
||||
#include <lmic.h>
|
||||
|
||||
#ifdef HAS_BME
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
#include <U8x8lib.h>
|
||||
#include "cyclic.h"
|
||||
#include "rtctime.h"
|
||||
|
||||
extern uint8_t volatile DisplayState;
|
||||
extern HAS_DISPLAY u8x8;
|
||||
|
||||
+6
-2
@@ -7,6 +7,7 @@
|
||||
// Time functions
|
||||
#include <Time.h>
|
||||
#include <Timezone.h>
|
||||
#include <RtcDateTime.h>
|
||||
|
||||
// std::set for unified array functions
|
||||
#include <set>
|
||||
@@ -106,12 +107,15 @@ extern char display_line6[], display_line7[]; // screen buffers
|
||||
extern uint8_t volatile channel; // wifi channel rotation counter
|
||||
extern uint16_t volatile macs_total, macs_wifi, macs_ble,
|
||||
batt_voltage; // display values
|
||||
extern bool volatile TimePulseTick;
|
||||
extern hw_timer_t *sendCycle, *displaytimer;
|
||||
extern bool volatile TimePulseTick; // one-pulse-per-second flags set by GPS or RTC
|
||||
extern bool TimeIsSynced;
|
||||
extern hw_timer_t *sendCycle, *displaytimer, *clockCycle;
|
||||
extern SemaphoreHandle_t I2Caccess, TimePulse;
|
||||
extern TaskHandle_t irqHandlerTask, ClockTask;
|
||||
extern TimerHandle_t WifiChanTimer;
|
||||
extern Timezone myTZ;
|
||||
extern time_t LastSyncTime;
|
||||
extern RtcDateTime compiled;
|
||||
|
||||
// application includes
|
||||
#include "led.h"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define _GPSREAD_H
|
||||
|
||||
#include <TinyGPS++.h> // library for parsing NMEA data
|
||||
#include <RtcDateTime.h>
|
||||
|
||||
#ifdef GPS_I2C // Needed for reading from I2C Bus
|
||||
#include <Wire.h>
|
||||
|
||||
+1
-2
@@ -17,6 +17,5 @@
|
||||
#include "led.h"
|
||||
#include "spislave.h"
|
||||
#include "lorawan.h"
|
||||
#include "rtctime.h"
|
||||
#include "clockcontroller.h"
|
||||
#include "timemanager.h"
|
||||
#endif
|
||||
@@ -5,10 +5,6 @@
|
||||
#include <Wire.h> // must be included here so that Arduino library object file references work
|
||||
#include <RtcDS3231.h>
|
||||
|
||||
#ifdef HAS_GPS
|
||||
#include "gpsread.h"
|
||||
#endif
|
||||
|
||||
extern RtcDS3231<TwoWire> Rtc; // make RTC instance globally available
|
||||
|
||||
int rtc_init(void);
|
||||
@@ -17,12 +13,5 @@ int set_rtctime(time_t t);
|
||||
void sync_rtctime(void);
|
||||
time_t get_rtctime(void);
|
||||
float get_rtctemp(void);
|
||||
void IRAM_ATTR CLOCKIRQ(void);
|
||||
int timepulse_init(void);
|
||||
void timepulse_start(void);
|
||||
int sync_TimePulse(void);
|
||||
int sync_SysTime(time_t);
|
||||
int sync_SysTime(uint32_t t);
|
||||
time_t best_time(void);
|
||||
|
||||
#endif // _RTCTIME_H
|
||||
@@ -0,0 +1,26 @@
|
||||
#ifndef _timemanager_H
|
||||
#define _timemanager_H
|
||||
|
||||
#include "globals.h"
|
||||
#include "rtctime.h"
|
||||
|
||||
#ifdef HAS_GPS
|
||||
#include "gpsread.h"
|
||||
#endif
|
||||
#ifdef HAS_IF482
|
||||
#include "if482.h"
|
||||
#elif defined HAS_DCF77
|
||||
#include "dcf77.h"
|
||||
#endif
|
||||
|
||||
void clock_init(void);
|
||||
void clock_loop(void *pvParameters);
|
||||
void time_sync(void);
|
||||
bool wait_for_pulse(void);
|
||||
int syncTime(time_t);
|
||||
int syncTime(uint32_t t);
|
||||
void IRAM_ATTR CLOCKIRQ(void);
|
||||
int timepulse_init(void);
|
||||
void timepulse_start(void);
|
||||
|
||||
#endif // _timemanager_H
|
||||
Reference in new issue
Block a user