Fork of the espurna firmware for `mhsw` switches
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

29 lines
723 B

// -----------------------------------------------------------------------------
// NtpClient overrides to avoid triggering network sync
// -----------------------------------------------------------------------------
#pragma once
#include <WiFiUdp.h>
#include <NtpClientLib.h>
class NTPClientWrap : public NTPClient {
public:
NTPClientWrap() : NTPClient() {
udp = new WiFiUDP();
_lastSyncd = 0;
}
bool setInterval(int shortInterval, int longInterval) {
_shortInterval = shortInterval;
_longInterval = longInterval;
return true;
}
};
// NOTE: original NTP should be discarded by the linker
// TODO: allow NTP client object to be destroyed
NTPClientWrap NTPw;