Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/22657
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Aug 30, 2021
2 parents 66544c9 + d95d452 commit 655e638
Show file tree
Hide file tree
Showing 95 changed files with 1,222 additions and 1,052 deletions.
25 changes: 14 additions & 11 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2052,20 +2052,23 @@
//
// G2/G3 Arc Support
//
#define ARC_SUPPORT // Disable this feature to save ~3226 bytes
#define ARC_SUPPORT // Requires ~3226 bytes
#if ENABLED(ARC_SUPPORT)
#define MM_PER_ARC_SEGMENT 1 // (mm) Length (or minimum length) of each arc segment
//#define ARC_SEGMENTS_PER_R 1 // Max segment length, MM_PER = Min
#define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle
//#define ARC_SEGMENTS_PER_SEC 50 // Use feedrate to choose segment length (with MM_PER_ARC_SEGMENT as the minimum)
#define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections
//#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles
//#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes
//#define SF_ARC_FIX // Enable only if using SkeinForge with "Arc Point" fillet procedure
#define MIN_ARC_SEGMENT_MM 0.1 // (mm) Minimum length of each arc segment
#define MAX_ARC_SEGMENT_MM 1.0 // (mm) Maximum length of each arc segment
#define MIN_CIRCLE_SEGMENTS 72 // Minimum number of segments in a complete circle
//#define ARC_SEGMENTS_PER_SEC 50 // Use the feedrate to choose the segment length
#define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections
//#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles
//#define SF_ARC_FIX // Enable only if using SkeinForge with "Arc Point" fillet procedure
#endif

// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
//#define BEZIER_CURVE_SUPPORT
// G5 Bézier Curve Support with XYZE destination and IJPQ offsets
//#define BEZIER_CURVE_SUPPORT // Requires ~2666 bytes

#if EITHER(ARC_SUPPORT, BEZIER_CURVE_SUPPORT)
//#define CNC_WORKSPACE_PLANES // Allow G2/G3/G5 to operate in XY, ZX, or YZ planes
#endif

/**
* Direct Stepping
Expand Down
2 changes: 1 addition & 1 deletion Marlin/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* here we define this default string as the date where the latest release
* version was tagged.
*/
//#define STRING_DISTRIBUTION_DATE "2021-08-28"
//#define STRING_DISTRIBUTION_DATE "2021-08-30"

/**
* Defines a generic printer name to be output to the LCD after booting Marlin.
Expand Down
13 changes: 13 additions & 0 deletions Marlin/src/HAL/AVR/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,19 @@
#include <avr/interrupt.h>
#include <avr/io.h>

//
// Default graphical display delays
//
#if F_CPU >= 20000000
#define CPU_ST7920_DELAY_1 DELAY_NS(150)
#define CPU_ST7920_DELAY_2 DELAY_NS( 0)
#define CPU_ST7920_DELAY_3 DELAY_NS(150)
#elif F_CPU == 16000000
#define CPU_ST7920_DELAY_1 DELAY_NS(125)
#define CPU_ST7920_DELAY_2 DELAY_NS( 0)
#define CPU_ST7920_DELAY_3 DELAY_NS(188)
#endif

#ifndef pgm_read_ptr
// Compatibility for avr-libc 1.8.0-4.1 included with Ubuntu for
// Windows Subsystem for Linux on Windows 10 as of 10/18/2019
Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/HAL/LINUX/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ uint8_t _getc();
extern MSerialT usb_serial;
#define MYSERIAL1 usb_serial

#define ST7920_DELAY_1 DELAY_NS(600)
#define ST7920_DELAY_2 DELAY_NS(750)
#define ST7920_DELAY_3 DELAY_NS(750)
#define CPU_ST7920_DELAY_1 DELAY_NS(600)
#define CPU_ST7920_DELAY_2 DELAY_NS(750)
#define CPU_ST7920_DELAY_3 DELAY_NS(750)

//
// Interrupts
Expand Down
12 changes: 3 additions & 9 deletions Marlin/src/HAL/LPC1768/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,9 @@ extern "C" volatile uint32_t _millis;
//
// Default graphical display delays
//
#ifndef ST7920_DELAY_1
#define ST7920_DELAY_1 DELAY_NS(600)
#endif
#ifndef ST7920_DELAY_2
#define ST7920_DELAY_2 DELAY_NS(750)
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_NS(750)
#endif
#define CPU_ST7920_DELAY_1 DELAY_NS(600)
#define CPU_ST7920_DELAY_2 DELAY_NS(750)
#define CPU_ST7920_DELAY_3 DELAY_NS(750)

typedef ForwardSerial1Class< decltype(UsbSerial) > DefaultSerial1;
extern DefaultSerial1 USBSerial;
Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/HAL/NATIVE_SIM/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ extern MSerialT serial_stream_3;
#endif


#define ST7920_DELAY_1 DELAY_NS(600)
#define ST7920_DELAY_2 DELAY_NS(750)
#define ST7920_DELAY_3 DELAY_NS(750)
#define CPU_ST7920_DELAY_1 DELAY_NS(600)
#define CPU_ST7920_DELAY_2 DELAY_NS(750)
#define CPU_ST7920_DELAY_3 DELAY_NS(750)

//
// Interrupts
Expand Down
7 changes: 7 additions & 0 deletions Marlin/src/HAL/STM32/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@

#include <stdint.h>

//
// Default graphical display delays
//
#define CPU_ST7920_DELAY_1 DELAY_NS(300)
#define CPU_ST7920_DELAY_2 DELAY_NS( 40)
#define CPU_ST7920_DELAY_3 DELAY_NS(340)

//
// Serial Ports
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/src/HAL/STM32F1/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@
// Defines
// ------------------------

//
// Default graphical display delays
//
#define CPU_ST7920_DELAY_1 DELAY_NS(300)
#define CPU_ST7920_DELAY_2 DELAY_NS( 40)
#define CPU_ST7920_DELAY_3 DELAY_NS(340)

#ifndef STM32_FLASH_SIZE
#if ANY(MCU_STM32F103RE, MCU_STM32F103VE, MCU_STM32F103ZE)
#define STM32_FLASH_SIZE 512
Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/HAL/TEENSY31_32/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@

#include <stdint.h>

#define ST7920_DELAY_1 DELAY_NS(600)
#define ST7920_DELAY_2 DELAY_NS(750)
#define ST7920_DELAY_3 DELAY_NS(750)
#define CPU_ST7920_DELAY_1 DELAY_NS(600)
#define CPU_ST7920_DELAY_2 DELAY_NS(750)
#define CPU_ST7920_DELAY_3 DELAY_NS(750)

//#undef MOTHERBOARD
//#define MOTHERBOARD BOARD_TEENSY31_32
Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/HAL/TEENSY35_36/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
#include <stdint.h>
#include <util/atomic.h>

#define ST7920_DELAY_1 DELAY_NS(600)
#define ST7920_DELAY_2 DELAY_NS(750)
#define ST7920_DELAY_3 DELAY_NS(750)
#define CPU_ST7920_DELAY_1 DELAY_NS(600)
#define CPU_ST7920_DELAY_2 DELAY_NS(750)
#define CPU_ST7920_DELAY_3 DELAY_NS(750)

// ------------------------
// Defines
Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/HAL/TEENSY40_41/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
#include "../../feature/ethernet.h"
#endif

//#define ST7920_DELAY_1 DELAY_NS(600)
//#define ST7920_DELAY_2 DELAY_NS(750)
//#define ST7920_DELAY_3 DELAY_NS(750)
#define CPU_ST7920_DELAY_1 DELAY_NS(600)
#define CPU_ST7920_DELAY_2 DELAY_NS(750)
#define CPU_ST7920_DELAY_3 DELAY_NS(750)

// ------------------------
// Defines
Expand Down
2 changes: 2 additions & 0 deletions Marlin/src/core/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@
#define CODE_3( A,B,C,...) A; B; C
#define CODE_2( A,B,...) A; B
#define CODE_1( A,...) A
#define CODE_0(...)
#define _CODE_N(N,V...) CODE_##N(V)
#define CODE_N(N,V...) _CODE_N(N,V)

Expand All @@ -279,6 +280,7 @@
#define GANG_3( A,B,C,...) A B C
#define GANG_2( A,B,...) A B
#define GANG_1( A,...) A
#define GANG_0(...)
#define _GANG_N(N,V...) GANG_##N(V)
#define GANG_N(N,V...) _GANG_N(N,V)
#define GANG_N_1(N,K) _GANG_N(N,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K)
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/gcode/gcode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ int8_t GcodeSuite::get_target_e_stepper_from_command() {
}

/**
* Set XYZE destination and feedrate from the current GCode command
* Set XYZIJKE destination and feedrate from the current GCode command
*
* - Set destination from included axis codes
* - Set to current for missing axis codes
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/gcode/motion/G0_G1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void GcodeSuite::G0_G1(TERN_(HAS_FAST_MOVES, const bool fast_move/*=false*/)) {
#endif
#endif

get_destination_from_command(); // Get X Y Z E F (and set cutter power)
get_destination_from_command(); // Get X Y [Z[I[J[K]]]] [E] F (and set cutter power)

#ifdef G0_FEEDRATE
if (fast_move) {
Expand Down
Loading

0 comments on commit 655e638

Please sign in to comment.