diff --git a/main/usb_serial.c b/main/usb_serial.c index 50606fe..d2b27c6 100644 --- a/main/usb_serial.c +++ b/main/usb_serial.c @@ -312,47 +312,4 @@ const io_stream_t *usb_serialInit (void) return &stream; } -// -// This function get called from the foreground process, -// used here to get characters off the USB serial input stream and buffer -// them for processing by grbl. Real time command characters are stripped out -// and submitted for realtime processing. -// -static void execute_realtime (uint_fast16_t state) -{ - static volatile bool lock = false; - static char tmpbuf[BLOCK_RX_BUFFER_SIZE]; - - if(lock) - return; - - char c, *dp; - int32_t avail, free; - - lock = true; - - if(usb_connected() && (avail = (int32_t)tud_cdc_available())) { - - dp = tmpbuf; - free = (int32_t)usb_serialRxFree(); - free = free > BLOCK_RX_BUFFER_SIZE ? BLOCK_RX_BUFFER_SIZE : free; - avail = usb_in_chars(tmpbuf, (uint32_t)(avail > free ? free : avail)); - - if(avail > 0) while(avail--) { - c = *dp++; - if(!enqueue_realtime_command(c)) { - uint_fast16_t next_head = BUFNEXT(rxbuf.head, rxbuf); // Get next head pointer - if(next_head == rxbuf.tail) // If buffer full - rxbuf.overflow = On; // flag overflow, - else { - rxbuf.data[rxbuf.head] = c; // else add character data to buffer - rxbuf.head = next_head; // and update pointer - } - } - } - } - - lock = false; -} - #endif // GRBL_ESP32S3 diff --git a/main/wifi.c b/main/wifi.c index ee2417a..65495b7 100644 --- a/main/wifi.c +++ b/main/wifi.c @@ -861,16 +861,16 @@ static const setting_detail_t ethernet_settings[] = { { Setting_WifiMode, Group_Networking_Wifi, "WiFi Mode", NULL, Format_RadioButtons, "Off,Station", NULL, NULL, Setting_NonCore, &wifi.mode, NULL, NULL }, #endif #if TELNET_ENABLE - { Setting_TelnetPort3, Group_Networking, "Telnet port", NULL, Format_Integer, "####0", "1", "65535", Setting_NonCoreFn, wifi_set_int, wifi_get_int, NULL, { .reboot_required = On } }, + { Setting_TelnetPort3, Group_Networking, "Telnet port", NULL, Format_Int16, "####0", "1", "65535", Setting_NonCoreFn, wifi_set_int, wifi_get_int, NULL, { .reboot_required = On } }, #endif #if HTTP_ENABLE - { Setting_HttpPort3, Group_Networking, "HTTP port", NULL, Format_Integer, "####0", "1", "65535", Setting_NonCoreFn, wifi_set_int, wifi_get_int, NULL, { .reboot_required = On } }, + { Setting_HttpPort3, Group_Networking, "HTTP port", NULL, Format_Int16, "####0", "1", "65535", Setting_NonCoreFn, wifi_set_int, wifi_get_int, NULL, { .reboot_required = On } }, #endif #if FTP_ENABLE { Setting_FtpPort3, Group_Networking, "FTP port", NULL, Format_Int16, "####0", "1", "65535", Setting_NonCoreFn, wifi_set_int, wifi_get_int, NULL, { .reboot_required = On } }, #endif #if WEBSOCKET_ENABLE - { Setting_WebSocketPort3, Group_Networking, "Websocket port", NULL, Format_Integer, "####0", "1", "65535", Setting_NonCoreFn, wifi_set_int, wifi_get_int, NULL, { .reboot_required = On } }, + { Setting_WebSocketPort3, Group_Networking, "Websocket port", NULL, Format_Int16, "####0", "1", "65535", Setting_NonCoreFn, wifi_set_int, wifi_get_int, NULL, { .reboot_required = On } }, #endif #if MQTT_ENABLE { Setting_MQTTBrokerIpAddress, Group_Networking, "MQTT broker IP Address", NULL, Format_IPv4, NULL, NULL, NULL, Setting_NonCoreFn, wifi_set_ip, wifi_get_ip, NULL, { .reboot_required = On } },