Skip to content

Commit

Permalink
Updated for removal of deprecated stream flags in the core.
Browse files Browse the repository at this point in the history
Fixed incoorect datatype for networking port numbers.
  • Loading branch information
terjeio committed Nov 7, 2024
1 parent 02c09c1 commit 7f11d3b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 46 deletions.
43 changes: 0 additions & 43 deletions main/usb_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions main/wifi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 } },
Expand Down

0 comments on commit 7f11d3b

Please sign in to comment.