Skip to content

Commit

Permalink
ntp: remove legacy module
Browse files Browse the repository at this point in the history
  • Loading branch information
mcspr committed Mar 31, 2021
1 parent b18322a commit 2de44ed
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 384 deletions.
9 changes: 0 additions & 9 deletions code/espurna/config/dependencies.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,6 @@
#define SSDP_SUPPORT 0
#endif

//------------------------------------------------------------------------------
// Change ntp module depending on Core version

#if NTP_SUPPORT && defined(ARDUINO_ESP8266_RELEASE_2_3_0)
#define NTP_LEGACY_SUPPORT 1
#else
#define NTP_LEGACY_SUPPORT 0
#endif

//------------------------------------------------------------------------------
// It looks more natural that one click will enable display
// and long click will switch relay
Expand Down
6 changes: 1 addition & 5 deletions code/espurna/libs/SecureClientHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,7 @@ struct SecureClientChecks {
client.setFingerprint(_buffer);
}
} else if (check == SECURE_CLIENT_CHECK_CA) {
#if NTP_LEGACY_SUPPORT
client.setX509Time(ntpLocal2UTC(now()));
#else
client.setX509Time(now());
#endif
client.setX509Time(now());
if (!certs.getCount()) {
if (config.on_certificate) certs.append(config.on_certificate());
}
Expand Down
4 changes: 2 additions & 2 deletions code/espurna/ntp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Copyright (C) 2019 by Maxim Prokhorov <prokhorov dot max at outlook dot com>

#include "ntp.h"

#if NTP_SUPPORT && !NTP_LEGACY_SUPPORT
#if NTP_SUPPORT

#include <Arduino.h>
#include <coredecls.h>
Expand Down Expand Up @@ -503,4 +503,4 @@ void ntpSetup() {

}

#endif // NTP_SUPPORT && !NTP_LEGACY_SUPPORT
#endif // NTP_SUPPORT
313 changes: 0 additions & 313 deletions code/espurna/ntp_legacy.cpp

This file was deleted.

Loading

0 comments on commit 2de44ed

Please sign in to comment.