mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-11 22:15:42 +00:00
remove old uart tool
This commit is contained in:
@ -1542,49 +1542,6 @@ int http_fn_startup_command(http_request_t* request) {
|
||||
poststr(request, NULL);
|
||||
return 0;
|
||||
}
|
||||
int http_fn_uart_tool(http_request_t* request) {
|
||||
char tmpA[256];
|
||||
int resultLen = 0;
|
||||
http_setup(request, httpMimeTypeHTML);
|
||||
http_html_start(request, "UART tool");
|
||||
poststr_h4(request, "UART Tool");
|
||||
|
||||
if (http_getArg(request->url, "data", tmpA, sizeof(tmpA))) {
|
||||
#ifdef ENABLE_DRIVER_TUYAMCU
|
||||
byte results[128];
|
||||
|
||||
hprintf255(request, "<h3>Sent %s!</h3>", tmpA);
|
||||
if (0) {
|
||||
TuyaMCU_Send((byte*)tmpA, strlen(tmpA));
|
||||
// bk_send_string(0,tmpA);
|
||||
}
|
||||
else {
|
||||
byte b;
|
||||
const char* p;
|
||||
|
||||
p = tmpA;
|
||||
while (*p) {
|
||||
b = hexbyte(p);
|
||||
results[resultLen] = b;
|
||||
resultLen++;
|
||||
p += 2;
|
||||
}
|
||||
TuyaMCU_Send(results, resultLen);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
strcpy(tmpA, "Hello UART world");
|
||||
}
|
||||
|
||||
add_label_text_field(request, "Data", "data", tmpA, "<form action=\"/uart_tool\">");
|
||||
poststr(request, SUBMIT_AND_END_FORM);
|
||||
|
||||
poststr(request, htmlFooterReturnToCfgLink);
|
||||
http_html_end(request);
|
||||
poststr(request, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void doHomeAssistantDiscovery(const char* topic, http_request_t* request) {
|
||||
int i;
|
||||
@ -2020,7 +1977,6 @@ int http_fn_cfg(http_request_t* request) {
|
||||
postFormAction(request, "ota", "OTA (update software by WiFi)");
|
||||
postFormAction(request, "cmd_tool", "Execute custom command");
|
||||
postFormAction(request, "flash_read_tool", "Flash Read Tool");
|
||||
postFormAction(request, "uart_tool", "UART Tool");
|
||||
postFormAction(request, "startup_command", "Change startup command text");
|
||||
|
||||
#if 0
|
||||
|
||||
@ -17,7 +17,6 @@ int http_fn_cfg_wifi(http_request_t* request);
|
||||
int http_fn_cfg_mac(http_request_t* request);
|
||||
int http_fn_flash_read_tool(http_request_t* request);
|
||||
int http_fn_cmd_tool(http_request_t* request);
|
||||
int http_fn_uart_tool(http_request_t* request);
|
||||
int http_fn_ha_cfg(http_request_t* request);
|
||||
int http_fn_ha_discovery(http_request_t* request);
|
||||
int http_fn_cfg(http_request_t* request);
|
||||
|
||||
@ -725,7 +725,6 @@ int HTTP_ProcessPacket(http_request_t* request) {
|
||||
if (http_checkUrlBase(urlStr, "cfg_mac")) return http_fn_cfg_mac(request);
|
||||
|
||||
if (http_checkUrlBase(urlStr, "flash_read_tool")) return http_fn_flash_read_tool(request);
|
||||
if (http_checkUrlBase(urlStr, "uart_tool")) return http_fn_uart_tool(request);
|
||||
if (http_checkUrlBase(urlStr, "cmd_tool")) return http_fn_cmd_tool(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);
|
||||
|
||||
Reference in New Issue
Block a user