|
|
@ -22,24 +22,16 @@ httpd_cgi_state ICACHE_FLASH_ATTR tplScreen(HttpdConnData *connData, char *token |
|
|
|
return HTTPD_CGI_DONE; |
|
|
|
return HTTPD_CGI_DONE; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
char buff[100]; |
|
|
|
char buff[150]; |
|
|
|
char buff2[10]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (streq(token, "term_title")) { |
|
|
|
if (streq(token, "labels_seq")) { |
|
|
|
httpdSend(connData, termconf_scratch.title, -1); |
|
|
|
screenSerializeLabelsToBuffer(buff, 150); |
|
|
|
|
|
|
|
httpdSend(connData, buff, -1); |
|
|
|
} |
|
|
|
} |
|
|
|
else if (streq(token, "theme")) { |
|
|
|
else if (streq(token, "theme")) { |
|
|
|
sprintf(buff, "%d", termconf->theme); |
|
|
|
sprintf(buff, "%d", termconf->theme); |
|
|
|
httpdSend(connData, buff, -1); |
|
|
|
httpdSend(connData, buff, -1); |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
|
|
|
|
for (int i = 1; i <= 5; i++) { |
|
|
|
|
|
|
|
sprintf(buff2, "btn%d", i); |
|
|
|
|
|
|
|
if (streq(token, buff2)) { |
|
|
|
|
|
|
|
httpdSend(connData, termconf_scratch.btn[i-1], -1); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return HTTPD_CGI_DONE; |
|
|
|
return HTTPD_CGI_DONE; |
|
|
|
} |
|
|
|
} |
|
|
|