Skip to content

Commit

Permalink
Merge branch 'bugfix-2.1.x' into pr/27473
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Nov 3, 2024
2 parents 999ad38 + c2d0008 commit 0491a15
Show file tree
Hide file tree
Showing 303 changed files with 5,377 additions and 2,088 deletions.
21 changes: 21 additions & 0 deletions .aiderignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Build artifacts
buildroot/
*.o
*.a
*.so
*.dylib
*.dll
*.exe

# Web assets
*.min.js
*.min.css

# Generated files
__pycache__/
*.pyc
.DS_Store

# IDE files
.vscode/
.idea/
2 changes: 1 addition & 1 deletion .github/workflows/auto-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
autolabel:
name: Auto Label
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Auto Label for [BUG]
uses: actions/github-script@v7
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bump-date.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
name: Bump Distribution Date
if: github.repository == 'MarlinFirmware/Marlin'

runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
name: PR Bad Target
if: github.repository == 'MarlinFirmware/Marlin'

runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: superbrothers/close-pull-request@v3
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/ci-build-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,16 @@ jobs:
name: Build Test
if: github.repository == 'MarlinFirmware/Marlin'

runs-on: ubuntu-latest
runs-on: ubuntu-22.04

strategy:
fail-fast: true
matrix:
test-platform:

# RP2040
- SKR_Pico

# Native
- linux_native
- simulator_linux_release
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
# pulls them into additional branches.
if: github.repository == 'MarlinFirmware/Marlin'

runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: Check out the PR
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-validate-boards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
name: Validate boards.h
if: github.repository == 'MarlinFirmware/Marlin'

runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: Check out the PR
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-validate-pins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
name: Validate Pins Files
if: github.repository == 'MarlinFirmware/Marlin'

runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: Check out the PR
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clean-closed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

jobs:
remove_label:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

strategy:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/close-stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
name: Close Stale Issues
if: github.repository == 'MarlinFirmware/Marlin'

runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/stale@v9
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lock-closed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
name: Lock Closed Issues
if: github.repository == 'MarlinFirmware/Marlin'

runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: dessant/lock-threads@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unlock-reopened.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
name: Unlock Reopened
if: github.repository == 'MarlinFirmware/Marlin'

runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: OSDKDev/[email protected]
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,6 @@ __pycache__
tags
*.logs
*.bak
.aider*
!.aiderignore
.env
9 changes: 8 additions & 1 deletion .zed/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,12 @@
* see the documentation: https://zed.dev/docs/configuring-zed#settings-files
*/
{
"enable_language_servers": false
"languages": {
"C": {
"enable_language_server": false
},
"C++": {
"enable_language_server": false
}
}
}
30 changes: 17 additions & 13 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@
#define MOTHERBOARD BOARD_RAMPS_14_EFB
#endif

// @section serial

/**
* Select the serial port on the board to use for communication with the host.
* This allows the connection of wireless adapters (for instance) to non-default port pins.
Expand Down Expand Up @@ -941,7 +943,7 @@
//============================= Mechanical Settings =========================
//===========================================================================

// @section machine
// @section kinematics

// Enable one of the options below for CoreXY, CoreXZ, or CoreYZ kinematics,
// either in the usual order or reversed
Expand All @@ -965,6 +967,15 @@
// Enable for a belt style printer with endless "Z" motion
//#define BELTPRINTER

// Articulated robot (arm). Joints are directly mapped to axes with no kinematics.
//#define ARTICULATED_ROBOT_ARM

// For a hot wire cutter with parallel horizontal axes (X, I) where the heights of the two wire
// ends are controlled by parallel axes (Y, J). Joints are directly mapped to axes (no kinematics).
//#define FOAMCUTTER_XYUV

// @section polargraph

// Enable for Polargraph Kinematics
//#define POLARGRAPH
#if ENABLED(POLARGRAPH)
Expand Down Expand Up @@ -1151,15 +1162,6 @@
#define FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
#endif

// @section machine

// Articulated robot (arm). Joints are directly mapped to axes with no kinematics.
//#define ARTICULATED_ROBOT_ARM

// For a hot wire cutter with parallel horizontal axes (X, I) where the heights of the two wire
// ends are controlled by parallel axes (Y, J). Joints are directly mapped to axes (no kinematics).
//#define FOAMCUTTER_XYUV

//===========================================================================
//============================== Endstop Settings ===========================
//===========================================================================
Expand Down Expand Up @@ -2054,9 +2056,9 @@
//#define FIL_MOTION8_PULLUP
//#define FIL_MOTION8_PULLDOWN
#endif
#endif
#endif
#endif
#endif // FILAMENT_MOTION_SENSOR
#endif // FILAMENT_RUNOUT_DISTANCE_MM
#endif // FILAMENT_RUNOUT_SENSOR

//===========================================================================
//=============================== Bed Leveling ==============================
Expand Down Expand Up @@ -3458,6 +3460,8 @@
* TFT_ROTATE_180, TFT_ROTATE_180_MIRROR_X, TFT_ROTATE_180_MIRROR_Y,
* TFT_ROTATE_270, TFT_ROTATE_270_MIRROR_X, TFT_ROTATE_270_MIRROR_Y,
* TFT_MIRROR_X, TFT_MIRROR_Y, TFT_NO_ROTATION
*
* :{ 'TFT_NO_ROTATION':'None', 'TFT_ROTATE_90':'90°', 'TFT_ROTATE_90_MIRROR_X':'90° (Mirror X)', 'TFT_ROTATE_90_MIRROR_Y':'90° (Mirror Y)', 'TFT_ROTATE_180':'180°', 'TFT_ROTATE_180_MIRROR_X':'180° (Mirror X)', 'TFT_ROTATE_180_MIRROR_Y':'180° (Mirror Y)', 'TFT_ROTATE_270':'270°', 'TFT_ROTATE_270_MIRROR_X':'270° (Mirror X)', 'TFT_ROTATE_270_MIRROR_Y':'270° (Mirror Y)', 'TFT_MIRROR_X':'Mirror X', 'TFT_MIRROR_Y':'Mirror Y' }
*/
//#define TFT_ROTATION TFT_NO_ROTATION

Expand Down
4 changes: 2 additions & 2 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1260,8 +1260,8 @@
#define DISABLE_IDLE_E // Shut down all idle extruders

// Default Minimum Feedrates for printing and travel moves
#define DEFAULT_MINIMUMFEEDRATE 0.0 // (mm/s. °/s for rotational-only moves) Minimum feedrate. Set with M205 S.
#define DEFAULT_MINTRAVELFEEDRATE 0.0 // (mm/s. °/s for rotational-only moves) Minimum travel feedrate. Set with M205 T.
#define DEFAULT_MINIMUMFEEDRATE 0.0 // (mm/s) Minimum feedrate. Set with M205 S.
#define DEFAULT_MINTRAVELFEEDRATE 0.0 // (mm/s) Minimum travel feedrate. Set with M205 T.

// Minimum time that a segment needs to take as the buffer gets emptied
#define DEFAULT_MINSEGMENTTIME 20000 // (µs) Set with M205 B.
Expand Down
2 changes: 1 addition & 1 deletion Marlin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ extcoff: $(TARGET).elf
$(NM) -n $< > $@

# Link: create ELF output file from library.

LDFLAGS+= -Wl,-V
$(BUILD_DIR)/$(TARGET).elf: $(OBJ) Configuration.h
$(Pecho) " CXX $@"
$P $(CXX) $(LD_PREFIX) $(ALL_CXXFLAGS) -o $@ -L. $(OBJ) $(LDFLAGS) $(LD_SUFFIX)
Expand Down
13 changes: 10 additions & 3 deletions Marlin/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,14 @@
* here we define this default string as the date where the latest release
* version was tagged.
*/
//#define STRING_DISTRIBUTION_DATE "2024-10-12"
//#define STRING_DISTRIBUTION_DATE "2024-11-03"

/**
* The protocol for communication to the host. Protocol indicates communication
* standards such as the use of ASCII, "echo:" and "error:" line prefixes, etc.
* (Other behaviors are given by the firmware version and capabilities report.)
*/
//#define PROTOCOL_VERSION "1.0"

/**
* Defines a generic printer name to be output to the LCD after booting Marlin.
Expand All @@ -68,8 +75,8 @@
//#define WEBSITE_URL "marlinfw.org"

/**
* Set the vendor info the serial USB interface, if changable
* Currently only supported by DUE platform
* Set the vendor info the serial USB interface, if changeable.
* Currently only supported by DUE platform.
*/
//#define USB_DEVICE_VENDOR_ID 0x0000
//#define USB_DEVICE_PRODUCT_ID 0x0000
Expand Down
56 changes: 36 additions & 20 deletions Marlin/src/HAL/AVR/pinsDebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,23 @@
#pragma once

/**
* PWM print routines for Atmel 8 bit AVR CPUs
* Pins Debugging for Atmel 8 bit AVR CPUs
*
* - NUMBER_PINS_TOTAL
* - MULTI_NAME_PAD
* - getPinByIndex(index)
* - printPinNameByIndex(index)
* - getPinIsDigitalByIndex(index)
* - digitalPinToAnalogIndex(pin)
* - getValidPinMode(pin)
* - isValidPin(pin)
* - isAnalogPin(pin)
* - digitalRead_mod(pin)
* - pwm_status(pin)
* - printPinPWM(pin)
* - printPinPort(pin)
* - printPinNumber(pin)
* - printPinAnalog(pin)
*/

#include "../../inc/MarlinConfig.h"
Expand All @@ -39,30 +55,30 @@
#include "pinsDebug_Teensyduino.h"
// Can't use the "digitalPinToPort" function from the Teensyduino type IDEs
// portModeRegister takes a different argument
#define digitalPinToTimer_DEBUG(p) digitalPinToTimer(p)
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask(p)
#define digitalPinToPort_DEBUG(p) digitalPinToPort(p)
#define getValidPinMode(pin) (*portModeRegister(pin) & digitalPinToBitMask_DEBUG(pin))
#define digitalPinToTimer_DEBUG(P) digitalPinToTimer(P)
#define digitalPinToBitMask_DEBUG(P) digitalPinToBitMask(P)
#define digitalPinToPort_DEBUG(P) digitalPinToPort(P)
#define getValidPinMode(P) (*portModeRegister(P) & digitalPinToBitMask_DEBUG(P))

#elif AVR_ATmega2560_FAMILY_PLUS_70 // So we can access/display all the pins on boards using more than 70

#include "pinsDebug_plus_70.h"
#define digitalPinToTimer_DEBUG(p) digitalPinToTimer_plus_70(p)
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask_plus_70(p)
#define digitalPinToPort_DEBUG(p) digitalPinToPort_plus_70(p)
#define digitalPinToTimer_DEBUG(P) digitalPinToTimer_plus_70(P)
#define digitalPinToBitMask_DEBUG(P) digitalPinToBitMask_plus_70(P)
#define digitalPinToPort_DEBUG(P) digitalPinToPort_plus_70(P)
bool getValidPinMode(pin_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); }

#else

#define digitalPinToTimer_DEBUG(p) digitalPinToTimer(p)
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask(p)
#define digitalPinToPort_DEBUG(p) digitalPinToPort(p)
#define digitalPinToTimer_DEBUG(P) digitalPinToTimer(P)
#define digitalPinToBitMask_DEBUG(P) digitalPinToBitMask(P)
#define digitalPinToPort_DEBUG(P) digitalPinToPort(P)
bool getValidPinMode(pin_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); }
#define getPinByIndex(p) pgm_read_byte(&pin_array[p].pin)
#define getPinByIndex(x) pgm_read_byte(&pin_array[x].pin)

#endif

#define isValidPin(pin) (pin >= 0 && pin < NUM_DIGITAL_PINS ? 1 : 0)
#define isValidPin(P) (P >= 0 && P < NUMBER_PINS_TOTAL)
#if AVR_ATmega1284_FAMILY
#define isAnalogPin(P) WITHIN(P, analogInputToDigitalPin(7), analogInputToDigitalPin(0))
#define digitalPinToAnalogIndex(P) int(isAnalogPin(P) ? (P) - analogInputToDigitalPin(7) : -1)
Expand All @@ -72,11 +88,11 @@
#define isAnalogPin(P) (_ANALOG1(P) || _ANALOG2(P))
#define digitalPinToAnalogIndex(P) int(_ANALOG1(P) ? (P) - analogInputToDigitalPin(0) : _ANALOG2(P) ? (P) - analogInputToDigitalPin(8) + 8 : -1)
#endif
#define getPinByIndex(p) pgm_read_byte(&pin_array[p].pin)
#define getPinByIndex(x) pgm_read_byte(&pin_array[x].pin)
#define MULTI_NAME_PAD 26 // space needed to be pretty if not first name assigned to a pin

void printPinNameByIndex(uint8_t x) {
PGM_P const name_mem_pointer = (PGM_P)pgm_read_ptr(&pin_array[x].name);
void printPinNameByIndex(const uint8_t index) {
PGM_P const name_mem_pointer = (PGM_P)pgm_read_ptr(&pin_array[index].name);
for (uint8_t y = 0; y < MAX_NAME_LENGTH; ++y) {
char temp_char = pgm_read_byte(name_mem_pointer + y);
if (temp_char != 0)
Expand Down Expand Up @@ -109,7 +125,7 @@ void printPinNameByIndex(uint8_t x) {
* Print a pin's PWM status.
* Return true if it's currently a PWM pin.
*/
bool pwm_status(uint8_t pin) {
bool pwm_status(const uint8_t pin) {
char buffer[20]; // for the sprintf statements

switch (digitalPinToTimer_DEBUG(pin)) {
Expand Down Expand Up @@ -276,7 +292,7 @@ void timer_prefix(uint8_t T, char L, uint8_t N) { // T - timer L - pwm N -
if (TEST(*TMSK, TOIE)) err_prob_interrupt();
}

void printPinPWM(uint8_t pin) {
void printPinPWM(const uint8_t pin) {
switch (digitalPinToTimer_DEBUG(pin)) {

#if ABTEST(0)
Expand Down Expand Up @@ -386,7 +402,7 @@ void printPinPort(const pin_t pin) { // print port number
#endif
}

#define printPinNumber(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0)
#define printPinAnalog(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(pin)); SERIAL_ECHO(buffer); }while(0)
#define printPinNumber(P) do{ sprintf_P(buffer, PSTR("%3d "), P); SERIAL_ECHO(buffer); }while(0)
#define printPinAnalog(P) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(P)); SERIAL_ECHO(buffer); }while(0)

#undef ABTEST
2 changes: 1 addition & 1 deletion Marlin/src/HAL/AVR/pinsDebug_Teensyduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const uint8_t PROGMEM digital_pin_to_port_PGM[] = {

// digitalPinToBitMask(pin) is OK

#define digitalRead_mod(p) extDigitalRead(p) // Teensyduino's version of digitalRead doesn't
#define digitalRead_mod(P) extDigitalRead(P) // Teensyduino's version of digitalRead doesn't
// disable the PWMs so we can use it as is

// portModeRegister(pin) is OK
Loading

0 comments on commit 0491a15

Please sign in to comment.