Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit f8771e9
Author: thinkyhead <thinkyhead@users.noreply.github.com>
Date:   Thu Jan 4 00:21:47 2024 +0000

    [cron] Bump distribution date (2024-01-04)

commit be1dee7
Author: Orel <37673727+0r31@users.noreply.github.com>
Date:   Wed Jan 3 21:02:20 2024 +0100

    🎨 Clean up old #includes (MarlinFirmware#26621)

commit 68b7802
Author: narno2202 <130909513+narno2202@users.noreply.github.com>
Date:   Wed Jan 3 20:19:19 2024 +0100

    📝 Update M493 (FT_MOTION) comments (MarlinFirmware#26620)

    Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>

commit 6d40776
Author: plampix <plampix@users.noreply.github.com>
Date:   Wed Jan 3 16:43:18 2024 +0100

    🔧 CONFIGURE_FILAMENT_CHANGE - Optional M603 (MarlinFirmware#26613)

    Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>

commit 4a9e102
Author: I3DBeeTech <129617321+I3DBeeTech@users.noreply.github.com>
Date:   Wed Jan 3 06:23:41 2024 +0530

    📺 I3DBEE TECH Beez Mini 12864 (MarlinFirmware#26596)

commit 1ac6428
Author: ellensp <530024+ellensp@users.noreply.github.com>
Date:   Wed Jan 3 13:52:12 2024 +1300

    🔪 Options to slim M111, remove M115 (MarlinFirmware#26603)

    Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>

commit 7c159a2
Author: thinkyhead <thinkyhead@users.noreply.github.com>
Date:   Wed Jan 3 00:21:14 2024 +0000

    [cron] Bump distribution date (2024-01-03)

commit 5b74e25
Author: ellensp <530024+ellensp@users.noreply.github.com>
Date:   Tue Jan 2 20:25:26 2024 +1300

    🔨 BSD string workaround (MarlinFirmware#26532)

    Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>

commit f02fa63
Author: thinkyhead <thinkyhead@users.noreply.github.com>
Date:   Tue Jan 2 00:21:06 2024 +0000

    [cron] Bump distribution date (2024-01-02)

commit 3b6f1bf
Author: Scott Lahteine <thinkyhead@users.noreply.github.com>
Date:   Mon Jan 1 00:50:46 2024 -0600

    🧑‍💻 Update pinsformat

commit 1d61571
Author: Scott Lahteine <thinkyhead@users.noreply.github.com>
Date:   Sun Dec 31 03:30:53 2023 -0600

    🧑‍💻 Python version of pins formatting script

commit 99c5702
Author: thinkyhead <thinkyhead@users.noreply.github.com>
Date:   Mon Jan 1 00:24:20 2024 +0000

    [cron] Bump distribution date (2024-01-01)

commit 13e82fa
Author: nagubash <40751501+nagendras176@users.noreply.github.com>
Date:   Mon Jan 1 02:33:04 2024 +0530

    🔨 Fix formatting issue in Makefile (MarlinFirmware#26599)

commit 95878df
Author: narno2202 <130909513+narno2202@users.noreply.github.com>
Date:   Sun Dec 31 22:00:57 2023 +0100

    🐛 Fix homing with FT_MOTION (MarlinFirmware#26595)

commit 5d1ede0
Author: ellensp <530024+ellensp@users.noreply.github.com>
Date:   Sun Dec 31 22:54:26 2023 +1300

    ✨ CTC_A10S_A13 (MarlinFirmware#26514)
  • Loading branch information
smiksky committed Jan 4, 2024
1 parent 2455a37 commit b1be627
Show file tree
Hide file tree
Showing 45 changed files with 717 additions and 196 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CONTAINER_IMAGE := marlin-dev

help:
@echo "Tasks for local development:"
@echo "* format-pins: Reformat all pins files
@echo "* format-pins: Reformat all pins files"
@echo "* tests-single-ci: Run a single test from inside the CI"
@echo "* tests-single-local: Run a single test locally"
@echo "* tests-single-local-docker: Run a single test locally, using docker"
Expand Down
21 changes: 13 additions & 8 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -2054,7 +2054,7 @@
/**
* Enable detailed logging of G28, G29, M48, etc.
* Turn on with the command 'M111 S32'.
* NOTE: Requires a lot of PROGMEM!
* NOTE: Requires a lot of flash!
*/
//#define DEBUG_LEVELING_FEATURE

Expand Down Expand Up @@ -2343,7 +2343,7 @@
*/
#define EEPROM_SETTINGS // Persistent storage with M500 and M501
//#define DISABLE_M503 // Saves ~2700 bytes of flash. Disable for release!
#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save flash.
#define EEPROM_BOOT_SILENT // Keep M503 quiet and only give errors during first load
#if ENABLED(EEPROM_SETTINGS)
//#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors.
Expand Down Expand Up @@ -3018,6 +3018,11 @@
//
//#define BTT_MINI_12864

//
// BEEZ MINI 12864 is an alias for FYSETC_MINI_12864_2_1. Type A/B. NeoPixel RGB Backlight.
//
//#define BEEZ_MINI_12864

//
// Factory display for Creality CR-10 / CR-7 / Ender-3
// https://www.aliexpress.com/item/32833148327.html
Expand All @@ -3032,14 +3037,14 @@
//#define ENDER2_STOCKDISPLAY

//
// ANET and Tronxy Graphical Controller
//
// Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
// A clone of the RepRapDiscount full graphics display but with
// different pins/wiring (see pins_ANET_10.h). Enable one of these.
// ANET and Tronxy 128×64 Full Graphics Controller as used on Anet A6
//
//#define ANET_FULL_GRAPHICS_LCD
//#define ANET_FULL_GRAPHICS_LCD_ALT_WIRING

//
// GUCOCO CTC 128×64 Full Graphics Controller as used on GUCOCO CTC A10S
//
//#define CTC_A10S_A13

//
// AZSMZ 12864 LCD with SD
Expand Down
15 changes: 14 additions & 1 deletion Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1341,7 +1341,7 @@
#define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
#define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm

// Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
// Uncomment to enable reporting (required for "G425 V", but consumes flash).
//#define CALIBRATION_REPORTING

// The true location and dimension the cube/bolt/washer on the bed.
Expand Down Expand Up @@ -2929,6 +2929,7 @@
#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
//#define FILAMENT_CHANGE_MENU_AT_BOTTOM // Add the filament change menu to the bottom of the main menu instead of below temperature
//#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#define CONFIGURE_FILAMENT_CHANGE // Add M603 G-code and menu items. Requires ~1.3K bytes of flash.
#endif

// @section tmc_smart
Expand Down Expand Up @@ -3935,6 +3936,18 @@

//#define REPETIER_GCODE_M360 // Add commands originally from Repetier FW

/**
* Enable M111 debug flags 1=ECHO, 2=INFO, 4=ERRORS (unimplemented).
* Disable to save some flash. Some hosts (Repetier Host) may rely on this feature.
*/
#define DEBUG_FLAGS_GCODE

/**
* M115 - Report capabilites. Disable to save ~1150 bytes of flash.
* Some hosts (and serial TFT displays) rely on this feature.
*/
#define REPORT_CAPABILITIES_GCODE

/**
* Enable this option for a leaner build of Marlin that removes
* workspace offsets to slightly optimize performance.
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-12-31"
//#define STRING_DISTRIBUTION_DATE "2024-01-04"

/**
* Defines a generic printer name to be output to the LCD after booting Marlin.
Expand Down
46 changes: 46 additions & 0 deletions Marlin/src/HAL/LINUX/HAL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/

#ifdef __PLAT_LINUX__

#include "../../inc/MarlinConfig.h"
Expand Down Expand Up @@ -57,4 +58,49 @@ uint16_t MarlinHAL::adc_value() {

void MarlinHAL::reboot() { /* Reset the application state and GPIO */ }

// ------------------------
// BSD String
// ------------------------

/**
* Copyright (c) 1998, 2015 Todd C. Miller <Todd.Miller@courtesan.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#ifndef HAS_LIBBSD

/**
* Copy string src to buffer dst of size dsize. At most dsize-1
* chars will be copied. Always NUL terminates (unless dsize == 0).
* Returns strlen(src); if retval >= dsize, truncation occurred.
*/
size_t MarlinHAL::_strlcpy(char *dst, const char *src, size_t dsize) {
const char *osrc = src;
size_t nleft = dsize;

// Copy as many bytes as will fit.
if (nleft != 0) while (--nleft != 0) if ((*dst++ = *src++) == '\0') break;

// Not enough room in dst, add NUL and traverse rest of src.
if (nleft == 0) {
if (dsize != 0) *dst = '\0'; // NUL-terminate dst
while (*src++) { /* nada */ }
}

return (src - osrc - 1); // count does not include NUL
}

#endif // HAS_LIBBSD

#endif // __PLAT_LINUX__
14 changes: 14 additions & 0 deletions Marlin/src/HAL/LINUX/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
#include <iostream>
#include <stdint.h>
#include <stdarg.h>

#ifdef HAS_LIBBSD
#include <bsd/string.h>
#endif

#undef min
#undef max
#include <algorithm>
Expand Down Expand Up @@ -162,4 +167,13 @@ class MarlinHAL {
}

static void set_pwm_frequency(const pin_t, int) {}

#ifndef HAS_LIBBSD
/**
* Redirect missing strlcpy here
*/
static size_t _strlcpy(char *dst, const char *src, size_t dsize);
#define strlcpy hal._strlcpy
#endif

};
3 changes: 0 additions & 3 deletions Marlin/src/HAL/LINUX/include/Arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@

#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
67 changes: 67 additions & 0 deletions Marlin/src/HAL/NATIVE_SIM/HAL.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/

/**
* Copyright (c) 1998, 2015 Todd C. Miller <Todd.Miller@courtesan.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#ifdef __PLAT_NATIVE_SIM__

#ifndef HAS_LIBBSD

#include "HAL.h"

/**
* Copy string src to buffer dst of size dsize. At most dsize-1
* chars will be copied. Always NUL terminates (unless dsize == 0).
* Returns strlen(src); if retval >= dsize, truncation occurred.
*/
size_t MarlinHAL::_strlcpy(char *dst, const char *src, size_t dsize) {
const char *osrc = src;
size_t nleft = dsize;

// Copy as many bytes as will fit.
if (nleft != 0) while (--nleft != 0) if ((*dst++ = *src++) == '\0') break;

// Not enough room in dst, add NUL and traverse rest of src.
if (nleft == 0) {
if (dsize != 0) *dst = '\0'; // NUL-terminate dst
while (*src++) { /* nada */ }
}

return (src - osrc - 1); // count does not include NUL
}

#endif // HAS_LIBBSD
#endif // __PLAT_NATIVE_SIM__
10 changes: 10 additions & 0 deletions Marlin/src/HAL/NATIVE_SIM/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,4 +263,14 @@ class MarlinHAL {
analogWrite(pin, v);
}

static void set_pwm_frequency(const pin_t, int) {}

#ifndef HAS_LIBBSD
/**
* Redirect missing strlcpy here
*/
static size_t _strlcpy(char *dst, const char *src, size_t dsize);
#define strlcpy hal._strlcpy
#endif

};
21 changes: 8 additions & 13 deletions Marlin/src/core/serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,14 @@
//
enum MarlinDebugFlags : uint8_t {
MARLIN_DEBUG_NONE = 0,
MARLIN_DEBUG_ECHO = _BV(0), ///< Echo commands in order as they are processed
MARLIN_DEBUG_INFO = _BV(1), ///< Print messages for code that has debug output
MARLIN_DEBUG_ERRORS = _BV(2), ///< Not implemented
MARLIN_DEBUG_DRYRUN = _BV(3), ///< Ignore temperature setting and E movement commands
MARLIN_DEBUG_COMMUNICATION = _BV(4), ///< Not implemented
#if ENABLED(DEBUG_LEVELING_FEATURE)
MARLIN_DEBUG_LEVELING = _BV(5), ///< Print detailed output for homing and leveling
MARLIN_DEBUG_MESH_ADJUST = _BV(6), ///< UBL bed leveling
#else
MARLIN_DEBUG_LEVELING = 0,
MARLIN_DEBUG_MESH_ADJUST = 0,
#endif
MARLIN_DEBUG_ALL = 0xFF
MARLIN_DEBUG_ECHO = TERN0(DEBUG_FLAGS_GCODE, _BV(0)), //!< Echo commands in order as they are processed
MARLIN_DEBUG_INFO = TERN0(DEBUG_FLAGS_GCODE, _BV(1)), //!< Print messages for code that has debug output
MARLIN_DEBUG_ERRORS = TERN0(DEBUG_FLAGS_GCODE, _BV(2)), //!< Not implemented
MARLIN_DEBUG_DRYRUN = _BV(3), //!< Ignore temperature setting and E movement commands
MARLIN_DEBUG_COMMUNICATION = TERN0(DEBUG_FLAGS_GCODE, _BV(4)), //!< Not implemented
MARLIN_DEBUG_LEVELING = TERN0(DEBUG_LEVELING_FEATURE, _BV(5)), //!< Print detailed output for homing and leveling
MARLIN_DEBUG_MESH_ADJUST = TERN0(DEBUG_LEVELING_FEATURE, _BV(6)), //!< UBL bed leveling
MARLIN_DEBUG_ALL = MARLIN_DEBUG_ECHO|MARLIN_DEBUG_INFO|MARLIN_DEBUG_ERRORS|MARLIN_DEBUG_COMMUNICATION|MARLIN_DEBUG_LEVELING|MARLIN_DEBUG_MESH_ADJUST
};

extern uint8_t marlin_debug_flags;
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/feature/max7219.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

#if ENABLED(MAX7219_DEBUG)

#define MAX7219_ERRORS // Disable to save 406 bytes of Program Memory
#define MAX7219_ERRORS // Requires ~400 bytes of flash

#include "max7219.h"

Expand Down
4 changes: 3 additions & 1 deletion Marlin/src/feature/pause.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ static xyze_pos_t resume_position;
PauseMode pause_mode = PAUSE_MODE_PAUSE_PRINT;
#endif

fil_change_settings_t fc_settings[EXTRUDERS];
#if ENABLED(CONFIGURE_FILAMENT_CHANGE)
fil_change_settings_t fc_settings[EXTRUDERS];
#endif

#if HAS_MEDIA
#include "../sd/cardreader.h"
Expand Down
19 changes: 14 additions & 5 deletions Marlin/src/feature/pause.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@
* This may be combined with related G-codes if features are consolidated.
*/

typedef struct {
float unload_length, load_length;
} fil_change_settings_t;

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

#if ENABLED(ADVANCED_PAUSE_FEATURE)
Expand Down Expand Up @@ -69,7 +65,20 @@ enum PauseMessage : char {
extern PauseMode pause_mode;
#endif

extern fil_change_settings_t fc_settings[EXTRUDERS];
typedef struct FilamentChangeSettings {
#if ENABLED(CONFIGURE_FILAMENT_CHANGE)
float load_length, unload_length;
#else
static constexpr float load_length = FILAMENT_CHANGE_FAST_LOAD_LENGTH,
unload_length = FILAMENT_CHANGE_UNLOAD_LENGTH;
#endif
} fil_change_settings_t;

#if ENABLED(CONFIGURE_FILAMENT_CHANGE)
extern fil_change_settings_t fc_settings[EXTRUDERS];
#else
constexpr fil_change_settings_t fc_settings[EXTRUDERS];
#endif

extern uint8_t did_pause_print;

Expand Down
Loading

0 comments on commit b1be627

Please sign in to comment.