From 13395db032ae1fa080e87178ed2fa58d194764ba Mon Sep 17 00:00:00 2001 From: InsanityAutomation Date: Fri, 4 Aug 2023 11:13:28 -0400 Subject: [PATCH] First round merge fixes --- Marlin/Configuration.h | 4 ++-- Marlin/Configuration_adv.h | 2 +- Marlin/src/feature/runout.h | 14 +++++++------- Marlin/src/gcode/feature/runout/M591.cpp | 2 +- Marlin/src/lcd/extui/ia_dwin/Creality_DWIN.cpp | 15 ++++++++++++--- Marlin/src/module/endstops.cpp | 2 +- Marlin/src/module/settings.cpp | 10 +++++----- .../share/PlatformIO/scripts/common-cxxflags.py | 2 +- buildroot/share/PlatformIO/scripts/random-bin.py | 2 +- ini/stm32f1-maple.ini | 8 ++++---- ini/stm32f1.ini | 2 +- ini/stm32f4.ini | 4 ++-- 12 files changed, 38 insertions(+), 29 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index fedde53087..ae67ac5836 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -667,8 +667,8 @@ // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. // (Use MINTEMP for thermistor short/failure protection.) -#define HEATER_0_MAXTEMP 315 -#define HEATER_1_MAXTEMP 315 +#define HEATER_0_MAXTEMP 300 +#define HEATER_1_MAXTEMP 300 #define HEATER_2_MAXTEMP 275 #define HEATER_3_MAXTEMP 275 #define HEATER_4_MAXTEMP 275 diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 7de747be5b..ed01895126 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -923,7 +923,7 @@ #define Z_MULTI_ENDSTOPS // Other Z axes have their own endstops #endif #if ENABLED(Z_MULTI_ENDSTOPS) - #define Z2_STOP_PIN _ZMAX_ // Z2 endstop pin override + #define Z2_STOP_PIN Z_MAX_PIN // Z2 endstop pin override #define Z2_ENDSTOP_ADJUSTMENT 0 // Z2 offset relative to Z endstop #endif #ifdef Z3_DRIVER_TYPE diff --git a/Marlin/src/feature/runout.h b/Marlin/src/feature/runout.h index 261831403b..907f0250cd 100644 --- a/Marlin/src/feature/runout.h +++ b/Marlin/src/feature/runout.h @@ -151,7 +151,7 @@ class TFilamentMonitor : public FilamentMonitorBase { #if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG) if (runout_flags) { SERIAL_ECHOPGM("Runout Sensors: "); - LOOP_L_N(i, 8) SERIAL_ECHO('0' + TEST(runout_flags, i)); + for(int i; i < 8; i++) SERIAL_ECHO('0' + TEST(runout_flags, i)); SERIAL_ECHOPGM(" -> ", extruder); if (ran_out) SERIAL_ECHOPGM(" RUN OUT"); SERIAL_EOL(); @@ -210,7 +210,7 @@ class FilamentSensorBase { #undef _INIT_RUNOUT_PIN #undef INIT_RUNOUT_PIN } - + // Return a bitmask of runout pin states static uint8_t poll_runout_pins() { @@ -252,7 +252,7 @@ class FilamentSensorCore : public FilamentSensorBase { #if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG) if (change) { SERIAL_ECHOPGM("Motion detected:"); - LOOP_L_N(e, NUM_RUNOUT_SENSORS) + for(int e; e < NUM_RUNOUT_SENSORS; e++) if (TEST(change, e)) SERIAL_CHAR(' ', '0' + e); SERIAL_EOL(); } @@ -279,7 +279,7 @@ class FilamentSensorCore : public FilamentSensorBase { poll_motion_sensor(); } else if (runout.mode[active_extruder] != RM_NONE) { - LOOP_L_N(s, NUM_RUNOUT_SENSORS) { + for(int s = 0; s < NUM_RUNOUT_SENSORS; s++) { const bool out = poll_runout_state(s); if (!out) filament_present(s); #if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG) @@ -308,7 +308,7 @@ class RunoutResponseDelayed { static float runout_distance_mm[NUM_RUNOUT_SENSORS]; static void reset() { - LOOP_L_N(i, NUM_RUNOUT_SENSORS) filament_present(i); + for(int i = 0; i < NUM_RUNOUT_SENSORS; i++) filament_present(i); } static void run() { @@ -317,7 +317,7 @@ class RunoutResponseDelayed { const millis_t ms = millis(); if (ELAPSED(ms, t)) { t = millis() + 1000UL; - LOOP_L_N(i, NUM_RUNOUT_SENSORS) + for(int i; i < NUM_RUNOUT_SENSORS; i++) SERIAL_ECHOF(i ? F(", ") : F("Remaining mm: "), runout_mm_countdown[i]); SERIAL_EOL(); } @@ -326,7 +326,7 @@ class RunoutResponseDelayed { static uint8_t has_run_out() { uint8_t runout_flags = 0; - LOOP_L_N(i, NUM_RUNOUT_SENSORS) if (runout_mm_countdown[i] < 0) SBI(runout_flags, i); + for(int i = 0; i < NUM_RUNOUT_SENSORS; i++) if (runout_mm_countdown[i] < 0) SBI(runout_flags, i); return runout_flags; } diff --git a/Marlin/src/gcode/feature/runout/M591.cpp b/Marlin/src/gcode/feature/runout/M591.cpp index 2d9892460d..067769cf2c 100644 --- a/Marlin/src/gcode/feature/runout/M591.cpp +++ b/Marlin/src/gcode/feature/runout/M591.cpp @@ -78,7 +78,7 @@ void GcodeSuite::M591() { void GcodeSuite::M591_report(const bool forReplay/*=true*/) { report_heading_etc(forReplay, F(STR_FILAMENT_RUNOUT_SENSOR)); - LOOP_S_L_N(e, 0, NUM_RUNOUT_SENSORS) + for(int e=0; e < NUM_RUNOUT_SENSORS; e++) SERIAL_ECHOLNPGM( " M591" #if MULTI_FILAMENT_SENSOR diff --git a/Marlin/src/lcd/extui/ia_dwin/Creality_DWIN.cpp b/Marlin/src/lcd/extui/ia_dwin/Creality_DWIN.cpp index e1799d1463..d9d8a74081 100644 --- a/Marlin/src/lcd/extui/ia_dwin/Creality_DWIN.cpp +++ b/Marlin/src/lcd/extui/ia_dwin/Creality_DWIN.cpp @@ -1517,7 +1517,7 @@ void RTSSHOW::RTS_HandleData() else RTS_SndData(2, AutoLevelIcon); - if (ExtUI::getMeshValid()) + if (ExtUI::getLevelingIsValid()) { uint8_t abl_probe_index = 0; for(uint8_t outer = 0; outer < GRID_MAX_POINTS_Y; outer++) @@ -2779,7 +2779,7 @@ void onSettingsLoaded(bool success) { //SERIAL_ECHOLNPGM_P(PSTR("==onConfigurationStoreRead==")); #if HAS_MESH - if (ExtUI::getMeshValid()) + if (ExtUI::getLevelingIsValid()) { uint8_t abl_probe_index = 0; for(uint8_t outer = 0; outer < GRID_MAX_POINTS_Y; outer++) @@ -2841,7 +2841,7 @@ void onLevelingStart() { void onLevelingDone() { #if HAS_MESH - if (ExtUI::getMeshValid()) + if (ExtUI::getLevelingIsValid()) { uint8_t abl_probe_index = 0; for(uint8_t outer = 0; outer < GRID_MAX_POINTS_Y; outer++) @@ -2898,6 +2898,15 @@ void onPostprocessSettings() } +void onSetPowerLoss(const bool onoff) +{ + +} +void onPowerLoss() +{ + +} + } // namespace ExtUI diff --git a/Marlin/src/module/endstops.cpp b/Marlin/src/module/endstops.cpp index 15091381a5..93e6851a4a 100644 --- a/Marlin/src/module/endstops.cpp +++ b/Marlin/src/module/endstops.cpp @@ -486,7 +486,7 @@ void __O2 Endstops::report_states() { print_es_state(PROBE_TRIGGERED(), F(STR_Z_PROBE)); #endif #if HAS_FILAMENT_SENSOR - LOOP_S_LE_N(i, 1, NUM_RUNOUT_SENSORS) { + for(int i = 1; i