mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-11 02:15:45 +00:00
as requested; allow users to change boot success mark time - part 1
This commit is contained in:
@ -1159,6 +1159,7 @@ int http_fn_cfg(http_request_t *request) {
|
||||
poststr(request,htmlHeader);
|
||||
poststr(request,g_header);
|
||||
poststr(request,"<form action=\"cfg_pins\"><input type=\"submit\" value=\"Configure Module\"/></form>");
|
||||
poststr(request,"<form action=\"cfg_generic\"><input type=\"submit\" value=\"Configure General\"/></form>");
|
||||
poststr(request,"<form action=\"cfg_quick\"><input type=\"submit\" value=\"Quick Config\"/></form>");
|
||||
poststr(request,"<form action=\"cfg_wifi\"><input type=\"submit\" value=\"Configure WiFi\"/></form>");
|
||||
poststr(request,"<form action=\"cfg_mqtt\"><input type=\"submit\" value=\"Configure MQTT\"/></form>");
|
||||
@ -1321,6 +1322,42 @@ int http_fn_cfg_pins(http_request_t *request) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int http_fn_cfg_generic(http_request_t *request) {
|
||||
int iChanged = 0;
|
||||
int iChangedRequested = 0;
|
||||
int i;
|
||||
char tmpA[128];
|
||||
char tmpB[64];
|
||||
|
||||
http_setup(request, httpMimeTypeHTML);
|
||||
poststr(request,htmlHeader);
|
||||
poststr(request,g_header);
|
||||
|
||||
if( http_getArg(request->url,"boot_ok_delay",tmpA,sizeof(tmpA))) {
|
||||
i = atoi(tmpA);
|
||||
if(i <= 0) {
|
||||
poststr(request,"<h5>Boot ok delay must be at least 1 second<h5>");
|
||||
i = 1;
|
||||
}
|
||||
hprintf128(request,"<h5>Setting boot OK delay to %i<h5>",i);
|
||||
CFG_SetBootOkSeconds(i);
|
||||
}
|
||||
|
||||
poststr(request,"<form action=\"/cfg_generic\">\
|
||||
<label for=\"boot_ok_delay\">Uptime seconds required to mark boot as ok:</label><br>\
|
||||
<input type=\"text\" id=\"boot_ok_delay\" name=\"boot_ok_delay\" value=\"");
|
||||
hprintf128(request, "%i",CFG_GetBootOkSeconds());
|
||||
poststr(request,"\"><br>\"");
|
||||
poststr(request,"<input type=\"submit\" value=\"Save\"/></form>");
|
||||
|
||||
poststr(request,htmlReturnToCfg);
|
||||
HTTP_AddBuildFooter(request);
|
||||
poststr(request,htmlEnd);
|
||||
|
||||
poststr(request, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void XR809_RequestOTAHTTP(const char *s);
|
||||
|
||||
int http_fn_ota_exec(http_request_t *request) {
|
||||
|
||||
@ -29,3 +29,4 @@ int http_fn_empty_url(http_request_t *request);
|
||||
int http_fn_other(http_request_t *request);
|
||||
int http_fn_cm(http_request_t *request);
|
||||
int http_fn_startup_command(http_request_t *request);
|
||||
int http_fn_cfg_generic(http_request_t *request);
|
||||
|
||||
@ -530,6 +530,7 @@ int HTTP_ProcessPacket(http_request_t *request) {
|
||||
if(http_checkUrlBase(urlStr,"cmd_tool")) return http_fn_cmd_tool(request);
|
||||
if(http_checkUrlBase(urlStr,"config_dump_table")) return http_fn_config_dump_table(request);
|
||||
if(http_checkUrlBase(urlStr,"startup_command")) return http_fn_startup_command(request);
|
||||
if(http_checkUrlBase(urlStr,"cfg_generic")) return http_fn_cfg_generic(request);
|
||||
|
||||
if(http_checkUrlBase(urlStr,"cfg_quick")) return http_fn_cfg_quick(request);
|
||||
if(http_checkUrlBase(urlStr,"cfg_ha")) return http_fn_cfg_ha(request);
|
||||
|
||||
Reference in New Issue
Block a user