show real sdk version, make tpw setting actually work

http-comm
Ondřej Hruška 7 years ago
parent ca5a7e3de9
commit 1a8d3cb332
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 4
      esphttpdconfig.mk
  2. 2
      libesphttpd
  3. 3
      user/cgi_main.c
  4. 12
      user/cgi_system.c
  5. 4
      user/persist.h
  6. 25
      user/screen.c
  7. 4
      user/version.h
  8. 4
      user/wifimgr.c

@ -43,12 +43,12 @@ GLOBAL_CFLAGS = \
-DDEBUG_CAPTDNS=0 \
-DDEBUG_HTTP=0 \
-DDEBUG_ESPFS=0 \
-DDEBUG_PERSIST=0 \
-DDEBUG_PERSIST=1 \
-DDEBUG_UTFCACHE=0 \
-DDEBUG_CGI=0 \
-DDEBUG_WIFI=0 \
-DDEBUG_WS=0 \
-DDEBUG_ANSI=0 \
-DDEBUG_ANSI=1 \
-DDEBUG_ANSI_NOIMPL=1 \
-DDEBUG_INPUT=0 \
-DDEBUG_HEAP=1 \

@ -1 +1 @@
Subproject commit 24f9a371eb5c0804dcc6657f99449ef07788140c
Subproject commit 3479ab3efcb4581669370cde6a607f936ff5515a

@ -68,7 +68,8 @@ tplAbout(HttpdConnData *connData, char *token, void **arg)
tplSend(connData, httpdGetVersion(), -1);
}
else if (streq(token, "vers_sdk")) {
tplSend(connData, STR(ESP_SDK_VERSION), -1);
//tplSend(connData, STR(ESP_SDK_VERSION), -1);
tplSend(connData, system_get_sdk_version(), -1);
}
else if (streq(token, "hash_backend")) {
tplSend(connData, GIT_HASH_BACKEND, -1);

@ -234,10 +234,18 @@ tplSystemCfg(HttpdConnData *connData, char *token, void **arg)
if (streq(token, "pwlock")) {
sprintf(buff, "%d", sysconf->pwlock);
}
if (streq(token, "access_name")) {
else if (streq(token, "access_name")) {
sprintf(buff, "%s", sysconf->access_name);
}
else if (streq(token, "def_access_name")) {
sprintf(buff, "%s", DEF_ACCESS_NAME);
}
else if (streq(token, "def_access_pw")) {
sprintf(buff, "%s", DEF_ACCESS_PW);
}
else if (streq(token, "def_admin_pw")) {
sprintf(buff, "%s", DEFAULT_ADMIN_PW);
}
tplSend(connData, buff, -1);
return HTTPD_CGI_DONE;

@ -18,7 +18,7 @@
// Changing this could be used to force-erase the config area
// after a firmware upgrade
#define CHECKSUM_SALT 5
#define CHECKSUM_SALT 6
#define APPCONF_SIZE 1900
@ -52,7 +52,7 @@ typedef struct { // the entire block should be 1024 bytes long (for compatibilit
uint32_t checksum; // computed before write and tested on load. If it doesn't match, values are reset to hard defaults.
} AppConfigBundle;
#define ADMINCONF_VERSION 0
#define ADMINCONF_VERSION 1
#define ADMINCONF_SIZE 256
typedef struct {

@ -339,6 +339,20 @@ screen_reset_do(bool size, bool labels)
scr.tab_stops[i] = 0x80808080;
}
if (labels) {
strcpy(termconf_live.title, termconf->title);
for (int i = 1; i <= TERM_BTN_COUNT; i++) {
strcpy(termconf_live.btn[i], termconf->btn[i]);
strcpy(termconf_live.btn_msg[i], termconf->btn_msg[i]);
}
termconf_live.show_buttons = termconf->show_buttons;
termconf_live.show_config_links = termconf->show_config_links;
screen_notifyChange(CHANGE_LABELS);
}
// initial values in the save buffer in case of receiving restore without storing first
opt_backup.cursors_alt_mode = scr.cursors_alt_mode;
opt_backup.reverse_video = scr.reverse_video;
@ -355,17 +369,6 @@ screen_reset_do(bool size, bool labels)
opt_backup.show_config_links = termconf_live.show_config_links;
NOTIFY_DONE();
if (labels) {
strcpy(termconf_live.title, termconf->title);
for (int i = 1; i <= TERM_BTN_COUNT; i++) {
strcpy(termconf_live.btn[i], termconf->btn[i]);
strcpy(termconf_live.btn_msg[i], termconf->btn_msg[i]);
}
screen_notifyChange(CHANGE_LABELS);
}
}
/**

@ -6,8 +6,8 @@
#define ESP_VT100_FIRMWARE_VERSION_H
#define FW_V_MAJOR 1
#define FW_V_MINOR 1
#define FW_V_PATCH 2
#define FW_V_MINOR 2
#define FW_V_PATCH 0
#define FIRMWARE_VERSION STR(FW_V_MAJOR) "." STR(FW_V_MINOR) "." STR(FW_V_PATCH)
#define FIRMWARE_VERSION_NUM (FW_V_MAJOR*1000 + FW_V_MINOR*10 + FW_V_PATCH) // this is used in ID queries

@ -187,6 +187,10 @@ wifimgr_apply_settings(void)
configure_ap();
}
// tpw seems to be common - but info is scarce
// at any rate seems to do no harm to have it here
system_phy_set_max_tpw(wificonf->tpw);
wifi_change_flags.ap = false;
wifi_change_flags.sta = false;

Loading…
Cancel
Save