Skip to content
Snippets Groups Projects
Commit 2407d7e2 authored by thiebolt's avatar thiebolt
Browse files

corrected display of currently used NTP server(s)

parent ba3614f8
Branches
Tags
1 merge request!3Feature SDK upgrade
...@@ -2,16 +2,14 @@ ...@@ -2,16 +2,14 @@
# neOCampus operation # neOCampus operation
# (c) neOCampus / F.Thiebolt Université Toulouse3, Laboratoire IRIT # (c) neOCampus / F.Thiebolt Université Toulouse3, Laboratoire IRIT
=== upcoming feature-SDKupgrade === Release 220815 / upcoming feature-SDKupgrade
Bumps to esp32 2.0.4 Bumps to esp32 2.0.4
Bumps to esp8266 3.0.2 Bumps to esp8266 3.0.2
- we're still using the deprecated SPIFFS filesystem - we're still using the deprecated SPIFFS filesystem
- updated boards.local.txt - updated boards.local.txt
- _http_get now makes use of newer API involving a WIFIClient variable - _http_get now makes use of newer API involving a WIFIClient variable
- uniformized sntp includes for all ESP :) - uniformized sntp includes for all ESP :)
TBC that NTP servers sent by the DHCP server are in use
- WIFImanager now used without mod - WIFImanager now used without mod
TBC that options appears valid when setting up the device
- switched noise ISR from ICACHE_RAM_ATTR to newer IRAM_ATTR - switched noise ISR from ICACHE_RAM_ATTR to newer IRAM_ATTR
[esp32] [esp32]
- recompiled lwip for NTP server support from DHCP answer (IDF 4.4.2) - recompiled lwip for NTP server support from DHCP answer (IDF 4.4.2)
......
...@@ -394,25 +394,15 @@ void endLoop( void ) { ...@@ -394,25 +394,15 @@ void endLoop( void ) {
// display NTP servers used for time sync // display NTP servers used for time sync
if( _cbtime_call ) { if( _cbtime_call ) {
_cbtime_call = false; _cbtime_call = false;
//log_debug(F("\n[NTP_sync] IP_ADDR_ANY = "));log_debug(ipaddr_ntoa(&ip_addr_any));log_flush();
// list active ntp servers // list active ntp servers
for( uint8_t i=0; i<SNTP_MAX_SERVERS; i++ ) { for( uint8_t i=0; i<SNTP_MAX_SERVERS; i++ ) {
IPAddress sntp = *(IPAddress *)sntp_getserver(i); const ip_addr_t* p_cur = sntp_getserver(i);
const char* sntp_name = sntp_getservername(i); if( ip_addr_cmp(p_cur, IP_ADDR_ANY) ) continue;
// check if address is valid log_debug(F("\n[NTP_sync] IPaddr = "));log_debug(ipaddr_ntoa(p_cur));log_flush();
#ifdef ESP8266 }
if( sntp.isSet() ) {
#elif defined(ESP32)
if( sntp != IPADDR_ANY ) {
#endif
log_debugF("\n[NTP][%d]: ", i);
if( sntp_name ) {
log_debugF("%s (%s) ", sntp_name, sntp.toString().c_str());
} else {
log_debugF("%s ", sntp.toString().c_str());
}
}
}
} }
// serial link activity marker ... // serial link activity marker ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment