Fork of the excellent esp8266-react - https://github.com/rjwats/esp8266-react
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.

30 lines
618 B

  1. #ifndef NTPStatus_h
  2. #define NTPStatus_h
  3. #if defined(ESP8266)
  4. #include <ESP8266WiFi.h>
  5. #include <ESPAsyncTCP.h>
  6. #elif defined(ESP_PLATFORM)
  7. #include <AsyncTCP.h>
  8. #include <WiFi.h>
  9. #endif
  10. #include <ArduinoJson.h>
  11. #include <AsyncJson.h>
  12. #include <ESPAsyncWebServer.h>
  13. #include <NtpClientLib.h>
  14. #include <SecurityManager.h>
  15. #include <TimeLib.h>
  16. #define MAX_NTP_STATUS_SIZE 1024
  17. #define NTP_STATUS_SERVICE_PATH "/rest/ntpStatus"
  18. class NTPStatus {
  19. public:
  20. NTPStatus(AsyncWebServer* server, SecurityManager* securityManager);
  21. private:
  22. void ntpStatus(AsyncWebServerRequest* request);
  23. };
  24. #endif // end NTPStatus_h