set ntp parameters via config file

This commit is contained in:
Emanuele Trabattoni
2025-08-03 12:11:00 +02:00
parent a1a66ebf8e
commit 4a1e944ea2
6 changed files with 39 additions and 20 deletions

View File

@@ -30,15 +30,17 @@ namespace drivers
{
public:
Ethernet(const std::string hostname);
Ethernet(const std::string &hostname, const std::string &ntpPool, const int8_t tz, const uint16_t updateInterval);
~Ethernet();
void onEvent(arduino_event_id_t event, arduino_event_info_t info);
const bool isConnected();
const bool getNtpTime(time_t &time);
const bool setNtpTimeOffset(const int8_t tz);
private:
const std::string m_hostname;
const std::string m_ntpPool;
bool m_connected;
NetworkUDP m_udp;
IPAddress m_localIP;