Skip to content

Commit 5429ef0

Browse files
HoverClubthinkyhead
authored andcommitted
🔧 Sanity-check PRINTCOUNTER_SAVE_INTERVAL + ESP32 I2S Exp (MarlinFirmware#25527)
Co-authored-by: Scott Lahteine <[email protected]>
1 parent 3b75283 commit 5429ef0

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

Marlin/src/HAL/ESP32/inc/SanityCheck.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,7 @@
5656
#if BOTH(I2S_STEPPER_STREAM, LIN_ADVANCE) && DISABLED(EXPERIMENTAL_I2S_LA)
5757
#error "I2S stream is currently incompatible with LIN_ADVANCE."
5858
#endif
59+
60+
#if BOTH(I2S_STEPPER_STREAM, PRINTCOUNTER) && PRINTCOUNTER_SAVE_INTERVAL > 0 && DISABLED(PRINTCOUNTER_SYNC)
61+
#error "PRINTCOUNTER_SAVE_INTERVAL may cause issues on ESP32 with an I2S expander. Define PRINTCOUNTER_SYNC in Configuration.h for an imperfect solution."
62+
#endif

Marlin/src/HAL/LPC1768/inc/Conditionals_post.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@
3030
// LPC1768 boards seem to lose steps when saving to EEPROM during print (issue #20785)
3131
// TODO: Which other boards are incompatible?
3232
#if defined(MCU_LPC1768) && ENABLED(FLASH_EEPROM_EMULATION) && PRINTCOUNTER_SAVE_INTERVAL > 0
33-
#define PRINTCOUNTER_SYNC 1
33+
#define PRINTCOUNTER_SYNC
3434
#endif

Marlin/src/HAL/STM32/inc/Conditionals_post.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@
3030

3131
// Some STM32F4 boards may lose steps when saving to EEPROM during print (PR #17946)
3232
#if defined(STM32F4xx) && ENABLED(FLASH_EEPROM_EMULATION) && PRINTCOUNTER_SAVE_INTERVAL > 0
33-
#define PRINTCOUNTER_SYNC 1
33+
#define PRINTCOUNTER_SYNC
3434
#endif

Marlin/src/inc/Warnings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@
715715
#warning "Creality 4.2.2 boards come with a variety of stepper drivers. Check the board label (typically on SD Card module) and set the correct *_DRIVER_TYPE! (C=HR4988, E=A4988, A=TMC2208, B=TMC2209, H=TMC2225, H8=HR4988). (Define NO_CREALITY_422_DRIVER_WARNING to suppress this warning.)"
716716
#endif
717717

718-
#if PRINTCOUNTER_SYNC
718+
#if ENABLED(PRINTCOUNTER_SYNC)
719719
#warning "To prevent step loss, motion will pause for PRINTCOUNTER auto-save."
720720
#endif
721721

Marlin/src/module/printcounter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Stopwatch print_job_timer; // Global Print Job Timer instance
4141
#include "../libs/buzzer.h"
4242
#endif
4343

44-
#if PRINTCOUNTER_SYNC
44+
#if ENABLED(PRINTCOUNTER_SYNC)
4545
#include "../module/planner.h"
4646
#endif
4747

0 commit comments

Comments
 (0)