 |
ESP3D
3.0
Firmware for ESP boards connected to 3D Printer
|
Go to the documentation of this file.
20 #include "../../include/esp3d_config.h"
21 #if defined (TIMESTAMP_FEATURE)
22 #include "../commands.h"
23 #include "../esp3doutput.h"
24 #include "../settings_esp3d.h"
25 #include "../../modules/authentication/authentication_service.h"
26 #include "../../modules/time/time_server.h"
33 #ifdef AUTHENTICATION_FEATURE
35 output->
printERROR(
"Wrong authentication!", 401);
40 #endif //AUTHENTICATION_FEATURE
43 if (parameter.length() != 0) {
44 #ifdef AUTHENTICATION_FEATURE
46 output->
printERROR(
"Wrong authentication!", 401);
49 #endif //AUTHENTICATION_FEATURE
50 String s =
get_param (cmd_params,
"srv1=");
76 if (s.length() > 0 ) {
83 if (s.length() > 0 ) {
91 if (
hastag(parameter.c_str(),
"SYNC")) {
93 output->
printMSG(
"Contacting time servers");
109 #endif //TIMESTAMP_FEATURE
static bool write_byte(int pos, const uint8_t value)
const char * get_param(const char *cmd_params, const char *label)
bool setTime(const char *stime)
size_t printMSG(const char *s, bool withNL=true)
bool hastag(const char *cmd_params, const char *tag)
bool is_internet_time(bool readfromsettings=false)
size_t printERROR(const char *s, int code_error=200)
static bool write_string(int pos, const char *byte_buffer)
static uint8_t get_max_byte(int pos)
static uint8_t get_max_string_size(int pos)
static uint8_t get_min_byte(int pos)
const char * current_time(time_t t=0)