fix mouse reports and improve timeout handling
This commit is contained in:
@@ -66,7 +66,6 @@ const char * ip_parts[] = {
|
||||
#define NPARTS ( sizeof( ip_parts )/ sizeof(ip_parts[0]) )
|
||||
|
||||
static const tCGI cgi_handlers[] = {
|
||||
{ "/sendkeys.cgi", sendkeys_cgi },
|
||||
{ "/reboot.cgi", reboot_cgi },
|
||||
};
|
||||
|
||||
@@ -133,7 +132,7 @@ void run_http_server() {
|
||||
|
||||
// start the HTTP web server for keyboard input and config page
|
||||
httpd_init();
|
||||
http_set_cgi_handlers(cgi_handlers, 2);
|
||||
http_set_cgi_handlers(cgi_handlers, 1);
|
||||
for (size_t i = 0; i < LWIP_ARRAYSIZE(ssi_tags); i++) {
|
||||
LWIP_ASSERT("tag too long for LWIP_HTTPD_MAX_TAG_NAME_LEN",
|
||||
strlen(ssi_tags[i]) <= LWIP_HTTPD_MAX_TAG_NAME_LEN);
|
||||
@@ -189,21 +188,6 @@ void run_http_server() {
|
||||
}
|
||||
}
|
||||
|
||||
// lwIP cgi handler for GET requests to sendkeys.cgi
|
||||
const char * sendkeys_cgi (int iIndex, int iNumParams, char *pcParam[], char *pcValue[]) {
|
||||
for (int i=0; i < iNumParams; i++) {
|
||||
// search GET parameters for keys and forward for processing to USB
|
||||
if (strcmp(pcParam[i], "keys") == 0 ) {
|
||||
parse_key_list(pcValue[i]);
|
||||
}
|
||||
}
|
||||
|
||||
lastActive= get_absolute_time();
|
||||
|
||||
// send return page
|
||||
return "/success.html";
|
||||
}
|
||||
|
||||
// lwIP cgi handler for reboots initiated from the web
|
||||
const char * reboot_cgi(int iIndex, int iNumParams, char *pcParam[], char *pcValue[]) {
|
||||
// turn on reboot flag to prevent watchdog from updating
|
||||
@@ -469,6 +453,8 @@ const void ws_receive_handler(uint8_t *data, uint16_t len) {
|
||||
} else if (strncmp(data, "M: ", 3) == 0) {
|
||||
parse_mouse_list(&data[3]);
|
||||
}
|
||||
|
||||
lastActive= get_absolute_time();
|
||||
}
|
||||
|
||||
// save keyboard's LED indicator status to memory
|
||||
|
||||
Reference in New Issue
Block a user