Skip to content

Commit

Permalink
Merge branch 'bugfix-2.1.x' of github.com:MarlinFirmware/Marlin into …
Browse files Browse the repository at this point in the history
…leo_1S_S6_btt_mini
  • Loading branch information
JaxTheWolf committed Nov 24, 2024
2 parents 0fc806b + 72f2657 commit 42f7f84
Show file tree
Hide file tree
Showing 34 changed files with 241 additions and 2,132 deletions.
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 "2024-11-14"
//#define STRING_DISTRIBUTION_DATE "2024-11-24"

/**
* The protocol for communication to the host. Protocol indicates communication
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/DUE/eeprom_flash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ static bool ee_PageWrite(uint16_t page, const void *data) {
uint32_t *p1 = (uint32_t*)addrflash;
uint32_t *p2 = (uint32_t*)data;
int count = 0;
for (i =0; i<PageSize >> 2; i++) {
for (i = 0; i < PageSize >> 2; i++) {
if (p1[i] != p2[i]) {
uint32_t delta = p1[i] ^ p2[i];
while (delta) {
Expand Down
Binary file not shown.
Binary file added Marlin/src/HAL/RP2040/docs/rp2040-datasheet.pdf
Binary file not shown.
8 changes: 4 additions & 4 deletions Marlin/src/HAL/RP2040/pinsDebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ uint8_t get_pin_mode(const pin_t Ard_num) {

}

bool GET_PINMODE(const pin_t Ard_num) {
bool getValidPinMode(const pin_t Ard_num) {
const uint8_t pin_mode = get_pin_mode(Ard_num);
return pin_mode == MODE_PIN_OUTPUT || pin_mode == MODE_PIN_ALT; // assume all alt definitions are PWM
}
Expand All @@ -122,7 +122,7 @@ int8_t digital_pin_to_analog_pin(pin_t Ard_num) {
return (Ard_num >= 0 && Ard_num < NUM_ANALOG_INPUTS) ? Ard_num : -1;
}

bool IS_ANALOG(const pin_t Ard_num) {
bool isAnalogPin(const pin_t Ard_num) {
return digital_pin_to_analog_pin(Ard_num) != -1;
}

Expand All @@ -131,7 +131,7 @@ bool is_digital(const pin_t x) {
return pin_mode == MODE_PIN_INPUT || pin_mode == MODE_PIN_OUTPUT;
}

void print_port(const pin_t Ard_num) {
void printPinPort(const pin_t Ard_num) {
SERIAL_ECHOPGM("Pin: ");
SERIAL_ECHO(Ard_num);
}
Expand All @@ -140,7 +140,7 @@ bool pwm_status(const pin_t Ard_num) {
return get_pin_mode(Ard_num) == MODE_PIN_ALT;
}

void pwm_details(const pin_t Ard_num) {
void printPinPWM(const pin_t Ard_num) {
if (PWM_PIN(Ard_num)) {
}
}
2 changes: 1 addition & 1 deletion Marlin/src/gcode/bedlevel/G35.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
* 41 - Counter-Clockwise M4
* 50 - Clockwise M5
* 51 - Counter-Clockwise M5
**/
*/
void GcodeSuite::G35() {

DEBUG_SECTION(log_G35, "G35", DEBUGGING(LEVELING));
Expand Down
56 changes: 28 additions & 28 deletions Marlin/src/gcode/bedlevel/G42.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,40 +43,40 @@
* P : Flag to put the probe at the given point
*/
void GcodeSuite::G42() {
if (MOTION_CONDITIONS) {
const bool hasI = parser.seenval('I');
const int8_t ix = hasI ? parser.value_int() : 0;
const bool hasJ = parser.seenval('J');
const int8_t iy = hasJ ? parser.value_int() : 0;
if (!MOTION_CONDITIONS) return;

if ((hasI && !WITHIN(ix, 0, GRID_MAX_POINTS_X - 1)) || (hasJ && !WITHIN(iy, 0, GRID_MAX_POINTS_Y - 1))) {
SERIAL_ECHOLNPGM(STR_ERR_MESH_XY);
return;
}
const bool hasI = parser.seenval('I');
const int8_t ix = hasI ? parser.value_int() : 0;
const bool hasJ = parser.seenval('J');
const int8_t iy = hasJ ? parser.value_int() : 0;

// Move to current_position, as modified by I, J, P parameters
destination = current_position;
if ((hasI && !WITHIN(ix, 0, GRID_MAX_POINTS_X - 1)) || (hasJ && !WITHIN(iy, 0, GRID_MAX_POINTS_Y - 1))) {
SERIAL_ECHOLNPGM(STR_ERR_MESH_XY);
return;
}

if (hasI) destination.x = bedlevel.get_mesh_x(ix);
if (hasJ) destination.y = bedlevel.get_mesh_y(iy);
// Move to current_position, as modified by I, J, P parameters
destination = current_position;

#if HAS_PROBE_XY_OFFSET
if (parser.seen_test('P')) {
if (hasI) destination.x -= probe.offset_xy.x;
if (hasJ) destination.y -= probe.offset_xy.y;
}
#endif
if (hasI) destination.x = bedlevel.get_mesh_x(ix);
if (hasJ) destination.y = bedlevel.get_mesh_y(iy);

const feedRate_t fval = parser.linearval('F'),
fr_mm_s = MMM_TO_MMS(fval > 0 ? fval : 0.0f);
#if HAS_PROBE_XY_OFFSET
if (parser.seen_test('P')) {
if (hasI) destination.x -= probe.offset_xy.x;
if (hasJ) destination.y -= probe.offset_xy.y;
}
#endif

// SCARA kinematic has "safe" XY raw moves
#if IS_SCARA
prepare_internal_fast_move_to_destination(fr_mm_s);
#else
prepare_internal_move_to_destination(fr_mm_s);
#endif
}
const feedRate_t fval = parser.linearval('F'),
fr_mm_s = MMM_TO_MMS(fval > 0 ? fval : 0.0f);

// SCARA kinematic has "safe" XY raw moves
#if IS_SCARA
prepare_internal_fast_move_to_destination(fr_mm_s);
#else
prepare_internal_move_to_destination(fr_mm_s);
#endif
}

#endif // HAS_MESH
21 changes: 14 additions & 7 deletions Marlin/src/gcode/gcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@
* M84 - Disable steppers until next move, or use S<seconds> to specify an idle
* duration after which steppers should turn off. S0 disables the timeout.
* M85 - Set inactivity shutdown timer with parameter S<seconds>. To disable set zero (default)
* M86 - Set / Report Hotend Idle Timeout. (Requires HOTEND_IDLE_TIMEOUT)
* M87 - Cancel Hotend Idle Timeout (by setting the timeout period to 0). (Requires HOTEND_IDLE_TIMEOUT)
* M92 - Set planner.settings.axis_steps_per_mm for one or more axes. (Requires EDITABLE_STEPS_PER_UNIT)
*
* M100 - Watch Free Memory (for debugging) (Requires M100_FREE_MEMORY_WATCHER)
Expand Down Expand Up @@ -213,6 +215,8 @@
* M281 - Set servo min|max position: "M281 P<index> L<min> U<max>". (Requires EDITABLE_SERVO_ANGLES)
* M282 - Detach servo: "M282 P<index>". (Requires SERVO_DETACH_GCODE)
* M290 - Babystepping (Requires BABYSTEPPING)
* M293 - Babystep Z UP (Requires EP_BABYSTEPPING)
* M294 - Babystep Z DOWN (Requires EP_BABYSTEPPING)
* M300 - Play beep sound S<frequency Hz> P<duration ms>
* M301 - Set PID parameters P I and D. (Requires PIDTEMP)
* M302 - Allow cold extrudes, or set the minimum extrude S<temperature>. (Requires PREVENT_COLD_EXTRUSION)
Expand Down Expand Up @@ -246,6 +250,7 @@
* M430 - Read the system current, voltage, and power (Requires POWER_MONITOR_CURRENT, POWER_MONITOR_VOLTAGE, or POWER_MONITOR_FIXED_VOLTAGE)
* M485 - Send RS485 packets (Requires RS485_SERIAL_PORT)
* M486 - Identify and cancel objects. (Requires CANCEL_OBJECTS)
* M493 - Get or set input FT Motion / Shaping parameters. (Requires FT_MOTION)
* M500 - Store parameters in EEPROM. (Requires EEPROM_SETTINGS)
* M501 - Restore parameters from EEPROM. (Requires EEPROM_SETTINGS)
* M502 - Revert to the default "factory settings". ** Does not write them to EEPROM! **
Expand All @@ -261,7 +266,7 @@
* M554 - Get or set IP gateway. (Requires enabled Ethernet port)
* M569 - Enable stealthChop on an axis. (Requires at least one _DRIVER_TYPE to be TMC2130/2160/2208/2209/5130/5160)
* M575 - Change the serial baud rate. (Requires BAUD_RATE_GCODE)
* M592 - Get or set nonlinear extrusion parameters. (Requires NONLINEAR_EXTRUSION)
* M592 - Get or set Nonlinear Extrusion parameters. (Requires NONLINEAR_EXTRUSION)
* M593 - Get or set input shaping parameters. (Requires INPUT_SHAPING_[XY])
* M600 - Pause for filament change: "M600 X<pos> Y<pos> Z<raise> E<first_retract> L<later_retract>". (Requires ADVANCED_PAUSE_FEATURE)
* M603 - Configure filament change: "M603 T<tool> U<unload_length> L<load_length>". (Requires ADVANCED_PAUSE_FEATURE)
Expand All @@ -274,15 +279,17 @@
* M701 - Load filament (Requires FILAMENT_LOAD_UNLOAD_GCODES)
* M702 - Unload filament (Requires FILAMENT_LOAD_UNLOAD_GCODES)
*
* M704 - Preload to MMU (Requires PRUSA_MMU3)
* M705 - Eject filament (Requires PRUSA_MMU3)
* M706 - Cut filament (Requires PRUSA_MMU3)
* M707 - Read from MMU register (Requires PRUSA_MMU3)
* M708 - Write to MMU register (Requires PRUSA_MMU3)
* M709 - MMU power & reset (Requires PRUSA_MMU3)
*** PRUSA_MMU3 ***
* M704 - Preload to MMU
* M705 - Eject filament
* M706 - Cut filament
* M707 - Read from MMU register
* M708 - Write to MMU register
* M709 - MMU power & reset
*
* M808 - Set or Goto a Repeat Marker (Requires GCODE_REPEAT_MARKERS)
* M810-M819 - Define/execute a G-code macro (Requires GCODE_MACROS)
* M820 - Report all defined M810-M819 G-code macros (Requires GCODE_MACROS)
* M851 - Set Z probe's XYZ offsets in current units. (Negative values: X=left, Y=front, Z=below)
* M852 - Set skew factors: "M852 [I<xy>] [J<xz>] [K<yz>]". (Requires SKEW_CORRECTION_GCODE, plus SKEW_CORRECTION_FOR_Z for IJ)
*
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/gcode/host/M115.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void GcodeSuite::M115() {
SERIAL_ECHO(F("CEDE2A2F-"));
for (uint8_t i = 1; i <= 6; i++) {
print_hex_word(UID[(i % 2) ? i : i - 2]); // 1111-0000-3333-222255554444
if (i <= 3) SERIAL_ECHO(C('-'));
if (i <= 3) SERIAL_CHAR('-');
}
#endif
#endif
Expand Down
29 changes: 14 additions & 15 deletions Marlin/src/gcode/motion/G5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,25 +45,24 @@
* G5: Cubic B-spline
*/
void GcodeSuite::G5() {
if (MOTION_CONDITIONS) {
if (!MOTION_CONDITIONS) return;

#if ENABLED(CNC_WORKSPACE_PLANES)
if (workspace_plane != PLANE_XY) {
SERIAL_ERROR_MSG(STR_ERR_BAD_PLANE_MODE);
return;
}
#endif
#if ENABLED(CNC_WORKSPACE_PLANES)
if (workspace_plane != PLANE_XY) {
SERIAL_ERROR_MSG(STR_ERR_BAD_PLANE_MODE);
return;
}
#endif

get_destination_from_command();
get_destination_from_command();

const xy_pos_t offsets[2] = {
{ parser.linearval('I'), parser.linearval('J') },
{ parser.linearval('P'), parser.linearval('Q') }
};
const xy_pos_t offsets[2] = {
{ parser.linearval('I'), parser.linearval('J') },
{ parser.linearval('P'), parser.linearval('Q') }
};

cubic_b_spline(current_position, destination, offsets, MMS_SCALED(feedrate_mm_s), active_extruder);
current_position = destination;
}
cubic_b_spline(current_position, destination, offsets, MMS_SCALED(feedrate_mm_s), active_extruder);
current_position = destination;
}

#endif // BEZIER_CURVE_SUPPORT
2 changes: 1 addition & 1 deletion Marlin/src/inc/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* version was tagged.
*/
#ifndef STRING_DISTRIBUTION_DATE
#define STRING_DISTRIBUTION_DATE "2024-11-14"
#define STRING_DISTRIBUTION_DATE "2024-11-24"
#endif

/**
Expand Down
8 changes: 4 additions & 4 deletions Marlin/src/lcd/extui/ui_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ namespace ExtUI {
return GET_TEMP_ADJUSTMENT(thermalManager.degHotend(extruder - E0));
}

celsius_float_t getTargetTemp_celsius(const heater_t heater) {
celsius_t getTargetTemp_celsius(const heater_t heater) {
switch (heater) {
#if HAS_HEATED_BED
case BED: return GET_TEMP_ADJUSTMENT(thermalManager.degTargetBed());
Expand All @@ -305,19 +305,19 @@ namespace ExtUI {
}
}

celsius_float_t getTargetTemp_celsius(const extruder_t extruder) {
celsius_t getTargetTemp_celsius(const extruder_t extruder) {
return GET_TEMP_ADJUSTMENT(thermalManager.degTargetHotend(extruder - E0));
}

//
// Fan target/actual speed
//
float getTargetFan_percent(const fan_t fan) {
uint8_t getTargetFan_percent(const fan_t fan) {
UNUSED(fan);
return TERN0(HAS_FAN, thermalManager.fanSpeedPercent(fan - FAN0));
}

float getActualFan_percent(const fan_t fan) {
uint8_t getActualFan_percent(const fan_t fan) {
UNUSED(fan);
return TERN0(HAS_FAN, thermalManager.scaledFanSpeedPercent(fan - FAN0));
}
Expand Down
8 changes: 4 additions & 4 deletions Marlin/src/lcd/extui/ui_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@ namespace ExtUI {
bool isHeaterIdle(const extruder_t);
celsius_float_t getActualTemp_celsius(const heater_t);
celsius_float_t getActualTemp_celsius(const extruder_t);
celsius_float_t getTargetTemp_celsius(const heater_t);
celsius_float_t getTargetTemp_celsius(const extruder_t);
float getActualFan_percent(const fan_t);
float getTargetFan_percent(const fan_t);
celsius_t getTargetTemp_celsius(const heater_t);
celsius_t getTargetTemp_celsius(const extruder_t);
uint8_t getActualFan_percent(const fan_t);
uint8_t getTargetFan_percent(const fan_t);

// High level positions, by Axis ID, Extruder ID
float getAxisPosition_mm(const axis_t);
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/lcd/menu/menu_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void menu_motion();
void menu_temperature();
void menu_configuration();

#if HAS_LEVELING || HAS_BED_PROBE
#if ANY(HAS_LEVELING, HAS_BED_PROBE, ASSISTED_TRAMMING_WIZARD, LCD_BED_TRAMMING)
void menu_probe_level();
#endif

Expand Down Expand Up @@ -338,7 +338,7 @@ void menu_main() {

SUBMENU(MSG_MOTION, menu_motion);

#if HAS_LEVELING || HAS_BED_PROBE
#if ANY(HAS_LEVELING, HAS_BED_PROBE, ASSISTED_TRAMMING_WIZARD, LCD_BED_TRAMMING)
SUBMENU(MSG_PROBE_AND_LEVEL, menu_probe_level);
#endif
}
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/lcd/menu/menu_probe_level.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include "../../inc/MarlinConfigPre.h"

#if HAS_MARLINUI_MENU && (HAS_LEVELING || HAS_BED_PROBE)
#if HAS_MARLINUI_MENU && ANY(HAS_LEVELING, HAS_BED_PROBE, ASSISTED_TRAMMING_WIZARD, LCD_BED_TRAMMING)

#include "menu_item.h"

Expand Down Expand Up @@ -410,4 +410,4 @@ void menu_probe_level() {
END_MENU();
}

#endif // HAS_MARLINUI_MENU && (HAS_LEVELING || HAS_BED_PROBE)
#endif // HAS_MARLINUI_MENU && (HAS_LEVELING || HAS_BED_PROBE || ASSISTED_TRAMMING_WIZARD || LCD_BED_TRAMMING)
Loading

0 comments on commit 42f7f84

Please sign in to comment.