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