diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index a92557977f85..6cac225fce51 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1446,6 +1446,7 @@ //#define EEPROM_SETTINGS // Persistent storage with M500 and M501 //#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! #define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#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. #endif diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index f5d80a3eb3e8..6149864ab4fd 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -753,8 +753,12 @@ // Minimum time that a segment needs to take if the buffer is emptied #define DEFAULT_MINSEGMENTTIME 20000 // (ms) -// If defined the movements slow down when the look ahead buffer is only half full +// Slow down the machine if the look ahead buffer is (by default) half full. +// Increase the slowdown divisor for larger buffer sizes. #define SLOWDOWN +#if ENABLED(SLOWDOWN) + #define SLOWDOWN_DIVISOR 2 +#endif // Frequency limit // See nophead's blog for more info @@ -999,7 +1003,7 @@ #define BOOTSCREEN_TIMEOUT 4000 // (ms) Total Duration to display the boot screen(s) #endif -#if HAS_GRAPHICAL_LCD && HAS_PRINT_PROGRESS +#if HAS_GRAPHICAL_LCD && EITHER(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY) //#define PRINT_PROGRESS_SHOW_DECIMALS // Show progress with decimal digits //#define SHOW_REMAINING_TIME // Display estimated time to completion #if ENABLED(SHOW_REMAINING_TIME) @@ -1008,7 +1012,7 @@ #endif #endif -#if HAS_CHARACTER_LCD && HAS_PRINT_PROGRESS +#if HAS_CHARACTER_LCD && EITHER(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY) //#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing #if ENABLED(LCD_PROGRESS_BAR) #define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar diff --git a/Marlin/src/HAL/DUE/inc/Conditionals_post.h b/Marlin/src/HAL/DUE/inc/Conditionals_post.h index 223890d79016..b52462f6d891 100644 --- a/Marlin/src/HAL/DUE/inc/Conditionals_post.h +++ b/Marlin/src/HAL/DUE/inc/Conditionals_post.h @@ -24,5 +24,5 @@ #if USE_EMULATED_EEPROM #undef SRAM_EEPROM_EMULATION #undef SDCARD_EEPROM_EMULATION - #define FLASH_EEPROM_EMULATION 1 + #define FLASH_EEPROM_EMULATION #endif diff --git a/Marlin/src/HAL/ESP32/inc/Conditionals_post.h b/Marlin/src/HAL/ESP32/inc/Conditionals_post.h index 0285c52ee365..e51b55698e49 100644 --- a/Marlin/src/HAL/ESP32/inc/Conditionals_post.h +++ b/Marlin/src/HAL/ESP32/inc/Conditionals_post.h @@ -20,3 +20,8 @@ * */ #pragma once + +// If no real EEPROM, Flash emulation, or SRAM emulation is available fall back to SD emulation +#if ENABLED(EEPROM_SETTINGS) && NONE(USE_REAL_EEPROM, FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION) + #define SDCARD_EEPROM_EMULATION +#endif diff --git a/Marlin/src/HAL/LPC1768/inc/Conditionals_post.h b/Marlin/src/HAL/LPC1768/inc/Conditionals_post.h index 26371745431a..a8d102e865ae 100644 --- a/Marlin/src/HAL/LPC1768/inc/Conditionals_post.h +++ b/Marlin/src/HAL/LPC1768/inc/Conditionals_post.h @@ -21,10 +21,6 @@ */ #pragma once -#if ENABLED(EEPROM_SETTINGS) - #undef USE_REAL_EEPROM - #define USE_EMULATED_EEPROM 1 - #if DISABLED(FLASH_EEPROM_EMULATION) - #define SDCARD_EEPROM_EMULATION 1 - #endif +#if USE_EMULATED_EEPROM && NONE(SDCARD_EEPROM_EMULATION, SRAM_EEPROM_EMULATION) + #define FLASH_EEPROM_EMULATION #endif diff --git a/Marlin/src/HAL/LPC1768/persistent_store_flash.cpp b/Marlin/src/HAL/LPC1768/persistent_store_flash.cpp index 5525f818a046..e166858d6460 100644 --- a/Marlin/src/HAL/LPC1768/persistent_store_flash.cpp +++ b/Marlin/src/HAL/LPC1768/persistent_store_flash.cpp @@ -36,12 +36,11 @@ * 16Kb I/O buffers (intended to hold DMA USB and Ethernet data, but currently * unused). */ -#include "../../inc/MarlinConfigPre.h" +#include "../../inc/MarlinConfig.h" #if ENABLED(FLASH_EEPROM_EMULATION) #include "persistent_store_api.h" -#include "../../inc/MarlinConfig.h" extern "C" { #include diff --git a/Marlin/src/HAL/SAMD51/inc/Conditionals_post.h b/Marlin/src/HAL/SAMD51/inc/Conditionals_post.h index 223890d79016..b52462f6d891 100644 --- a/Marlin/src/HAL/SAMD51/inc/Conditionals_post.h +++ b/Marlin/src/HAL/SAMD51/inc/Conditionals_post.h @@ -24,5 +24,5 @@ #if USE_EMULATED_EEPROM #undef SRAM_EEPROM_EMULATION #undef SDCARD_EEPROM_EMULATION - #define FLASH_EEPROM_EMULATION 1 + #define FLASH_EEPROM_EMULATION #endif diff --git a/Marlin/src/HAL/STM32/inc/Conditionals_post.h b/Marlin/src/HAL/STM32/inc/Conditionals_post.h index 0285c52ee365..e51b55698e49 100644 --- a/Marlin/src/HAL/STM32/inc/Conditionals_post.h +++ b/Marlin/src/HAL/STM32/inc/Conditionals_post.h @@ -20,3 +20,8 @@ * */ #pragma once + +// If no real EEPROM, Flash emulation, or SRAM emulation is available fall back to SD emulation +#if ENABLED(EEPROM_SETTINGS) && NONE(USE_REAL_EEPROM, FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION) + #define SDCARD_EEPROM_EMULATION +#endif diff --git a/Marlin/src/HAL/STM32_F4_F7/inc/Conditionals_post.h b/Marlin/src/HAL/STM32_F4_F7/inc/Conditionals_post.h index 6e2cf6210163..5a190342ac7c 100644 --- a/Marlin/src/HAL/STM32_F4_F7/inc/Conditionals_post.h +++ b/Marlin/src/HAL/STM32_F4_F7/inc/Conditionals_post.h @@ -23,8 +23,7 @@ #if ENABLED(EEPROM_SETTINGS) && defined(STM32F7) #undef USE_REAL_EEPROM - #define USE_EMULATED_EEPROM 1 #undef SRAM_EEPROM_EMULATION #undef SDCARD_EEPROM_EMULATION - #define FLASH_EEPROM_EMULATION 1 + #define FLASH_EEPROM_EMULATION #endif diff --git a/Marlin/src/HAL/TEENSY31_32/inc/Conditionals_post.h b/Marlin/src/HAL/TEENSY31_32/inc/Conditionals_post.h index 0285c52ee365..e51b55698e49 100644 --- a/Marlin/src/HAL/TEENSY31_32/inc/Conditionals_post.h +++ b/Marlin/src/HAL/TEENSY31_32/inc/Conditionals_post.h @@ -20,3 +20,8 @@ * */ #pragma once + +// If no real EEPROM, Flash emulation, or SRAM emulation is available fall back to SD emulation +#if ENABLED(EEPROM_SETTINGS) && NONE(USE_REAL_EEPROM, FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION) + #define SDCARD_EEPROM_EMULATION +#endif diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index f19aaef968d5..5e2fe02077cd 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -202,7 +202,7 @@ const char NUL_STR[] PROGMEM = "", SP_Z_LBL[] PROGMEM = " Z:", SP_E_LBL[] PROGMEM = " E:"; -bool Running = true; +MarlinState marlin_state = MF_INITIALIZING; // For M109 and M190, this flag may be cleared (by M108) to exit the wait loop bool wait_for_heatup = true; @@ -839,7 +839,7 @@ void stop() { SERIAL_ERROR_MSG(STR_ERR_STOPPED); LCD_MESSAGEPGM(MSG_STOPPED); safe_delay(350); // allow enough time for messages to get out before stopping - Running = false; + marlin_state = MF_STOPPED; } } @@ -991,8 +991,8 @@ void setup() { SETUP_RUN(ui.show_bootscreen()); #endif - #if ENABLED(SDSUPPORT) - SETUP_RUN(card.mount()); // Mount the SD card before settings.first_load + #if ENABLED(SDSUPPORT) && defined(SDCARD_CONNECTION) && !SD_CONNECTION_IS(LCD) + SETUP_RUN(card.mount()); // Mount onboard / custom SD card before settings.first_load #endif SETUP_RUN(settings.first_load()); // Load data from EEPROM if available (or use defaults) @@ -1183,6 +1183,8 @@ void setup() { SETUP_RUN(max7219.init()); #endif + marlin_state = MF_RUNNING; + SETUP_LOG("setup() completed."); } diff --git a/Marlin/src/MarlinCore.h b/Marlin/src/MarlinCore.h index 141ce7156e3a..3bce72ab80fc 100644 --- a/Marlin/src/MarlinCore.h +++ b/Marlin/src/MarlinCore.h @@ -76,9 +76,19 @@ void minkill(const bool steppers_off=false); void quickstop_stepper(); -extern bool Running; -inline bool IsRunning() { return Running; } -inline bool IsStopped() { return !Running; } +// Global State of the firmware +enum MarlinState : uint8_t { + MF_INITIALIZING = 0, + MF_RUNNING = _BV(0), + MF_PAUSED = _BV(1), + MF_WAITING = _BV(2), + MF_STOPPED = _BV(3), + MF_KILLED = _BV(7) +}; + +extern MarlinState marlin_state; +inline bool IsRunning() { return marlin_state == MF_RUNNING; } +inline bool IsStopped() { return marlin_state != MF_RUNNING; } bool printingIsActive(); bool printingIsPaused(); diff --git a/Marlin/src/core/utility.cpp b/Marlin/src/core/utility.cpp index 19247ff69fc2..5e159af58176 100644 --- a/Marlin/src/core/utility.cpp +++ b/Marlin/src/core/utility.cpp @@ -67,7 +67,6 @@ void safe_delay(millis_t ms) { TERN(PROBE_MANUALLY, "PROBE_MANUALLY", "") TERN(NOZZLE_AS_PROBE, "NOZZLE_AS_PROBE", "") TERN(FIX_MOUNTED_PROBE, "FIX_MOUNTED_PROBE", "") - TERN(BLTOUCH, "BLTOUCH", "") TERN(HAS_Z_SERVO_PROBE, TERN(BLTOUCH, "BLTOUCH", "SERVO PROBE"), "") TERN(TOUCH_MI_PROBE, "TOUCH_MI_PROBE", "") TERN(Z_PROBE_SLED, "Z_PROBE_SLED", "") diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index 2d782e9e33da..de6954598321 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -934,7 +934,12 @@ G29_TYPE GcodeSuite::G29() { // Unapply the offset because it is going to be immediately applied // and cause compensation movement in Z - current_position.z -= bilinear_z_offset(current_position); + #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) + const float fade_scaling_factor = planner.fade_scaling_factor_for_z(current_position.z); + #else + constexpr float fade_scaling_factor = 1.0f; + #endif + current_position.z -= fade_scaling_factor * bilinear_z_offset(current_position); if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR(" corrected Z:", current_position.z); } diff --git a/Marlin/src/gcode/calibrate/G34_M422.cpp b/Marlin/src/gcode/calibrate/G34_M422.cpp index 672f40737a5b..d1b828d079b8 100644 --- a/Marlin/src/gcode/calibrate/G34_M422.cpp +++ b/Marlin/src/gcode/calibrate/G34_M422.cpp @@ -203,7 +203,7 @@ void GcodeSuite::G34() { const uint8_t iprobe = (iteration & 1) ? NUM_Z_STEPPER_DRIVERS - 1 - i : i; // Safe clearance even on an incline - if (iteration == 0 || i > 0) do_blocking_move_to_z(z_probe); + if ((iteration == 0 || i > 0) && z_probe > current_position.z) do_blocking_move_to_z(z_probe); if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR_P(PSTR("Probing X"), z_stepper_align.xy[iprobe].x, SP_Y_STR, z_stepper_align.xy[iprobe].y); diff --git a/Marlin/src/gcode/control/M999.cpp b/Marlin/src/gcode/control/M999.cpp index c498e66cabf0..79cd5e1854e2 100644 --- a/Marlin/src/gcode/control/M999.cpp +++ b/Marlin/src/gcode/control/M999.cpp @@ -23,7 +23,7 @@ #include "../gcode.h" #include "../../lcd/ultralcd.h" // for lcd_reset_alert_level -#include "../../MarlinCore.h" // for Running +#include "../../MarlinCore.h" // for marlin_state #include "../queue.h" // for flush_and_request_resend /** @@ -37,7 +37,7 @@ * */ void GcodeSuite::M999() { - Running = true; + marlin_state = MF_RUNNING; ui.reset_alert_level(); if (parser.boolval('S')) return; diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 97090d477571..ebc77b9383a7 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -35,15 +35,13 @@ #define HAS_LINEAR_E_JERK 1 #endif +// If no real EEPROM, Flash emulation, or SRAM emulation is available fall back to SD emulation #if ENABLED(EEPROM_SETTINGS) #if NONE(FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) && EITHER(I2C_EEPROM, SPI_EEPROM) #define USE_REAL_EEPROM 1 #else #define USE_EMULATED_EEPROM 1 #endif - #if NONE(USE_REAL_EEPROM, FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION) - #define SDCARD_EEPROM_EMULATION 1 - #endif #else #undef I2C_EEPROM #undef SPI_EEPROM diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 454183e54885..574d6a336eae 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -1993,9 +1993,24 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS static_assert(PWM_PIN(E2_AUTO_FAN_PIN), "E2" AF_ERR_SUFF); #elif HAS_AUTO_FAN_3 static_assert(PWM_PIN(E3_AUTO_FAN_PIN), "E3" AF_ERR_SUFF); + #elif HAS_AUTO_FAN_4 + static_assert(PWM_PIN(E4_AUTO_FAN_PIN), "E4" AF_ERR_SUFF); + #elif HAS_AUTO_FAN_5 + static_assert(PWM_PIN(E5_AUTO_FAN_PIN), "E5" AF_ERR_SUFF); + #elif HAS_AUTO_FAN_6 + static_assert(PWM_PIN(E6_AUTO_FAN_PIN), "E6" AF_ERR_SUFF); + #elif HAS_AUTO_FAN_7 + static_assert(PWM_PIN(E7_AUTO_FAN_PIN), "E7" AF_ERR_SUFF); #endif #endif +/** + * Make sure only one EEPROM type is enabled + */ +#if ENABLED(EEPROM_SETTINGS) && 1 < ENABLED(SDCARD_EEPROM_EMULATION) + ENABLED(FLASH_EEPROM_EMULATION) + ENABLED(SRAM_EEPROM_EMULATION) + #error "Please select only one of SDCARD, FLASH, or SRAM_EEPROM_EMULATION." +#endif + /** * Make sure only one display is enabled */ diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 01474bde9621..05e2fe46d925 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2020-03-14" + #define STRING_DISTRIBUTION_DATE "2020-03-16" #endif /** diff --git a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp index 92f935f04b70..be414ab30372 100644 --- a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp +++ b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp @@ -448,10 +448,10 @@ void MarlinUI::draw_status_screen() { #endif } + constexpr bool can_show_days = DISABLED(DOGM_SD_PERCENT) || ENABLED(ROTATE_PROGRESS_DISPLAY); if (ev != lastElapsed) { lastElapsed = ev; - const bool has_days = (elapsed.value >= 60*60*24L); - const uint8_t len = elapsed.toDigital(elapsed_string, has_days); + const uint8_t len = elapsed.toDigital(elapsed_string, can_show_days && elapsed.value >= 60*60*24L); elapsed_x_pos = _SD_INFO_X(len); #if ENABLED(SHOW_REMAINING_TIME) @@ -468,8 +468,7 @@ void MarlinUI::draw_status_screen() { } else { duration_t estimation = timeval; - const bool has_days = (estimation.value >= 60*60*24L); - const uint8_t len = estimation.toDigital(estimation_string, has_days); + const uint8_t len = estimation.toDigital(estimation_string, can_show_days && estimation.value >= 60*60*24L); estimation_x_pos = _SD_INFO_X(len #if !BOTH(DOGM_SD_PERCENT, ROTATE_PROGRESS_DISPLAY) + 1 diff --git a/Marlin/src/lcd/menu/menu_configuration.cpp b/Marlin/src/lcd/menu/menu_configuration.cpp index ae0abbf74668..25b253b26183 100644 --- a/Marlin/src/lcd/menu/menu_configuration.cpp +++ b/Marlin/src/lcd/menu/menu_configuration.cpp @@ -138,12 +138,12 @@ void menu_advanced_settings(); START_MENU(); BACK_ITEM(MSG_CONFIGURATION); #if ENABLED(DUAL_X_CARRIAGE) - EDIT_ITEM_FAST(float51, MSG_HOTEND_OFFSET_X, &hotend_offset[1].x, float(X2_HOME_POS - 25), float(X2_HOME_POS + 25), _recalc_offsets); + EDIT_ITEM_FAST(float52, MSG_HOTEND_OFFSET_X, &hotend_offset[1].x, float(X2_HOME_POS - 25), float(X2_HOME_POS + 25), _recalc_offsets); #else - EDIT_ITEM_FAST(float41sign, MSG_HOTEND_OFFSET_X, &hotend_offset[1].x, -99.0, 99.0, _recalc_offsets); + EDIT_ITEM_FAST(float52, MSG_HOTEND_OFFSET_X, &hotend_offset[1].x, -99.0, 99.0, _recalc_offsets); #endif - EDIT_ITEM_FAST(float41sign, MSG_HOTEND_OFFSET_Y, &hotend_offset[1].y, -99.0, 99.0, _recalc_offsets); - EDIT_ITEM_FAST(float41sign, MSG_HOTEND_OFFSET_Z, &hotend_offset[1].z, Z_PROBE_LOW_POINT, 10.0, _recalc_offsets); + EDIT_ITEM_FAST(float52, MSG_HOTEND_OFFSET_Y, &hotend_offset[1].y, -99.0, 99.0, _recalc_offsets); + EDIT_ITEM_FAST(float52, MSG_HOTEND_OFFSET_Z, &hotend_offset[1].z, Z_PROBE_LOW_POINT, 10.0, _recalc_offsets); #if ENABLED(EEPROM_SETTINGS) ACTION_ITEM(MSG_STORE_EEPROM, lcd_store_settings); #endif diff --git a/Marlin/src/module/configuration_store.cpp b/Marlin/src/module/configuration_store.cpp index eb773250942f..3a83dd7c1d00 100644 --- a/Marlin/src/module/configuration_store.cpp +++ b/Marlin/src/module/configuration_store.cpp @@ -1531,10 +1531,10 @@ void MarlinSettings::postprocess() { _FIELD_TEST(planner_leveling_active); #if ENABLED(AUTO_BED_LEVELING_UBL) const bool &planner_leveling_active = planner.leveling_active; - const uint8_t &ubl_storage_slot = ubl.storage_slot; + const int8_t &ubl_storage_slot = ubl.storage_slot; #else bool planner_leveling_active; - uint8_t ubl_storage_slot; + int8_t ubl_storage_slot; #endif EEPROM_READ(planner_leveling_active); EEPROM_READ(ubl_storage_slot); @@ -2185,8 +2185,10 @@ void MarlinSettings::postprocess() { } #if ENABLED(EEPROM_CHITCHAT) && DISABLED(DISABLE_M503) - if (!validating) report(); + // Report the EEPROM settings + if (!validating && (DISABLED(EEPROM_BOOT_SILENT) || IsRunning())) report(); #endif + EEPROM_FINISH(); return !eeprom_error; diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index 74177490882f..3b2daf1812e9 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -2041,7 +2041,10 @@ bool Planner::_populate_block(block_t * const block, bool split_move, #endif #if ENABLED(SLOWDOWN) - if (WITHIN(moves_queued, 2, (BLOCK_BUFFER_SIZE) / 2 - 1)) { + #ifndef SLOWDOWN_DIVISOR + #define SLOWDOWN_DIVISOR 2 + #endif + if (WITHIN(moves_queued, 2, (BLOCK_BUFFER_SIZE) / (SLOWDOWN_DIVISOR) - 1)) { if (segment_time_us < settings.min_segment_time_us) { // buffer is draining, add extra time. The amount of time added increases if the buffer is still emptied more. const uint32_t nst = segment_time_us + LROUND(2 * (settings.min_segment_time_us - segment_time_us) / moves_queued); diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index d0b1ddf0a337..f16a3af04693 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -765,7 +765,7 @@ int16_t Temperature::getHeaterPower(const heater_ind_t heater_id) { // inline void loud_kill(PGM_P const lcd_msg, const heater_ind_t heater) { - Running = false; + marlin_state = MF_KILLED; #if USE_BEEPER for (uint8_t i = 20; i--;) { WRITE(BEEPER_PIN, HIGH); delay(25); @@ -2003,7 +2003,7 @@ void Temperature::init() { /** SERIAL_ECHO_START(); - SERIAL_ECHOPGM("Thermal Thermal Runaway Running. Heater ID: "); + SERIAL_ECHOPGM("Thermal Runaway Running. Heater ID: "); if (heater_id == H_CHAMBER) SERIAL_ECHOPGM("chamber"); if (heater_id < 0) SERIAL_ECHOPGM("bed"); else SERIAL_ECHO(heater_id); SERIAL_ECHOPAIR(" ; State:", sm.state, " ; Timer:", sm.timer, " ; Temperature:", current, " ; Target Temp:", target); diff --git a/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h b/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h index 1f02f9299e35..ef064694abad 100644 --- a/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h +++ b/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h @@ -31,6 +31,12 @@ #define BOARD_INFO_NAME "AZSMZ MINI" +// +// EEPROM +// +#define FLASH_EEPROM_EMULATION +//#define SDCARD_EEPROM_EMULATION + // // Servos // diff --git a/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h b/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h index 4ff4ebc73bde..a4800dcc73d5 100644 --- a/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h +++ b/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h @@ -38,6 +38,12 @@ #define BOARD_INFO_NAME "BIQU Thunder B300 V1.0" #endif +// +// EEPROM +// +#define FLASH_EEPROM_EMULATION +//#define SDCARD_EEPROM_EMULATION + // // Limit Switches // diff --git a/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h b/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h index 17a9b7d58da8..549b44019a42 100644 --- a/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h +++ b/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h @@ -36,6 +36,12 @@ #define BOARD_INFO_NAME "BIQU BQ111-A4" +// +// EEPROM +// +#define FLASH_EEPROM_EMULATION +//#define SDCARD_EEPROM_EMULATION + // // Limit Switches // diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h index 104f40fdf16c..feadafa5922d 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h @@ -23,6 +23,12 @@ #define BOARD_INFO_NAME "BIGTREE SKR 1.1" +// +// EEPROM +// +#define FLASH_EEPROM_EMULATION +//#define SDCARD_EEPROM_EMULATION + // // Limit Switches // diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h index bd0ad468de0b..3bd2640665f5 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h @@ -23,6 +23,12 @@ #define BOARD_INFO_NAME "BIGTREE SKR 1.3" +// +// EEPROM +// +#define FLASH_EEPROM_EMULATION +//#define SDCARD_EEPROM_EMULATION + /** * Trinamic Stallguard pins */ diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h index 3fb66aa156c7..e9a46ba55140 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -25,6 +25,14 @@ #define BOARD_INFO_NAME "BIGTREE SKR 1.4" #endif +// +// EEPROM +// +#if NONE(FLASH_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) + #define FLASH_EEPROM_EMULATION + //#define SDCARD_EEPROM_EMULATION +#endif + // // SD Connection // @@ -88,11 +96,7 @@ // Z Probe (when not Z_MIN_PIN) // #ifndef Z_MIN_PROBE_PIN - #if Z_STOP_PIN != P1_27 - #define Z_MIN_PROBE_PIN P1_27 - #else - #define Z_MIN_PROBE_PIN P0_10 - #endif + #define Z_MIN_PROBE_PIN P0_10 #endif // diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h index e84d3de2b1e3..2844fb3cdab8 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h @@ -32,6 +32,10 @@ // Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 +#if DISABLED(SDCARD_EEPROM_EMULATION) + #define FLASH_EEPROM_EMULATION +#endif + // // Steppers // diff --git a/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h b/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h index 28445962ac7b..5ebf6ecba16e 100644 --- a/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h +++ b/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h @@ -30,6 +30,12 @@ // Ignore temp readings during develpment. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 +// +// EEPROM +// +#define FLASH_EEPROM_EMULATION +//#define SDCARD_EEPROM_EMULATION + // // Enable 12MHz clock output on P1.27 pin to sync TMC2208 chip clocks // diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h index b3dba6794c9a..6fb38f3e4646 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h @@ -38,6 +38,14 @@ #define BOARD_WEBSITE_URL "github.com/makerbase-mks/MKS-SBASE" #endif +// +// EEPROM +// +#if NONE(FLASH_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) + #define FLASH_EEPROM_EMULATION + //#define SDCARD_EEPROM_EMULATION +#endif + #define LED_PIN P1_18 // Used as a status indicator #define LED2_PIN P1_19 #define LED3_PIN P1_20 diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h index 58f9eb549337..e7471f6ec644 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h @@ -32,6 +32,12 @@ #define BOARD_INFO_NAME "MKS SGen-L" #define BOARD_WEBSITE_URL "github.com/makerbase-mks/MKS-SGEN_L" +// +// EEPROM +// +#define FLASH_EEPROM_EMULATION +//#define SDCARD_EEPROM_EMULATION + // // Servos // diff --git a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h index bf989798fd1d..18c3ee992b51 100644 --- a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h +++ b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h @@ -42,6 +42,12 @@ #define BOARD_INFO_NAME "Re-ARM RAMPS 1.4" +// +// EEPROM +// +#define FLASH_EEPROM_EMULATION +//#define SDCARD_EEPROM_EMULATION + // // Servos // diff --git a/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h b/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h index 1a8e997eb2c7..3c55ac9be3fe 100644 --- a/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h +++ b/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h @@ -32,6 +32,12 @@ #define BOARD_INFO_NAME "Selena Compact" #define BOARD_WEBSITE_URL "github.com/Ales2-k/Selena" +// +// EEPROM +// +#define FLASH_EEPROM_EMULATION +//#define SDCARD_EEPROM_EMULATION + // // Servos // diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h index 5ee0e5856621..1b91e4f50bb1 100644 --- a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h @@ -32,6 +32,12 @@ #define BOARD_INFO_NAME "Azteeg X5 GT" #define BOARD_WEBSITE_URL "tinyurl.com/yx8tdqa3" +// +// EEPROM +// +#define FLASH_EEPROM_EMULATION +//#define SDCARD_EEPROM_EMULATION + // // Servos // @@ -47,7 +53,6 @@ #define Z_MIN_PIN P1_26 #define Z_MAX_PIN P1_29 - // // Steppers // diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h index 2c54bd603527..7559d6ad509a 100644 --- a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h @@ -187,6 +187,14 @@ #endif // HAS_SPI_LCD +// +// EEPROM +// +#if NONE(FLASH_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) + #define FLASH_EEPROM_EMULATION + //#define SDCARD_EEPROM_EMULATION +#endif + // // SD Support // diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h index 4b731ae9d343..1e5d2f3a2c11 100644 --- a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h @@ -31,6 +31,12 @@ #define BOARD_INFO_NAME "Azteeg X5 MINI WIFI" +// +// EEPROM +// +#define FLASH_EEPROM_EMULATION +//#define SDCARD_EEPROM_EMULATION + // // DIGIPOT slave addresses // diff --git a/Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h b/Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h index 937ba56bb729..a8649b6f8ddc 100644 --- a/Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h +++ b/Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h @@ -24,6 +24,12 @@ #define BOARD_INFO_NAME "BIGTREE SKR 1.4 TURBO" #define SKR_HAS_LPC1769 +// +// EEPROM +// +#define FLASH_EEPROM_EMULATION +//#define SDCARD_EEPROM_EMULATION + // // Include SKR 1.4 pins // diff --git a/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h b/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h index 739603e2b644..3556ff83f004 100644 --- a/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h +++ b/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h @@ -31,6 +31,12 @@ #define BOARD_INFO_NAME "Cohesion3D Mini" +// +// EEPROM +// +#define FLASH_EEPROM_EMULATION +//#define SDCARD_EEPROM_EMULATION + // // Servos // diff --git a/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h index 58bf0d6e71c9..2502c765801d 100644 --- a/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h +++ b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h @@ -31,6 +31,12 @@ #define BOARD_INFO_NAME "Cohesion3D ReMix" +// +// EEPROM +// +#define FLASH_EEPROM_EMULATION +//#define SDCARD_EEPROM_EMULATION + // // Servos // diff --git a/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h b/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h index a5a91f6207b9..cac0868d5103 100644 --- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h @@ -31,8 +31,14 @@ #define BOARD_INFO_NAME "MKS SGen" #define BOARD_WEBSITE_URL "github.com/makerbase-mks/MKS-SGEN" -#define MKS_HAS_LPC1769 +// +// EEPROM +// +#define FLASH_EEPROM_EMULATION +//#define SDCARD_EEPROM_EMULATION + +#define MKS_HAS_LPC1769 #include "../lpc1768/pins_MKS_SBASE.h" #undef E1_STEP_PIN diff --git a/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h b/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h index 5bf64e9d02fa..3db8a994036d 100644 --- a/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h +++ b/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h @@ -32,6 +32,12 @@ #define BOARD_INFO_NAME "Smoothieboard" #define BOARD_WEBSITE_URL "smoothieware.org/smoothieboard" +// +// EEPROM +// +#define FLASH_EEPROM_EMULATION +//#define SDCARD_EEPROM_EMULATION + // // Servos // diff --git a/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h b/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h index 8f7d00bb3bdd..9f28c2d94e74 100644 --- a/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h +++ b/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h @@ -32,6 +32,12 @@ #define BOARD_INFO_NAME "TH3D EZBoard" #define BOARD_WEBSITE_URL "th3dstudio.com" +// +// EEPROM +// +#define FLASH_EEPROM_EMULATION +//#define SDCARD_EEPROM_EMULATION + // // Servos //