Skip to content

Commit

Permalink
Merge branch 'MarlinFirmware:bugfix-2.1.x' into mecha-octopus
Browse files Browse the repository at this point in the history
  • Loading branch information
Djonker83 authored Dec 9, 2023
2 parents 75165a4 + 473817f commit 363a52f
Show file tree
Hide file tree
Showing 87 changed files with 2,393 additions and 679 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: 🪲 Report a bug
description: Create a bug report to help improve Marlin Firmware
title: "[BUG] (bug summary)"
labels: 'Bug: Potential ?'
labels: ["Bug: Potential ?"]
body:
- type: markdown
attributes:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: ✨ Request a feature
description: Request a new Marlin Firmware feature
title: "[FR] (feature summary)"
labels: 'T: Feature Request'
labels: ["T: Feature Request"]
body:
- type: markdown
attributes:
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/auto-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# - Apply the label "Bug: Potential ?" to these issues.
#

name: Label Old Bugs

on:
schedule:
- cron: "30 8 * * *"
Expand All @@ -15,24 +17,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Auto Label for [BUG]
uses: actions/github-script@v5
uses: actions/github-script@v7
with:
script: |
# Get all open issues in this repository
// Get all open issues in this repository
const issueList = await github.rest.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open'
});
# Filter the list of issues to only those that don't have any labels
# and have a title that contains '[BUG]'. Only the first 50 issues.
// Filter issues without labels that have a title containing '[BUG]'.
const matchingIssues = issueList.data.filter(
issue => issue.title.includes('[BUG]') && issue.labels.length === 0
);
# Process the first 50
// Process the first 50
for (const issue of matchingIssues.slice(0, 50)) {
// Run the desired action on the issue
// For example, to add a label:
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/check-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:
- 1.0.x
- 1.1.x
- 2.0.x
- 2.1.x

jobs:
bad_target:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
pull_request:
branches:
- bugfix-2.1.x
- 2.1.x
paths-ignore:
- config/**
- data/**
Expand All @@ -17,6 +18,7 @@ on:
push:
branches:
- bugfix-2.1.x
- 2.1.x
paths-ignore:
- config/**
- data/**
Expand Down
4 changes: 4 additions & 0 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1579,6 +1579,10 @@
//#define SOUND_MENU_ITEM // Add a mute option to the LCD menu
#define SOUND_ON_DEFAULT // Buzzer/speaker default enabled state

#if HAS_WIRED_LCD
//#define DOUBLE_LCD_FRAMERATE // Not recommended for slow boards.
#endif

// The timeout to return to the status screen from sub-menus
//#define LCD_TIMEOUT_TO_STATUS 15000 // (ms)

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 "2023-11-30"
//#define STRING_DISTRIBUTION_DATE "2023-12-09"

/**
* Defines a generic printer name to be output to the LCD after booting Marlin.
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/ESP32/HAL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ uint8_t MarlinHAL::get_reset_source() { return rtc_get_reset_reason(1); }

void MarlinHAL::reboot() { ESP.restart(); }

void _delay_ms(int delay_ms) { delay(delay_ms); }
void _delay_ms(const int ms) { delay(ms); }

// return free memory between end of heap (or end bss) and whatever is current
int MarlinHAL::freeMemory() { return ESP.getFreeHeap(); }
Expand Down
3 changes: 3 additions & 0 deletions Marlin/src/HAL/LINUX/include/Arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@

#include <pinmapping.h>

#define strlcpy(A, B, C) strncpy(A, B, (C) - 1)
#define strlcpy_P(A, B, C) strncpy_P(A, B, (C) - 1)

#define HIGH 0x01
#define LOW 0x00

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/LPC1768/tft/xpt2046.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ bool XPT2046::getRawPoint(int16_t * const x, int16_t * const y) {
if (isBusy() || !isTouched()) return false;
*x = getRawData(XPT2046_X);
*y = getRawData(XPT2046_Y);
return true;
return isTouched();
}

uint16_t XPT2046::getRawData(const XPTCoordinate coordinate) {
Expand Down
59 changes: 29 additions & 30 deletions Marlin/src/HAL/SAMD51/HAL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,27 +47,27 @@
#endif
#endif

#define GET_TEMP_0_ADC() TERN(HAS_TEMP_ADC_0, PIN_TO_ADC(TEMP_0_PIN), -1)
#define GET_TEMP_1_ADC() TERN(HAS_TEMP_ADC_1, PIN_TO_ADC(TEMP_1_PIN), -1)
#define GET_TEMP_2_ADC() TERN(HAS_TEMP_ADC_2, PIN_TO_ADC(TEMP_2_PIN), -1)
#define GET_TEMP_3_ADC() TERN(HAS_TEMP_ADC_3, PIN_TO_ADC(TEMP_3_PIN), -1)
#define GET_TEMP_4_ADC() TERN(HAS_TEMP_ADC_4, PIN_TO_ADC(TEMP_4_PIN), -1)
#define GET_TEMP_5_ADC() TERN(HAS_TEMP_ADC_5, PIN_TO_ADC(TEMP_5_PIN), -1)
#define GET_TEMP_6_ADC() TERN(HAS_TEMP_ADC_6, PIN_TO_ADC(TEMP_6_PIN), -1)
#define GET_TEMP_7_ADC() TERN(HAS_TEMP_ADC_7, PIN_TO_ADC(TEMP_7_PIN), -1)
#define GET_BED_ADC() TERN(HAS_TEMP_ADC_BED, PIN_TO_ADC(TEMP_BED_PIN), -1)
#define GET_CHAMBER_ADC() TERN(HAS_TEMP_ADC_CHAMBER, PIN_TO_ADC(TEMP_CHAMBER_PIN), -1)
#define GET_PROBE_ADC() TERN(HAS_TEMP_ADC_PROBE, PIN_TO_ADC(TEMP_PROBE_PIN), -1)
#define GET_COOLER_ADC() TERN(HAS_TEMP_ADC_COOLER, PIN_TO_ADC(TEMP_COOLER_PIN), -1)
#define GET_BOARD_ADC() TERN(HAS_TEMP_ADC_BOARD, PIN_TO_ADC(TEMP_BOARD_PIN), -1)
#define GET_SOC_ADC() TERN(HAS_TEMP_ADC_SOC, PIN_TO_ADC(TEMP_SOC_PIN), -1)
#define GET_FILAMENT_WIDTH_ADC() TERN(FILAMENT_WIDTH_SENSOR, PIN_TO_ADC(FILWIDTH_PIN), -1)
#define GET_BUTTONS_ADC() TERN(HAS_ADC_BUTTONS, PIN_TO_ADC(ADC_KEYPAD_PIN), -1)
#define GET_JOY_ADC_X() TERN(HAS_JOY_ADC_X, PIN_TO_ADC(JOY_X_PIN), -1)
#define GET_JOY_ADC_Y() TERN(HAS_JOY_ADC_Y, PIN_TO_ADC(JOY_Y_PIN), -1)
#define GET_JOY_ADC_Z() TERN(HAS_JOY_ADC_Z, PIN_TO_ADC(JOY_Z_PIN), -1)
#define GET_POWERMON_ADC_CURRENT() TERN(POWER_MONITOR_CURRENT, PIN_TO_ADC(POWER_MONITOR_CURRENT_PIN), -1)
#define GET_POWERMON_ADC_VOLTS() TERN(POWER_MONITOR_VOLTAGE, PIN_TO_ADC(POWER_MONITOR_VOLTAGE_PIN), -1)
#define GET_TEMP_0_ADC() TERN(HAS_TEMP_ADC_0, PIN_TO_ADC(TEMP_0_PIN), -1)
#define GET_TEMP_1_ADC() TERN(HAS_TEMP_ADC_1, PIN_TO_ADC(TEMP_1_PIN), -1)
#define GET_TEMP_2_ADC() TERN(HAS_TEMP_ADC_2, PIN_TO_ADC(TEMP_2_PIN), -1)
#define GET_TEMP_3_ADC() TERN(HAS_TEMP_ADC_3, PIN_TO_ADC(TEMP_3_PIN), -1)
#define GET_TEMP_4_ADC() TERN(HAS_TEMP_ADC_4, PIN_TO_ADC(TEMP_4_PIN), -1)
#define GET_TEMP_5_ADC() TERN(HAS_TEMP_ADC_5, PIN_TO_ADC(TEMP_5_PIN), -1)
#define GET_TEMP_6_ADC() TERN(HAS_TEMP_ADC_6, PIN_TO_ADC(TEMP_6_PIN), -1)
#define GET_TEMP_7_ADC() TERN(HAS_TEMP_ADC_7, PIN_TO_ADC(TEMP_7_PIN), -1)
#define GET_BED_ADC() TERN(HAS_TEMP_ADC_BED, PIN_TO_ADC(TEMP_BED_PIN), -1)
#define GET_CHAMBER_ADC() TERN(HAS_TEMP_ADC_CHAMBER, PIN_TO_ADC(TEMP_CHAMBER_PIN), -1)
#define GET_PROBE_ADC() TERN(HAS_TEMP_ADC_PROBE, PIN_TO_ADC(TEMP_PROBE_PIN), -1)
#define GET_COOLER_ADC() TERN(HAS_TEMP_ADC_COOLER, PIN_TO_ADC(TEMP_COOLER_PIN), -1)
#define GET_BOARD_ADC() TERN(HAS_TEMP_ADC_BOARD, PIN_TO_ADC(TEMP_BOARD_PIN), -1)
#define GET_SOC_ADC() TERN(HAS_TEMP_ADC_BOARD, PIN_TO_ADC(TEMP_BOARD_PIN), -1)
#define GET_FILAMENT_WIDTH_ADC() TERN(FILAMENT_WIDTH_SENSOR, PIN_TO_ADC(FILWIDTH_PIN), -1)
#define GET_BUTTONS_ADC() TERN(HAS_ADC_BUTTONS, PIN_TO_ADC(ADC_KEYPAD_PIN), -1)
#define GET_JOY_ADC_X() TERN(HAS_JOY_ADC_X, PIN_TO_ADC(JOY_X_PIN), -1)
#define GET_JOY_ADC_Y() TERN(HAS_JOY_ADC_Y, PIN_TO_ADC(JOY_Y_PIN), -1)
#define GET_JOY_ADC_Z() TERN(HAS_JOY_ADC_Z, PIN_TO_ADC(JOY_Z_PIN), -1)
#define GET_POWERMON_ADC_CURRENT() TERN(POWER_MONITOR_CURRENT, PIN_TO_ADC(POWER_MONITOR_CURRENT_PIN), -1)
#define GET_POWERMON_ADC_VOLTS() TERN(POWER_MONITOR_VOLTAGE, PIN_TO_ADC(POWER_MONITOR_VOLTAGE_PIN), -1)

#define IS_ADC_REQUIRED(n) ( \
GET_TEMP_0_ADC() == n || GET_TEMP_1_ADC() == n || GET_TEMP_2_ADC() == n || GET_TEMP_3_ADC() == n \
Expand Down Expand Up @@ -162,10 +162,10 @@ enum ADCIndex {
POWERMON_CURRENT,
#endif
#if GET_POWERMON_ADC_VOLTS() == 0
POWERMON_VOLTS,
POWERMON_VOLTAGE,
#endif

// Use later indexes for ADC index 1
// Indexes for ADC1 after those for ADC0

#if GET_TEMP_0_ADC() == 1
TEMP_0,
Expand Down Expand Up @@ -228,9 +228,8 @@ enum ADCIndex {
POWERMON_CURRENT,
#endif
#if GET_POWERMON_ADC_VOLTS() == 1
POWERMON_VOLTS,
POWERMON_VOLTAGE,
#endif

ADC_COUNT
};

Expand Down Expand Up @@ -351,10 +350,10 @@ enum ADCIndex {
POWER_MONITOR_CURRENT_PIN,
#endif
#if GET_POWERMON_ADC_VOLTS() == 0
POWER_MONITOR_VOLTS_PIN,
POWER_MONITOR_VOLTAGE_PIN,
#endif

// ADC1 pins
// Pins for ADC1 after ADC0

#if GET_TEMP_0_ADC() == 1
TEMP_0_PIN,
Expand Down Expand Up @@ -417,7 +416,7 @@ enum ADCIndex {
POWER_MONITOR_CURRENT_PIN,
#endif
#if GET_POWERMON_ADC_VOLTS() == 1
POWER_MONITOR_VOLTS_PIN,
POWER_MONITOR_VOLTAGE_PIN,
#endif
};

Expand Down Expand Up @@ -488,7 +487,7 @@ enum ADCIndex {
{ PIN_TO_INPUTCTRL(POWER_MONITOR_CURRENT_PIN) },
#endif
#if GET_POWERMON_ADC_VOLTS() == 0
{ PIN_TO_INPUTCTRL(POWER_MONITOR_VOLTS_PIN) },
{ PIN_TO_INPUTCTRL(POWER_MONITOR_VOLTAGE_PIN) },
#endif
};

Expand Down Expand Up @@ -560,7 +559,7 @@ enum ADCIndex {
{ PIN_TO_INPUTCTRL(POWER_MONITOR_CURRENT_PIN) },
#endif
#if GET_POWERMON_ADC_VOLTS() == 1
{ PIN_TO_INPUTCTRL(POWER_MONITOR_VOLTS_PIN) },
{ PIN_TO_INPUTCTRL(POWER_MONITOR_VOLTAGE_PIN) },
#endif
};

Expand Down
6 changes: 1 addition & 5 deletions Marlin/src/HAL/STM32/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,7 @@

typedef double isr_float_t; // FPU ops are used for single-precision, so use double for ISRs.

#if defined(STM32G0B1xx) || defined(STM32H7xx)
typedef int32_t pin_t;
#else
typedef int16_t pin_t;
#endif
typedef int32_t pin_t; // Parity with platform/ststm32

class libServo;
typedef libServo hal_servo_t;
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/STM32/tft/xpt2046.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ bool XPT2046::getRawPoint(int16_t * const x, int16_t * const y) {
if (isBusy() || !isTouched()) return false;
*x = getRawData(XPT2046_X);
*y = getRawData(XPT2046_Y);
return true;
return isTouched();
}

uint16_t XPT2046::getRawData(const XPTCoordinate coordinate) {
Expand Down
Loading

0 comments on commit 363a52f

Please sign in to comment.