Skip to content

Commit

Permalink
version bump and code cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
Paciente8159 committed Feb 3, 2024
1 parent 58f35c5 commit ec2d50f
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 61 deletions.
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,40 @@

# Changelog

## [1.8.7] - 03-02-2024

## Contributors
[@patryk3211](https://github.com/patryk3211) - fixed PID calculations (#604)
[@jarney](https://github.com/jarney) - fixed LIMIT_C mask inverting (#603)

### Added

- added boardmap for ESP32 Wemos D1 R32 with Shield V3 (#610)
- added initial implementation of websocket support (for ESP32, ESP8266 and RP2040) (#608)
- added software emulated serial one-wire (#600)
- added option to enable multistream guard (prevents serial stream to switch until line complete) (#596)
- added direct motion control incremental jog function (#594)
- added ESP32 DMA support via I2S to 74HC595 extender (#584)
- added ESP8266 servo pin support (#584)
- ESP8266 and ESP32 now use step aliasing in step generation to produce smoother speed increments at higher step rates (#584)

### Changed

- ESP32 web server and web socket server running on CPU0 (#608)
- modified module default handler macro to improve event calling rotation (#606)
- removed all TMC driver support to external module (#599)
- minor changes to reduce code compilation size for UNO board (#593)
- cleaned code for CNC internal states (homing, jog and hold) (#590)

### Fixed

- fixed PID sample period calculation and prevent divide by zero operations (#604)
- fixed LIMIT_C mask inverting option typo (#603)
- fixed ESP8266 wifi listening to the wrong buffer (#601)
- fixed softuart reading failure and potential lock (#600)
- fixed AVR UART ISR macro (for multi and single UART MCUs) (#598)
- fixed tool speed report message (#592)

## [1.8.6] - 17-01-2024

## Contributors
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ Version 1.8 added the following new major features.
- complete redesign of multi-stepper axis and self-squaring axis.
- initial support for Scara kinematics
- endpoint interface module to allow development of web services and REST modules for WiFi (available on v1.8.1)
- websocket interface module to allow development of web sockets modules for WiFi (available on v1.8.7)

Version 1.7 added a new major feature.

Expand Down
2 changes: 1 addition & 1 deletion uCNC/src/cnc_build.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ extern "C"
#endif

#define CNC_MAJOR_MINOR_VERSION "1.8"
#define CNC_PATCH_VERSION ".6"
#define CNC_PATCH_VERSION ".7"

#define CNC_VERSION CNC_MAJOR_MINOR_VERSION CNC_PATCH_VERSION

Expand Down
14 changes: 13 additions & 1 deletion uCNC/src/core/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -698,14 +698,19 @@ static uint8_t parser_fetch_command(parser_state_t *new_state, parser_words_t *w
{
case 50:
mantissa++;
__attribute__((fallthrough));
case 40:
mantissa++;
__attribute__((fallthrough));
case 30:
mantissa++;
__attribute__((fallthrough));
case 20:
mantissa++;
__attribute__((fallthrough));
case 10:
mantissa++;
__attribute__((fallthrough));
case 0:
break;
default:
Expand Down Expand Up @@ -1443,7 +1448,6 @@ uint8_t parser_exec_command(parser_state_t *new_state, parser_words_t *words, pa
index = G28HOME;
break;
case 30:

index = G30HOME;
break;
#endif
Expand All @@ -1455,6 +1459,7 @@ uint8_t parser_exec_command(parser_state_t *new_state, parser_words_t *words, pa
break;
case G92_1: // G92.1
memset(g92permanentoffset, 0, sizeof(g92permanentoffset));
__attribute__((fallthrough));
// continue
case G92_2: // G92.2
memset(parser_parameters.g92_offset, 0, sizeof(parser_parameters.g92_offset));
Expand Down Expand Up @@ -1626,6 +1631,7 @@ uint8_t parser_exec_command(parser_state_t *new_state, parser_words_t *words, pa
{
block_data.spindle = 0;
}
__attribute__((fallthrough));
case G1:
if (block_data.feed == 0)
{
Expand Down Expand Up @@ -2118,6 +2124,7 @@ static uint8_t parser_gcode_word(uint8_t code, uint8_t mantissa, parser_state_t
{
return STATUS_GCODE_UNSUPPORTED_COMMAND;
}
__attribute__((fallthrough));
#ifdef ENABLE_G39_H_MAPPING
case 39:
#endif
Expand Down Expand Up @@ -2201,6 +2208,7 @@ static uint8_t parser_gcode_word(uint8_t code, uint8_t mantissa, parser_state_t
{
return STATUS_GCODE_UNSUPPORTED_COMMAND;
}
__attribute__((fallthrough));
case 49:
new_state->groups.tlo_mode = ((code == 49) ? G49 : G43);
new_group |= GCODE_GROUP_TOOLLENGTH;
Expand Down Expand Up @@ -2250,6 +2258,7 @@ static uint8_t parser_gcode_word(uint8_t code, uint8_t mantissa, parser_state_t
{
return STATUS_GCODE_UNSUPPORTED_COMMAND;
}
__attribute__((fallthrough));
#ifndef DISABLE_G10_SUPPORT
case 10:
#endif
Expand All @@ -2262,6 +2271,7 @@ static uint8_t parser_gcode_word(uint8_t code, uint8_t mantissa, parser_state_t
return STATUS_GCODE_MODAL_GROUP_VIOLATION;
}
cmd->group_0_1_useaxis = 1;
__attribute__((fallthrough));
case 4:
case 53:
// convert code within 4 bits without
Expand Down Expand Up @@ -2305,8 +2315,10 @@ static uint8_t parser_mcode_word(uint8_t code, uint8_t mantissa, parser_state_t
{
case 60:
code = 5;
__attribute__((fallthrough));
case 30:
code = (code & 1) ? 5 : 3;
__attribute__((fallthrough));
case 0:
case 1:
case 2:
Expand Down
17 changes: 0 additions & 17 deletions uCNC/src/hal/mcus/esp32/esp32_arduino.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -779,23 +779,6 @@ extern "C"
return (uint8_t)0;
}

bool esp32_wifi_bt_rx_ready(void)
{
bool wifiready = false;
#ifdef ENABLE_WIFI
if (esp32_wifi_clientok())
{
wifiready = (server_client.available() > 0);
}
#endif

bool btready = false;
#ifdef ENABLE_BLUETOOTH
btready = (SerialBT.available() > 0);
#endif
return (wifiready || btready);
}

void esp32_wifi_bt_process(void)
{
#ifdef ENABLE_BLUETOOTH
Expand Down
12 changes: 0 additions & 12 deletions uCNC/src/hal/mcus/esp8266/esp8266_arduino.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -671,18 +671,6 @@ extern "C"
}
#endif

bool esp8266_uart_rx_ready(void)
{
bool wifiready = false;
#ifdef ENABLE_WIFI
if (esp8266_wifi_clientok())
{
wifiready = (telnet_client.available() > 0);
}
#endif
return ((Serial.available() > 0) || wifiready);
}

void esp8266_uart_process(void)
{
while (Serial.available() > 0)
Expand Down
29 changes: 0 additions & 29 deletions uCNC/src/hal/mcus/rp2040/rp2040_arduino.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -741,23 +741,6 @@ uint8_t rp2040_wifi_bt_read(void)
return (uint8_t)0;
}

bool rp2040_wifi_bt_rx_ready(void)
{
bool wifiready = false;
#ifdef MCU_HAS_WIFI
if (rp2040_wifi_clientok())
{
wifiready = (server_client.available() > 0);
}
#endif

bool btready = false;
#ifdef ENABLE_BLUETOOTH
btready = (SerialBT.available() > 0);
#endif

return (wifiready || btready);
}

void rp2040_wifi_bt_process(void)
{
Expand Down Expand Up @@ -989,18 +972,6 @@ extern "C"
}
#endif

bool rp2040_uart_rx_ready(void)
{
bool wifiready = false;
#if (defined(MCU_HAS_WIFI) || defined(ENABLE_BLUETOOTH))
if (rp2040_wifi_clientok())
{
wifiready = (rp2040_wifi_bt_rx_ready() > 0);
}
#endif
return ((Serial.available() > 0) || wifiready);
}

void rp2040_uart_process(void)
{
#ifdef MCU_HAS_USB
Expand Down
1 change: 0 additions & 1 deletion uCNC/src/hal/mcus/virtual/mcumap_virtual.h
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,6 @@
#define MCU_HAS_ONESHOT_TIMER

// just to compile
#define mcu_rx_ready() true
#define mcu_nop()
#define mcu_config_pullup(diopin)
#define mcu_config_analog(diopin)
Expand Down

0 comments on commit ec2d50f

Please sign in to comment.