timemanager reworked
This commit is contained in:
1 parent
feda8dd938
commit
98797c0fe1
12 files changed
+68
-85
No files matched your search
+1
-1
@@ -5,7 +5,7 @@
|
||||
#include "senddata.h"
|
||||
#include "rcommand.h"
|
||||
#include "spislave.h"
|
||||
#include "timemanager.h"
|
||||
#include "timekeeper.h"
|
||||
#include <lmic.h>
|
||||
|
||||
#ifdef HAS_BME
|
||||
|
||||
+1
-2
@@ -108,13 +108,12 @@ 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; // 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, userUTCTime;
|
||||
extern time_t userUTCTime;
|
||||
|
||||
// application includes
|
||||
#include "led.h"
|
||||
|
||||
+1
-1
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "globals.h"
|
||||
#include "rcommand.h"
|
||||
#include "timekeeper.h"
|
||||
|
||||
// LMIC-Arduino LoRaWAN Stack
|
||||
#include <lmic.h>
|
||||
@@ -10,7 +11,6 @@
|
||||
#include <SPI.h>
|
||||
#include <arduino_lmic_hal_boards.h>
|
||||
#include "loraconf.h"
|
||||
#include "rtctime.h"
|
||||
|
||||
// Needed for 24AA02E64, does not hurt anything if included and not used
|
||||
#ifdef MCP_24AA02E64_I2C_ADDRESS
|
||||
|
||||
+1
-1
@@ -17,5 +17,5 @@
|
||||
#include "led.h"
|
||||
#include "spislave.h"
|
||||
#include "lorawan.h"
|
||||
#include "timemanager.h"
|
||||
#include "timekeeper.h"
|
||||
#endif
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
#define _RTCTIME_H
|
||||
|
||||
#include "globals.h"
|
||||
#include "timemanager.h"
|
||||
#include "timekeeper.h"
|
||||
#include <Wire.h> // must be included here so that Arduino library object file references work
|
||||
#include <RtcDS3231.h>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef _timemanager_H
|
||||
#define _timemanager_H
|
||||
#ifndef _timekeeper_H
|
||||
#define _timekeeper_H
|
||||
|
||||
#include "globals.h"
|
||||
#include "rtctime.h"
|
||||
@@ -15,17 +15,17 @@
|
||||
|
||||
enum timesources { pps, rtc, lora, unsynced };
|
||||
|
||||
void IRAM_ATTR CLOCKIRQ(void);
|
||||
void clock_init(void);
|
||||
void clock_loop(void *pvParameters);
|
||||
void time_sync(void);
|
||||
int wait_for_pulse(void);
|
||||
int syncTime(time_t const t, uint8_t const timesource);
|
||||
void IRAM_ATTR CLOCKIRQ(void);
|
||||
int timepulse_init(void);
|
||||
void timepulse_start(void);
|
||||
int TimeIsValid(time_t const t);
|
||||
uint8_t wait_for_pulse(void);
|
||||
uint8_t syncTime(time_t const t, uint8_t const caller);
|
||||
uint8_t timepulse_init(void);
|
||||
uint8_t TimeIsValid(time_t const t);
|
||||
time_t compiledUTC(void);
|
||||
time_t tmConvert(uint16_t YYYY, uint8_t MM, uint8_t DD, uint8_t hh,
|
||||
uint8_t mm, uint8_t ss);
|
||||
|
||||
#endif // _timemanager_H
|
||||
#endif // _timekeeper_H
|
||||
Reference in new issue
Block a user