From dac07d11ba2c1dea31a32ca3630211d6e8c768b6 Mon Sep 17 00:00:00 2001 From: 3d-gussner <3d.gussner@gmail.com> Date: Wed, 24 May 2023 08:35:05 +0200 Subject: [PATCH 1/9] Rename lower case `temp_model` to `thermal_model` --- Firmware/ConfigurationStore.cpp | 8 +- Firmware/Marlin_main.cpp | 16 +- Firmware/temp_model.h | 125 --------- Firmware/temp_model/e3d_v6.h | 19 -- Firmware/temperature.cpp | 258 +++++++++--------- Firmware/temperature.h | 24 +- Firmware/ultralcd.cpp | 24 +- Firmware/ultralcd.h | 2 +- .../variants/1_75mm_MK3-EINSy10a-E3Dv6full.h | 2 +- .../variants/1_75mm_MK3S-EINSy10a-E3Dv6full.h | 2 +- 10 files changed, 168 insertions(+), 312 deletions(-) delete mode 100644 Firmware/temp_model.h delete mode 100644 Firmware/temp_model/e3d_v6.h diff --git a/Firmware/ConfigurationStore.cpp b/Firmware/ConfigurationStore.cpp index b5f2b0ddb..9940baa29 100644 --- a/Firmware/ConfigurationStore.cpp +++ b/Firmware/ConfigurationStore.cpp @@ -104,7 +104,7 @@ void Config_PrintSettings(uint8_t level) "%SArc Settings: P:Max length(mm) S:Min length (mm) N:Corrections R:Min segments F:Segments/sec.\n%S M214 P%.2f S%.2f N%d R%d F%d\n"), echomagic, echomagic, cs.mm_per_arc_segment, cs.min_mm_per_arc_segment, cs.n_arc_correction, cs.min_arc_segments, cs.arc_segments_per_sec); #ifdef TEMP_MODEL - temp_model_report_settings(); + thermal_model_report_settings(); #endif } #endif @@ -183,7 +183,7 @@ void Config_StoreSettings() strcpy_P(cs.version, default_conf.version); eeprom_update_block(reinterpret_cast(&cs), reinterpret_cast(EEPROM_M500_base), sizeof(cs)); #ifdef TEMP_MODEL - temp_model_save_settings(); + thermal_model_save_settings(); #endif SERIAL_ECHO_START; @@ -247,7 +247,7 @@ bool Config_RetrieveSettings() // Call updatePID (similar to when we have processed M301) updatePID(); #ifdef TEMP_MODEL - temp_model_load_settings(); + thermal_model_load_settings(); #endif SERIAL_ECHO_START; @@ -277,7 +277,7 @@ void Config_ResetDefault() updatePID(); #endif//PIDTEMP #ifdef TEMP_MODEL - temp_model_reset_settings(); + thermal_model_reset_settings(); #endif calculate_extruder_multipliers(); diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index e301995bf..6973db6f9 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -1551,7 +1551,7 @@ void setup() if (!calibration_status_get(CALIBRATION_STATUS_LIVE_ADJUST)) lcd_show_fullscreen_message_and_wait_P(_T(MSG_BABYSTEP_Z_NOT_SET)); #ifdef TEMP_MODEL - if (!calibration_status_get(CALIBRATION_STATUS_TEMP_MODEL) && temp_model_enabled()) + if (!calibration_status_get(CALIBRATION_STATUS_TEMP_MODEL) && thermal_model_enabled()) lcd_show_fullscreen_message_and_wait_P(_T(MSG_TM_NOT_CAL)); #endif //TEMP_MODEL } @@ -7386,23 +7386,23 @@ Sigma_Exit: // report values if nothing has been requested if(isnan(R) && isnan(P) && isnan(U) && isnan(V) && isnan(C) && isnan(D) && isnan(T) && isnan(W) && isnan(E) && I < 0 && S < 0 && B < 0 && A < 0 && L < 0) { - temp_model_report_settings(); + thermal_model_report_settings(); break; } // update all parameters if(B >= 0) - temp_model_set_warn_beep(B); + thermal_model_set_warn_beep(B); if(!isnan(P) || !isnan(U) || !isnan(V) || !isnan(C) || !isnan(D) || (L >= 0) || !isnan(T) || !isnan(W) || !isnan(E)) - temp_model_set_params(P, U, V, C, D, L, T, W, E); + thermal_model_set_params(P, U, V, C, D, L, T, W, E); if(I >= 0 && !isnan(R)) - temp_model_set_resistance(I, R); + thermal_model_set_resistance(I, R); // enable the model last, if requested - if(S >= 0) temp_model_set_enabled(S); + if(S >= 0) thermal_model_set_enabled(S); // run autotune - if(A >= 0) temp_model_autotune(A, F > 0); + if(A >= 0) thermal_model_autotune(A, F > 0); } break; #endif @@ -8890,7 +8890,7 @@ Sigma_Exit: */ case 70: { if(code_seen('S')) - temp_model_log_enable(code_value_short()); + thermal_model_log_enable(code_value_short()); break; } #endif diff --git a/Firmware/temp_model.h b/Firmware/temp_model.h deleted file mode 100644 index 0fb4206a3..000000000 --- a/Firmware/temp_model.h +++ /dev/null @@ -1,125 +0,0 @@ -// model-based temperature safety checker declarations -#ifndef TEMP_MGR_INTV -#error "this file is not a public interface, it should be used *only* within temperature.cpp!" -#endif - -#include "planner.h" - -// shortcuts to get model defaults -#define __TEMP_MODEL_DEF(MODEL, VAR) TEMP_MODEL_##MODEL##_##VAR -#define _TEMP_MODEL_DEF(MODEL, VAR) __TEMP_MODEL_DEF(MODEL, VAR) -#define TEMP_MODEL_DEF(VAR) _TEMP_MODEL_DEF(TEMP_MODEL_DEFAULT, VAR) - -constexpr uint8_t TEMP_MODEL_CAL_S = 60; // Maximum recording length during calibration (s) -constexpr uint8_t TEMP_MODEL_CAL_R_STEP = 4; // Fan interpolation steps during calibration -constexpr float TEMP_MODEL_fE = 0.05; // error filter (1st-order IIR factor) - -// transport delay buffer size (samples) -constexpr uint8_t TEMP_MODEL_MAX_LAG_SIZE = 8; // * TEMP_MGR_INTV = 2160 - -// resistance values for all fan levels -constexpr uint8_t TEMP_MODEL_R_SIZE = (1 << FAN_SOFT_PWM_BITS); -static const float TEMP_MODEL_R_DEFAULT[TEMP_MODEL_R_SIZE] PROGMEM = TEMP_MODEL_DEF(Rv); - -namespace temp_model { - -struct model_data -{ - // temporary buffers - float dT_lag_buf[TEMP_MODEL_MAX_LAG_SIZE]; // transport delay buffer - uint8_t dT_lag_size = 0; // transport delay buffer size - uint8_t dT_lag_idx = 0; // transport delay buffer index - float dT_err_prev = 0; // previous temperature delta error - float T_prev = 0; // last temperature extruder - - // configurable parameters - float P; // heater power (W) - float U; // linear temperature coefficient (W/K/W) - float V; // linear temperature intercept (W/W) - float C; // heatblock capacitance (J/K) - float fS; // sim. 1st order IIR filter factor (f=100/27) - uint16_t L; // sim. response lag (ms) - float R[TEMP_MODEL_R_SIZE]; // heatblock resistance for all fan levels (K/W) - float Ta_corr; // ambient temperature correction (K) - - // thresholds - float warn; // warning threshold (K/s) - float err; // error threshold (K/s) - - // status flags - union - { - bool flags; - struct - { - bool uninitialized: 1; // model is not initialized - bool error: 1; // error threshold set - bool warning: 1; // warning threshold set - } flag_bits; - }; - - // pre-computed values (initialized via reset) - float C_i; // heatblock capacitance (precomputed dT/C) - float warn_s; // warning threshold (per sample) - float err_s; // error threshold (per sample) - - // simulation functions - void reset(uint8_t heater_pwm, uint8_t fan_pwm, float heater_temp, float ambient_temp); - void step(uint8_t heater_pwm, uint8_t fan_pwm, float heater_temp, float ambient_temp); -}; - -static bool enabled; // model check enabled -static bool warn_beep = true; // beep on warning threshold -static model_data data; // default heater data - -static bool calibrated(); // return calibration/model validity status -static void check(); // check and trigger errors or warnings based on current state - -// warning state (updated from from isr context) -volatile static struct -{ - float dT_err; // temperature delta error (per sample) - bool warning: 1; // warning condition - bool assert: 1; // warning is still asserted -} warning_state; - -static void handle_warning(); // handle warnings from user context - -#ifdef TEMP_MODEL_DEBUG -static struct -{ - volatile struct - { - uint32_t stamp; - int8_t delta_ms; - uint8_t counter; - uint8_t cur_pwm; - float cur_temp; - float cur_amb; - } entry; - - uint8_t serial; - bool enabled; -} log_buf; - -static void log_usr(); // user log handler -static void log_isr(); // isr log handler -#endif - -} // namespace temp_model - -namespace temp_model_cal { - -// recording scratch buffer -struct rec_entry -{ - float temp; // heater temperature - uint8_t pwm; // heater PWM -}; - -constexpr uint16_t REC_BUFFER_SIZE = TEMP_MODEL_CAL_S / TEMP_MGR_INTV; -static rec_entry* const rec_buffer = (rec_entry*)block_buffer; // oh-hey, free memory! -static_assert(sizeof(rec_entry[REC_BUFFER_SIZE]) <= sizeof(block_buffer), - "recording length too long to fit within available buffer"); - -} // namespace temp_model_cal diff --git a/Firmware/temp_model/e3d_v6.h b/Firmware/temp_model/e3d_v6.h deleted file mode 100644 index ac75894b7..000000000 --- a/Firmware/temp_model/e3d_v6.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -#define TEMP_MODEL_E3D_V6_VER 1 // model parameters version - -#define TEMP_MODEL_E3D_V6_P 38. // heater power (W) -#define TEMP_MODEL_E3D_V6_U 0. // linear temperature coefficient (W/K/power) -#define TEMP_MODEL_E3D_V6_V 1. // linear temperature intercept (W/power) - -#define TEMP_MODEL_E3D_V6_C 12.1 // initial guess for heatblock capacitance (J/K) -#define TEMP_MODEL_E3D_V6_R 20.5 // initial guess for heatblock resistance (K/W) - -#define TEMP_MODEL_E3D_V6_fS 0.065 // sim. 1st order IIR filter factor (f=100/27) -#define TEMP_MODEL_E3D_V6_LAG 2100 // sim. response lag (ms, 0-2160) - -#define TEMP_MODEL_E3D_V6_W 1.2 // Default warning threshold (K/s) -#define TEMP_MODEL_E3D_V6_E 1.74 // Default error threshold (K/s) - -// fall-back resistance vector (R0-15) -#define TEMP_MODEL_E3D_V6_Rv {TEMP_MODEL_E3D_V6_R, 18.4, 16.7, 15.2, 14.1, 13.3, 12.7, 12.1, 11.7, 11.3, 11., 10.8, 10.6, 10.4, 10.2, 10.1} diff --git a/Firmware/temperature.cpp b/Firmware/temperature.cpp index 247d0c16e..4f44749ba 100755 --- a/Firmware/temperature.cpp +++ b/Firmware/temperature.cpp @@ -94,7 +94,7 @@ #ifdef TEMP_MODEL // temperature model interface -#include "temp_model.h" +#include "thermal_model.h" #endif #include "Filament_sensor.h" @@ -556,8 +556,8 @@ void manage_heater() #ifdef TEMP_MODEL // handle model warnings first, so not to override the error handler - if(temp_model::warning_state.warning) - temp_model::handle_warning(); + if(thermal_model::warning_state.warning) + thermal_model::handle_warning(); #endif // handle temperature errors @@ -568,7 +568,7 @@ void manage_heater() checkFans(); #ifdef TEMP_MODEL_DEBUG - temp_model::log_usr(); + thermal_model::log_usr(); #endif } @@ -1962,9 +1962,9 @@ static void temp_mgr_isr() check_temp_raw(); // check min/max temp using raw values check_temp_runaway(); // classic temperature hysteresis check #ifdef TEMP_MODEL - temp_model::check(); // model-based heater check + thermal_model::check(); // model-based heater check #ifdef TEMP_MODEL_DEBUG - temp_model::log_isr(); + thermal_model::log_isr(); #endif #endif @@ -2079,7 +2079,7 @@ static void check_temp_raw() } #ifdef TEMP_MODEL -namespace temp_model { +namespace thermal_model { void model_data::reset(uint8_t heater_pwm _UNUSED, uint8_t fan_pwm _UNUSED, float heater_temp _UNUSED, float ambient_temp _UNUSED) @@ -2165,7 +2165,7 @@ static bool calibrated() if(!(data.L > 0)) return false; if(!(data.Ta_corr != NAN)) return false; for(uint8_t i = 0; i != TEMP_MODEL_R_SIZE; ++i) { - if(!(temp_model::data.R[i] >= 0)) + if(!(thermal_model::data.R[i] >= 0)) return false; } if(!(data.warn != NAN)) return false; @@ -2198,7 +2198,7 @@ static void check() warning_state.assert = data.flag_bits.warning; if(warning_state.assert) { warning_state.warning = true; - warning_state.dT_err = temp_model::data.dT_err_prev; + warning_state.dT_err = thermal_model::data.dT_err_prev; } } @@ -2281,42 +2281,42 @@ static void log_isr() } #endif -} // namespace temp_model +} // namespace thermal_model -static void temp_model_reset_enabled(bool enabled) +static void thermal_model_reset_enabled(bool enabled) { TempMgrGuard temp_mgr_guard; - temp_model::enabled = enabled; - temp_model::reinitialize(); + thermal_model::enabled = enabled; + thermal_model::reinitialize(); } -bool temp_model_enabled() +bool thermal_model_enabled() { - return temp_model::enabled; + return thermal_model::enabled; } -void temp_model_set_enabled(bool enabled) +void thermal_model_set_enabled(bool enabled) { // set the enabled flag { TempMgrGuard temp_mgr_guard; - temp_model::enabled = enabled; - temp_model::setup(); + thermal_model::enabled = enabled; + thermal_model::setup(); } // verify that the model has been enabled - if(enabled && !temp_model::enabled) + if(enabled && !thermal_model::enabled) SERIAL_ECHOLNPGM("TM: invalid parameters, cannot enable"); } -void temp_model_set_warn_beep(bool enabled) +void thermal_model_set_warn_beep(bool enabled) { - temp_model::warn_beep = enabled; + thermal_model::warn_beep = enabled; } // set the model lag rounding to the effective sample resolution, ensuring the reported/stored lag // matches the current model constraints (future-proofing for model changes) -static void temp_model_set_lag(uint16_t ms) +static void thermal_model_set_lag(uint16_t ms) { static const uint16_t intv_ms = (uint16_t)(TEMP_MGR_INTV * 1000); uint16_t samples = ((ms + intv_ms/2) / intv_ms); @@ -2328,75 +2328,75 @@ static void temp_model_set_lag(uint16_t ms) samples = TEMP_MODEL_MAX_LAG_SIZE; // round back to ms - temp_model::data.L = samples * intv_ms; + thermal_model::data.L = samples * intv_ms; } -void temp_model_set_params(float P, float U, float V, float C, float D, int16_t L, float Ta_corr, float warn, float err) +void thermal_model_set_params(float P, float U, float V, float C, float D, int16_t L, float Ta_corr, float warn, float err) { TempMgrGuard temp_mgr_guard; - if(!isnan(P) && P > 0) temp_model::data.P = P; - if(!isnan(U)) temp_model::data.U = U; - if(!isnan(V)) temp_model::data.V = V; - if(!isnan(C) && C > 0) temp_model::data.C = C; - if(!isnan(D)) temp_model::data.fS = D; - if(L >= 0) temp_model_set_lag(L); - if(!isnan(Ta_corr)) temp_model::data.Ta_corr = Ta_corr; - if(!isnan(warn) && warn > 0) temp_model::data.warn = warn; - if(!isnan(err) && err > 0) temp_model::data.err = err; + if(!isnan(P) && P > 0) thermal_model::data.P = P; + if(!isnan(U)) thermal_model::data.U = U; + if(!isnan(V)) thermal_model::data.V = V; + if(!isnan(C) && C > 0) thermal_model::data.C = C; + if(!isnan(D)) thermal_model::data.fS = D; + if(L >= 0) thermal_model_set_lag(L); + if(!isnan(Ta_corr)) thermal_model::data.Ta_corr = Ta_corr; + if(!isnan(warn) && warn > 0) thermal_model::data.warn = warn; + if(!isnan(err) && err > 0) thermal_model::data.err = err; // ensure warn <= err - if (temp_model::data.warn > temp_model::data.err) - temp_model::data.warn = temp_model::data.err; + if (thermal_model::data.warn > thermal_model::data.err) + thermal_model::data.warn = thermal_model::data.err; - temp_model::setup(); + thermal_model::setup(); } -void temp_model_set_resistance(uint8_t index, float R) +void thermal_model_set_resistance(uint8_t index, float R) { if(index >= TEMP_MODEL_R_SIZE || R <= 0) return; TempMgrGuard temp_mgr_guard; - temp_model::data.R[index] = R; - temp_model::setup(); + thermal_model::data.R[index] = R; + thermal_model::setup(); } -void temp_model_report_settings() +void thermal_model_report_settings() { SERIAL_ECHO_START; SERIAL_ECHOLNPGM("Temperature Model settings:"); for(uint8_t i = 0; i != TEMP_MODEL_R_SIZE; ++i) - printf_P(PSTR("%S M310 I%u R%.2f\n"), echomagic, (unsigned)i, (double)temp_model::data.R[i]); + printf_P(PSTR("%S M310 I%u R%.2f\n"), echomagic, (unsigned)i, (double)thermal_model::data.R[i]); printf_P(PSTR("%S M310 P%.2f U%.4f V%.2f C%.2f D%.4f L%u S%u B%u E%.2f W%.2f T%.2f\n"), - echomagic, (double)temp_model::data.P, (double)temp_model::data.U, (double)temp_model::data.V, - (double)temp_model::data.C, (double)temp_model::data.fS, (unsigned)temp_model::data.L, - (unsigned)temp_model::enabled, (unsigned)temp_model::warn_beep, - (double)temp_model::data.err, (double)temp_model::data.warn, - (double)temp_model::data.Ta_corr); + echomagic, (double)thermal_model::data.P, (double)thermal_model::data.U, (double)thermal_model::data.V, + (double)thermal_model::data.C, (double)thermal_model::data.fS, (unsigned)thermal_model::data.L, + (unsigned)thermal_model::enabled, (unsigned)thermal_model::warn_beep, + (double)thermal_model::data.err, (double)thermal_model::data.warn, + (double)thermal_model::data.Ta_corr); } -void temp_model_reset_settings() +void thermal_model_reset_settings() { TempMgrGuard temp_mgr_guard; - temp_model::data.P = TEMP_MODEL_DEF(P); - temp_model::data.U = TEMP_MODEL_DEF(U); - temp_model::data.V = TEMP_MODEL_DEF(V); - temp_model::data.C = TEMP_MODEL_DEF(C); - temp_model::data.fS = TEMP_MODEL_DEF(fS); - temp_model::data.L = (uint16_t)(TEMP_MODEL_DEF(LAG) / (TEMP_MGR_INTV * 1000) + 0.5) * (uint16_t)(TEMP_MGR_INTV * 1000); + thermal_model::data.P = TEMP_MODEL_DEF(P); + thermal_model::data.U = TEMP_MODEL_DEF(U); + thermal_model::data.V = TEMP_MODEL_DEF(V); + thermal_model::data.C = TEMP_MODEL_DEF(C); + thermal_model::data.fS = TEMP_MODEL_DEF(fS); + thermal_model::data.L = (uint16_t)(TEMP_MODEL_DEF(LAG) / (TEMP_MGR_INTV * 1000) + 0.5) * (uint16_t)(TEMP_MGR_INTV * 1000); for(uint8_t i = 0; i != TEMP_MODEL_R_SIZE; ++i) - temp_model::data.R[i] = pgm_read_float(TEMP_MODEL_R_DEFAULT + i); - temp_model::data.Ta_corr = TEMP_MODEL_Ta_corr; - temp_model::data.warn = TEMP_MODEL_DEF(W); - temp_model::data.err = TEMP_MODEL_DEF(E); - temp_model::warn_beep = true; - temp_model::enabled = true; - temp_model::reinitialize(); + thermal_model::data.R[i] = pgm_read_float(TEMP_MODEL_R_DEFAULT + i); + thermal_model::data.Ta_corr = TEMP_MODEL_Ta_corr; + thermal_model::data.warn = TEMP_MODEL_DEF(W); + thermal_model::data.err = TEMP_MODEL_DEF(E); + thermal_model::warn_beep = true; + thermal_model::enabled = true; + thermal_model::reinitialize(); } -void temp_model_load_settings() +void thermal_model_load_settings() { static_assert(TEMP_MODEL_R_SIZE == 16); // ensure we don't desync with the eeprom table TempMgrGuard temp_mgr_guard; @@ -2409,43 +2409,43 @@ void temp_model_load_settings() eeprom_init_default_word((uint16_t*)EEPROM_TEMP_MODEL_L, TEMP_MODEL_DEF(LAG)); eeprom_init_default_byte((uint8_t*)EEPROM_TEMP_MODEL_VER, TEMP_MODEL_DEF(VER)); - temp_model::enabled = eeprom_read_byte((uint8_t*)EEPROM_TEMP_MODEL_ENABLE); - temp_model::data.P = eeprom_read_float((float*)EEPROM_TEMP_MODEL_P); - temp_model::data.U = eeprom_read_float((float*)EEPROM_TEMP_MODEL_U); - temp_model::data.V = eeprom_read_float((float*)EEPROM_TEMP_MODEL_V); - temp_model::data.C = eeprom_read_float((float*)EEPROM_TEMP_MODEL_C); - temp_model::data.fS = eeprom_read_float((float*)EEPROM_TEMP_MODEL_D); - temp_model_set_lag(eeprom_read_word((uint16_t*)EEPROM_TEMP_MODEL_L)); + thermal_model::enabled = eeprom_read_byte((uint8_t*)EEPROM_TEMP_MODEL_ENABLE); + thermal_model::data.P = eeprom_read_float((float*)EEPROM_TEMP_MODEL_P); + thermal_model::data.U = eeprom_read_float((float*)EEPROM_TEMP_MODEL_U); + thermal_model::data.V = eeprom_read_float((float*)EEPROM_TEMP_MODEL_V); + thermal_model::data.C = eeprom_read_float((float*)EEPROM_TEMP_MODEL_C); + thermal_model::data.fS = eeprom_read_float((float*)EEPROM_TEMP_MODEL_D); + thermal_model_set_lag(eeprom_read_word((uint16_t*)EEPROM_TEMP_MODEL_L)); for(uint8_t i = 0; i != TEMP_MODEL_R_SIZE; ++i) - temp_model::data.R[i] = eeprom_read_float((float*)EEPROM_TEMP_MODEL_R + i); - temp_model::data.Ta_corr = eeprom_read_float((float*)EEPROM_TEMP_MODEL_Ta_corr); - temp_model::data.warn = eeprom_read_float((float*)EEPROM_TEMP_MODEL_W); - temp_model::data.err = eeprom_read_float((float*)EEPROM_TEMP_MODEL_E); + thermal_model::data.R[i] = eeprom_read_float((float*)EEPROM_TEMP_MODEL_R + i); + thermal_model::data.Ta_corr = eeprom_read_float((float*)EEPROM_TEMP_MODEL_Ta_corr); + thermal_model::data.warn = eeprom_read_float((float*)EEPROM_TEMP_MODEL_W); + thermal_model::data.err = eeprom_read_float((float*)EEPROM_TEMP_MODEL_E); - if(!temp_model::calibrated()) { + if(!thermal_model::calibrated()) { SERIAL_ECHOLNPGM("TM: stored calibration invalid, resetting"); - temp_model_reset_settings(); + thermal_model_reset_settings(); } - temp_model::setup(); + thermal_model::setup(); } -void temp_model_save_settings() +void thermal_model_save_settings() { - eeprom_update_byte((uint8_t*)EEPROM_TEMP_MODEL_ENABLE, temp_model::enabled); - eeprom_update_float((float*)EEPROM_TEMP_MODEL_P, temp_model::data.P); - eeprom_update_float((float*)EEPROM_TEMP_MODEL_U, temp_model::data.U); - eeprom_update_float((float*)EEPROM_TEMP_MODEL_V, temp_model::data.V); - eeprom_update_float((float*)EEPROM_TEMP_MODEL_C, temp_model::data.C); - eeprom_update_float((float*)EEPROM_TEMP_MODEL_D, temp_model::data.fS); - eeprom_update_word((uint16_t*)EEPROM_TEMP_MODEL_L, temp_model::data.L); + eeprom_update_byte((uint8_t*)EEPROM_TEMP_MODEL_ENABLE, thermal_model::enabled); + eeprom_update_float((float*)EEPROM_TEMP_MODEL_P, thermal_model::data.P); + eeprom_update_float((float*)EEPROM_TEMP_MODEL_U, thermal_model::data.U); + eeprom_update_float((float*)EEPROM_TEMP_MODEL_V, thermal_model::data.V); + eeprom_update_float((float*)EEPROM_TEMP_MODEL_C, thermal_model::data.C); + eeprom_update_float((float*)EEPROM_TEMP_MODEL_D, thermal_model::data.fS); + eeprom_update_word((uint16_t*)EEPROM_TEMP_MODEL_L, thermal_model::data.L); for(uint8_t i = 0; i != TEMP_MODEL_R_SIZE; ++i) - eeprom_update_float((float*)EEPROM_TEMP_MODEL_R + i, temp_model::data.R[i]); - eeprom_update_float((float*)EEPROM_TEMP_MODEL_Ta_corr, temp_model::data.Ta_corr); - eeprom_update_float((float*)EEPROM_TEMP_MODEL_W, temp_model::data.warn); - eeprom_update_float((float*)EEPROM_TEMP_MODEL_E, temp_model::data.err); + eeprom_update_float((float*)EEPROM_TEMP_MODEL_R + i, thermal_model::data.R[i]); + eeprom_update_float((float*)EEPROM_TEMP_MODEL_Ta_corr, thermal_model::data.Ta_corr); + eeprom_update_float((float*)EEPROM_TEMP_MODEL_W, thermal_model::data.warn); + eeprom_update_float((float*)EEPROM_TEMP_MODEL_E, thermal_model::data.err); } -namespace temp_model_cal { +namespace thermal_model_cal { // set current fan speed for both front/backend static __attribute__((noinline)) void set_fan_speed(uint8_t fan_speed) @@ -2491,7 +2491,7 @@ static void cooldown(float temp) set_fan_speed(255); while(current_temperature[0] >= temp) { if(temp_error_state.v) break; - float ambient = current_temperature_ambient + temp_model::data.Ta_corr; + float ambient = current_temperature_ambient + thermal_model::data.Ta_corr; if(current_temperature[0] < (ambient + TEMP_HYSTERESIS)) { // do not get stuck waiting very close to ambient temperature break; @@ -2539,12 +2539,12 @@ static uint16_t record(uint16_t samples = REC_BUFFER_SIZE) { static float cost_fn(uint16_t samples, float* const var, float v, uint8_t fan_pwm, float ambient) { *var = v; - temp_model::data.reset(rec_buffer[0].pwm, fan_pwm, rec_buffer[0].temp, ambient); + thermal_model::data.reset(rec_buffer[0].pwm, fan_pwm, rec_buffer[0].temp, ambient); float err = 0; uint16_t cnt = 0; for(uint16_t i = 1; i < samples; ++i) { - temp_model::data.step(rec_buffer[i].pwm, fan_pwm, rec_buffer[i].temp, ambient); - float err_v = temp_model::data.dT_err_prev; + thermal_model::data.step(rec_buffer[i].pwm, fan_pwm, rec_buffer[i].temp, ambient); + float err_v = thermal_model::data.dT_err_prev; if(!isnan(err_v)) { err += err_v * err_v; ++cnt; @@ -2569,8 +2569,8 @@ static float estimate(uint16_t samples, { // during estimation we alter the model values without an extra copy to conserve memory // so we cannot keep the main checker active until a value has been found - bool was_enabled = temp_model::enabled; - temp_model_reset_enabled(false); + bool was_enabled = thermal_model::enabled; + thermal_model_reset_enabled(false); float orig = *var; float e = NAN; @@ -2595,14 +2595,14 @@ static float estimate(uint16_t samples, } *var = x; - temp_model_reset_enabled(was_enabled); + thermal_model_reset_enabled(was_enabled); return e; } } SERIAL_ECHOLNPGM("TM estimation did not converge"); *var = orig; - temp_model_reset_enabled(was_enabled); + thermal_model_reset_enabled(was_enabled); return NAN; } @@ -2633,10 +2633,10 @@ static bool autotune(int16_t cal_temp) return true; // we need a high R value for the initial C guess - if(isnan(temp_model::data.R[0])) - temp_model::data.R[0] = TEMP_MODEL_CAL_R_high; + if(isnan(thermal_model::data.R[0])) + thermal_model::data.R[0] = TEMP_MODEL_CAL_R_high; - e = estimate(samples, &temp_model::data.C, + e = estimate(samples, &thermal_model::data.C, TEMP_MODEL_CAL_C_low, TEMP_MODEL_CAL_C_high, TEMP_MODEL_CAL_C_thr, TEMP_MODEL_CAL_C_itr, 0, current_temperature_ambient); @@ -2653,7 +2653,7 @@ static bool autotune(int16_t cal_temp) if(temp_error_state.v || !samples) return true; - e = estimate(samples, &temp_model::data.R[0], + e = estimate(samples, &thermal_model::data.R[0], TEMP_MODEL_CAL_R_low, TEMP_MODEL_CAL_R_high, TEMP_MODEL_CAL_R_thr, TEMP_MODEL_CAL_R_itr, 0, current_temperature_ambient); @@ -2671,7 +2671,7 @@ static bool autotune(int16_t cal_temp) for(int8_t i = TEMP_MODEL_R_SIZE - 1; i > 0; i -= TEMP_MODEL_CAL_R_STEP) { // always disable the checker while estimating fan resistance as the difference // (esp with 3rd-party blowers) can be massive - temp_model::data.R[i] = NAN; + thermal_model::data.R[i] = NAN; uint8_t speed = 256 / TEMP_MODEL_R_SIZE * (i + 1) - 1; set_fan_speed(speed); @@ -2685,8 +2685,8 @@ static bool autotune(int16_t cal_temp) // a fixed fan pwm (the norminal value) is used here, as soft_pwm_fan will be modified // during fan measurements and we'd like to include that skew during normal operation. - e = estimate(samples, &temp_model::data.R[i], - TEMP_MODEL_CAL_R_low, temp_model::data.R[0], TEMP_MODEL_CAL_R_thr, TEMP_MODEL_CAL_R_itr, + e = estimate(samples, &thermal_model::data.R[i], + TEMP_MODEL_CAL_R_low, thermal_model::data.R[0], TEMP_MODEL_CAL_R_thr, TEMP_MODEL_CAL_R_itr, i, current_temperature_ambient); if(isnan(e)) return true; @@ -2703,25 +2703,25 @@ static bool autotune(int16_t cal_temp) int8_t prev = next - TEMP_MODEL_CAL_R_STEP; if(prev < 0) prev = 0; float f = (float)(i - prev) / TEMP_MODEL_CAL_R_STEP; - float d = (temp_model::data.R[next] - temp_model::data.R[prev]); - temp_model::data.R[i] = temp_model::data.R[prev] + d * f; + float d = (thermal_model::data.R[next] - thermal_model::data.R[prev]); + thermal_model::data.R[i] = thermal_model::data.R[prev] + d * f; } return false; } -} // namespace temp_model_cal +} // namespace thermal_model_cal -static bool temp_model_autotune_err = true; +static bool thermal_model_autotune_err = true; -void temp_model_autotune(int16_t temp, bool selftest) +void thermal_model_autotune(int16_t temp, bool selftest) { float orig_C, orig_R[TEMP_MODEL_R_SIZE]; bool orig_enabled; - static_assert(sizeof(orig_R) == sizeof(temp_model::data.R)); + static_assert(sizeof(orig_R) == sizeof(thermal_model::data.R)); // fail-safe error state - temp_model_autotune_err = true; + thermal_model_autotune_err = true; char tm_message[LCD_WIDTH+1]; if(moves_planned() || printer_active()) { @@ -2736,56 +2736,56 @@ void temp_model_autotune(int16_t temp, bool selftest) lcd_return_to_status(); // save the original model data and set the model checking state during self-calibration - orig_C = temp_model::data.C; - memcpy(orig_R, temp_model::data.R, sizeof(temp_model::data.R)); - orig_enabled = temp_model::enabled; - temp_model_reset_enabled(selftest); + orig_C = thermal_model::data.C; + memcpy(orig_R, thermal_model::data.R, sizeof(thermal_model::data.R)); + orig_enabled = thermal_model::enabled; + thermal_model_reset_enabled(selftest); // autotune SERIAL_ECHOLNPGM("TM: calibration start"); - temp_model_autotune_err = temp_model_cal::autotune(temp > 0 ? temp : TEMP_MODEL_CAL_T_high); + thermal_model_autotune_err = thermal_model_cal::autotune(temp > 0 ? temp : TEMP_MODEL_CAL_T_high); // always reset temperature disable_heater(); - if(temp_model_autotune_err) { + if(thermal_model_autotune_err) { sprintf_P(tm_message, PSTR("TM: calibr. failed!")); lcd_setstatus_serial(tm_message); if(temp_error_state.v) - temp_model_cal::set_fan_speed(255); + thermal_model_cal::set_fan_speed(255); // show calibrated values before overwriting them - temp_model_report_settings(); + thermal_model_report_settings(); // restore original state - temp_model::data.C = orig_C; - memcpy(temp_model::data.R, orig_R, sizeof(temp_model::data.R)); - temp_model_set_enabled(orig_enabled); + thermal_model::data.C = orig_C; + memcpy(thermal_model::data.R, orig_R, sizeof(thermal_model::data.R)); + thermal_model_set_enabled(orig_enabled); } else { calibration_status_set(CALIBRATION_STATUS_TEMP_MODEL); lcd_setstatuspgm(MSG_WELCOME); - temp_model_cal::set_fan_speed(0); - temp_model_set_enabled(orig_enabled); - temp_model_report_settings(); + thermal_model_cal::set_fan_speed(0); + thermal_model_set_enabled(orig_enabled); + thermal_model_report_settings(); } lcd_consume_click(); menu_unset_block(MENU_BLOCK_TEMP_MODEL_AUTOTUNE); } -bool temp_model_autotune_result() +bool thermal_model_autotune_result() { - return !temp_model_autotune_err; + return !thermal_model_autotune_err; } #ifdef TEMP_MODEL_DEBUG -void temp_model_log_enable(bool enable) +void thermal_model_log_enable(bool enable) { if(enable) { TempMgrGuard temp_mgr_guard; - temp_model::log_buf.entry.stamp = _millis(); + thermal_model::log_buf.entry.stamp = _millis(); } - temp_model::log_buf.enabled = enable; + thermal_model::log_buf.enabled = enable; } #endif #endif diff --git a/Firmware/temperature.h b/Firmware/temperature.h index 1e0a5c148..07a05bba9 100755 --- a/Firmware/temperature.h +++ b/Firmware/temperature.h @@ -175,23 +175,23 @@ FORCE_INLINE void autotempShutdown(){ void PID_autotune(float temp, int extruder, int ncycles); #ifdef TEMP_MODEL -bool temp_model_enabled(); // return temperature model state -void temp_model_set_enabled(bool enabled); -void temp_model_set_warn_beep(bool enabled); -void temp_model_set_params(float P=NAN, float U=NAN, float V=NAN, float C=NAN, float D=NAN, +bool thermal_model_enabled(); // return temperature model state +void thermal_model_set_enabled(bool enabled); +void thermal_model_set_warn_beep(bool enabled); +void thermal_model_set_params(float P=NAN, float U=NAN, float V=NAN, float C=NAN, float D=NAN, int16_t L=-1, float Ta_corr=NAN, float warn=NAN, float err=NAN); -void temp_model_set_resistance(uint8_t index, float R); +void thermal_model_set_resistance(uint8_t index, float R); -void temp_model_report_settings(); -void temp_model_reset_settings(); -void temp_model_load_settings(); -void temp_model_save_settings(); +void thermal_model_report_settings(); +void thermal_model_reset_settings(); +void thermal_model_load_settings(); +void thermal_model_save_settings(); -void temp_model_autotune(int16_t temp = 0, bool selftest = false); -bool temp_model_autotune_result(); // return true if the last autotune was complete and successful +void thermal_model_autotune(int16_t temp = 0, bool selftest = false); +bool thermal_model_autotune_result(); // return true if the last autotune was complete and successful #ifdef TEMP_MODEL_DEBUG -void temp_model_log_enable(bool enable); +void thermal_model_log_enable(bool enable); #endif #endif diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 720cd9714..366cc3654 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -908,13 +908,13 @@ void lcd_commands() break; case 3: - temp_model_set_warn_beep(false); + thermal_model_set_warn_beep(false); enquecommand_P(PSTR("M310 A F1")); lcd_commands_step = 2; break; case 2: - if (temp_model_autotune_result()) + if (thermal_model_autotune_result()) enquecommand_P(MSG_M500); lcd_commands_step = 1; break; @@ -922,8 +922,8 @@ void lcd_commands() case 1: lcd_commands_step = 0; lcd_commands_type = LcdCommands::Idle; - temp_model_set_warn_beep(true); - bool res = temp_model_autotune_result(); + thermal_model_set_warn_beep(true); + bool res = thermal_model_autotune_result(); if (eeprom_read_byte((uint8_t*)EEPROM_WIZARD_ACTIVE)) { // resume the wizard lcd_wizard(res ? WizState::Restore : WizState::Failed); @@ -954,8 +954,8 @@ void lcd_commands() enquecommand_P(PSTR("G1 X125 Z200 F1000")); enquecommand_P(PSTR("M109 S280")); #ifdef TEMP_MODEL - was_enabled = temp_model_enabled(); - temp_model_set_enabled(false); + was_enabled = thermal_model_enabled(); + thermal_model_set_enabled(false); #endif //TEMP_MODEL lcd_commands_step = 2; break; @@ -970,7 +970,7 @@ void lcd_commands() if (lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_NOZZLE_CNG_CHANGED), false) == LCD_LEFT_BUTTON_CHOICE) { setTargetHotend(0); #ifdef TEMP_MODEL - temp_model_set_enabled(was_enabled); + thermal_model_set_enabled(was_enabled); #endif //TEMP_MODEL lcd_commands_step = 1; } @@ -4552,7 +4552,7 @@ static void lcd_calibration_menu() #endif } #ifdef TEMP_MODEL - MENU_ITEM_SUBMENU_P(_n("Thermal Model cal."), lcd_temp_model_cal); + MENU_ITEM_SUBMENU_P(_n("Thermal Model cal."), lcd_thermal_model_cal); #endif //TEMP_MODEL MENU_END(); @@ -5592,7 +5592,7 @@ void lcd_print_stop() } #ifdef TEMP_MODEL -void lcd_temp_model_cal() +void lcd_thermal_model_cal() { lcd_commands_type = LcdCommands::TempModel; lcd_return_to_status(); @@ -6448,8 +6448,8 @@ static bool lcd_selfcheck_check_heater(bool _isbed) target_temperature[0] = (_isbed) ? 0 : 200; target_temperature_bed = (_isbed) ? 100 : 0; #ifdef TEMP_MODEL - bool tm_was_enabled = temp_model_enabled(); - temp_model_set_enabled(false); + bool tm_was_enabled = thermal_model_enabled(); + thermal_model_set_enabled(false); #endif //TEMP_MODEL manage_heater(); manage_inactivity(true); @@ -6500,7 +6500,7 @@ static bool lcd_selfcheck_check_heater(bool _isbed) } #ifdef TEMP_MODEL - temp_model_set_enabled(tm_was_enabled); + thermal_model_set_enabled(tm_was_enabled); #endif //TEMP_MODEL manage_heater(); manage_inactivity(true); diff --git a/Firmware/ultralcd.h b/Firmware/ultralcd.h index 541215853..ea1681837 100755 --- a/Firmware/ultralcd.h +++ b/Firmware/ultralcd.h @@ -51,7 +51,7 @@ void lcd_resume_print(); void lcd_print_stop(); // interactive print stop void print_stop(bool interactive=false); #ifdef TEMP_MODEL -void lcd_temp_model_cal(); +void lcd_thermal_model_cal(); #endif //TEMP_MODEL void lcd_load_filament_color_check(); diff --git a/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h b/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h index 31ad71d38..fe2f82432 100644 --- a/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h @@ -402,7 +402,7 @@ #define TEMP_MODEL_Ta_corr -7 // Default ambient temperature correction -#include "temp_model/e3d_v6.h" +#include "thermal_model/e3d_v6.h" #define TEMP_MODEL_DEFAULT E3D_V6 // Default model parameters diff --git a/Firmware/variants/1_75mm_MK3S-EINSy10a-E3Dv6full.h b/Firmware/variants/1_75mm_MK3S-EINSy10a-E3Dv6full.h index a7399c03a..50fa2be55 100644 --- a/Firmware/variants/1_75mm_MK3S-EINSy10a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK3S-EINSy10a-E3Dv6full.h @@ -406,7 +406,7 @@ #define TEMP_MODEL_Ta_corr -7 // Default ambient temperature correction -#include "temp_model/e3d_v6.h" +#include "thermal_model/e3d_v6.h" #define TEMP_MODEL_DEFAULT E3D_V6 // Default model parameters From 44ae8033eb520f90c08d1448048704352029fbf4 Mon Sep 17 00:00:00 2001 From: 3d-gussner <3d.gussner@gmail.com> Date: Wed, 24 May 2023 08:36:42 +0200 Subject: [PATCH 2/9] Rename upper case `TEMP_MODEL` to `THERMAL_MODEL` --- Firmware/ConfigurationStore.cpp | 8 +- Firmware/Marlin_main.cpp | 10 +- Firmware/eeprom.h | 52 +++--- Firmware/menu.h | 4 +- Firmware/messages.cpp | 2 +- Firmware/messages.h | 2 +- Firmware/temperature.cpp | 158 +++++++++--------- Firmware/temperature.h | 4 +- Firmware/ultralcd.cpp | 44 ++--- Firmware/ultralcd.h | 12 +- Firmware/util.h | 8 +- .../variants/1_75mm_MK3-EINSy10a-E3Dv6full.h | 28 ++-- .../variants/1_75mm_MK3S-EINSy10a-E3Dv6full.h | 28 ++-- 13 files changed, 180 insertions(+), 180 deletions(-) diff --git a/Firmware/ConfigurationStore.cpp b/Firmware/ConfigurationStore.cpp index 9940baa29..aaa2089b2 100644 --- a/Firmware/ConfigurationStore.cpp +++ b/Firmware/ConfigurationStore.cpp @@ -103,7 +103,7 @@ void Config_PrintSettings(uint8_t level) printf_P(PSTR( "%SArc Settings: P:Max length(mm) S:Min length (mm) N:Corrections R:Min segments F:Segments/sec.\n%S M214 P%.2f S%.2f N%d R%d F%d\n"), echomagic, echomagic, cs.mm_per_arc_segment, cs.min_mm_per_arc_segment, cs.n_arc_correction, cs.min_arc_segments, cs.arc_segments_per_sec); -#ifdef TEMP_MODEL +#ifdef THERMAL_MODEL thermal_model_report_settings(); #endif } @@ -182,7 +182,7 @@ void Config_StoreSettings() { strcpy_P(cs.version, default_conf.version); eeprom_update_block(reinterpret_cast(&cs), reinterpret_cast(EEPROM_M500_base), sizeof(cs)); -#ifdef TEMP_MODEL +#ifdef THERMAL_MODEL thermal_model_save_settings(); #endif @@ -246,7 +246,7 @@ bool Config_RetrieveSettings() // Call updatePID (similar to when we have processed M301) updatePID(); -#ifdef TEMP_MODEL +#ifdef THERMAL_MODEL thermal_model_load_settings(); #endif @@ -276,7 +276,7 @@ void Config_ResetDefault() #ifdef PIDTEMP updatePID(); #endif//PIDTEMP -#ifdef TEMP_MODEL +#ifdef THERMAL_MODEL thermal_model_reset_settings(); #endif diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 6973db6f9..ffb2d75d4 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -1550,10 +1550,10 @@ void setup() // warn about other important steps individually if (!calibration_status_get(CALIBRATION_STATUS_LIVE_ADJUST)) lcd_show_fullscreen_message_and_wait_P(_T(MSG_BABYSTEP_Z_NOT_SET)); -#ifdef TEMP_MODEL - if (!calibration_status_get(CALIBRATION_STATUS_TEMP_MODEL) && thermal_model_enabled()) +#ifdef THERMAL_MODEL + if (!calibration_status_get(CALIBRATION_STATUS_THERMAL_MODEL) && thermal_model_enabled()) lcd_show_fullscreen_message_and_wait_P(_T(MSG_TM_NOT_CAL)); -#endif //TEMP_MODEL +#endif //THERMAL_MODEL } } @@ -7330,7 +7330,7 @@ Sigma_Exit: } break; -#ifdef TEMP_MODEL +#ifdef THERMAL_MODEL /*! ### M310 - Temperature model settings M310: Temperature model settings #### Usage @@ -8878,7 +8878,7 @@ Sigma_Exit: }; #endif -#ifdef TEMP_MODEL_DEBUG +#ifdef THERMAL_MODEL_DEBUG /*! ## D70 - Enable low-level temperature model logging for offline simulation #### Usage diff --git a/Firmware/eeprom.h b/Firmware/eeprom.h index aefc50628..d6358773c 100644 --- a/Firmware/eeprom.h +++ b/Firmware/eeprom.h @@ -336,14 +336,14 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP | ^ | ^ | ^ | 03h 3 | ^ | bad_isr | ^ | ^ | ^ | ^ | ^ | 04h 4 | ^ | bad_pullup_temp_isr | ^ | ^ | ^ | ^ | ^ | 05h 5 | ^ | bad_pullup_step_isr | ^ | ^ -| 0x0D02 3330 | uint8 | EEPROM_TEMP_MODEL_ENABLE | 00h 0 | ff/00 | Temp model deactivated | Temp model | D3 Ax0d02 C1 +| 0x0D02 3330 | uint8 | EEPROM_THERMAL_MODEL_ENABLE | 00h 0 | ff/00 | Temp model deactivated | Temp model | D3 Ax0d02 C1 | ^ | ^ | ^ | 01h 1 | ^ | Temp model activated | ^ | ^ -| 0x0CFE 3326 | float | EEPROM_TEMP_MODEL_P | ??? | ff ff ff ffh | Temp model power (W) | Temp model | D3 Ax0cfe C4 -| 0x0CFA 3322 | float | EEPROM_TEMP_MODEL_C | ??? | ff ff ff ffh | Temp model capacitance (J/K) | Temp model | D3 Ax0cfa C4 -| 0x0CBA 3258 |float[16]| EEPROM_TEMP_MODEL_R | ??? | ff ff ff ffh | Temp model resistance (K/W) | Temp model | D3 Ax0cba C64 -| 0x0CB6 3254 | float | EEPROM_TEMP_MODEL_Ta_corr | ??? | ff ff ff ffh | Temp model ambient temperature correction (K) | Temp model | D3 Ax0cb6 C4 -| 0x0CB2 3250 | float | EEPROM_TEMP_MODEL_W | ??? | ff ff ff ffh | Temp model warning threshold (K/s) | Temp model | D3 Ax0cb2 C4 -| 0x0CAE 3246 | float | EEPROM_TEMP_MODEL_E | ??? | ff ff ff ffh | Temp model error threshold (K/s) | Temp model | D3 Ax0cae C4 +| 0x0CFE 3326 | float | EEPROM_THERMAL_MODEL_P | ??? | ff ff ff ffh | Temp model power (W) | Temp model | D3 Ax0cfe C4 +| 0x0CFA 3322 | float | EEPROM_THERMAL_MODEL_C | ??? | ff ff ff ffh | Temp model capacitance (J/K) | Temp model | D3 Ax0cfa C4 +| 0x0CBA 3258 |float[16]| EEPROM_THERMAL_MODEL_R | ??? | ff ff ff ffh | Temp model resistance (K/W) | Temp model | D3 Ax0cba C64 +| 0x0CB6 3254 | float | EEPROM_THERMAL_MODEL_Ta_corr | ??? | ff ff ff ffh | Temp model ambient temperature correction (K) | Temp model | D3 Ax0cb6 C4 +| 0x0CB2 3250 | float | EEPROM_THERMAL_MODEL_W | ??? | ff ff ff ffh | Temp model warning threshold (K/s) | Temp model | D3 Ax0cb2 C4 +| 0x0CAE 3246 | float | EEPROM_THERMAL_MODEL_E | ??? | ff ff ff ffh | Temp model error threshold (K/s) | Temp model | D3 Ax0cae C4 | 0x0CAD 3245 | uint8 | EEPROM_FSENSOR_JAM_DETECTION | 01h 1 | ff/01 | fsensor pat9125 jam detection feature | LCD menu | D3 Ax0cad C1 | 0x0CAC 3244 | uint8 | EEPROM_MMU_ENABLED | 00h 0 | ff/00 | MMU enabled | LCD menu | D3 Ax0cac C1 | 0x0CA8 3240 | uint32 | EEPROM_MMU_MATERIAL_CHANGES | ??? | ff ff ff ffh | MMU toolchange counter over printers lifetime | LCD statistic| D3 Ax0ca8 C4 @@ -359,11 +359,11 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP | ^ | ^ | ^ | 20h 32 | ^ | Free bit | ^ | ^ | ^ | ^ | ^ | 40h 64 | ^ | Free bit | ^ | ^ | ^ | ^ | ^ | 80h 128 | ^ | Unknown | ^ | ^ -| 0x0CA2 3234 | float | EEPROM_TEMP_MODEL_U | ??? | ff ff ff ffh | Temp model linear temperature coefficient (W/K/W) | Temp model | D3 Ax0ca2 C4 -| 0x0C9E 3230 | float | EEPROM_TEMP_MODEL_V | ??? | ff ff ff ffh | Temp model linear temperature intercept (W/W) | Temp model | D3 Ax0c9e C4 -| 0x0C9A 3226 | float | EEPROM_TEMP_MODEL_D | ??? | ff ff ff ffh | Temp model sim. 1st order IIR filter factor | Temp model | D3 Ax0c9a C4 -| 0x0C98 3224 | uint16 | EEPROM_TEMP_MODEL_L | 0-2160 | ff ffh | Temp model sim. response lag (ms) | Temp model | D3 Ax0c98 C2 -| 0x0C97 3223 | uint8 | EEPROM_TEMP_MODEL_VER | 0-255 | ffh | Temp model Version | Temp model | D3 Ax0c97 C1 +| 0x0CA2 3234 | float | EEPROM_THERMAL_MODEL_U | ??? | ff ff ff ffh | Temp model linear temperature coefficient (W/K/W) | Temp model | D3 Ax0ca2 C4 +| 0x0C9E 3230 | float | EEPROM_THERMAL_MODEL_V | ??? | ff ff ff ffh | Temp model linear temperature intercept (W/W) | Temp model | D3 Ax0c9e C4 +| 0x0C9A 3226 | float | EEPROM_THERMAL_MODEL_D | ??? | ff ff ff ffh | Temp model sim. 1st order IIR filter factor | Temp model | D3 Ax0c9a C4 +| 0x0C98 3224 | uint16 | EEPROM_THERMAL_MODEL_L | 0-2160 | ff ffh | Temp model sim. response lag (ms) | Temp model | D3 Ax0c98 C2 +| 0x0C97 3223 | uint8 | EEPROM_THERMAL_MODEL_VER | 0-255 | ffh | Temp model Version | Temp model | D3 Ax0c97 C1 | 0x0C95 3221 | PGM_P | EEPROM_KILL_MESSAGE | 0-65535 | ff ffh | Kill message PGM pointer | kill() | D3 Ax0c95 C2 | 0x0C94 3220 | uint8 | EEPROM_KILL_PENDING_FLAG | 42h, ffh | ffh | Kill pending flag (0x42 magic value) | kill() | D3 Ax0c94 C1 @@ -581,27 +581,27 @@ static Sheets * const EEPROM_Sheets_base = (Sheets*)(EEPROM_SHEETS_BASE); #define EEPROM_ECOOL_ENABLE (EEPROM_JOB_ID-1) // uint8_t #define EEPROM_FW_CRASH_FLAG (EEPROM_ECOOL_ENABLE-1) // uint8_t -#define EEPROM_TEMP_MODEL_ENABLE (EEPROM_FW_CRASH_FLAG-1) // uint8_t -#define EEPROM_TEMP_MODEL_P (EEPROM_TEMP_MODEL_ENABLE-4) // float -#define EEPROM_TEMP_MODEL_C (EEPROM_TEMP_MODEL_P-4) // float -#define EEPROM_TEMP_MODEL_R (EEPROM_TEMP_MODEL_C-4*16) // float[16] -#define EEPROM_TEMP_MODEL_Ta_corr (EEPROM_TEMP_MODEL_R-4) // float -#define EEPROM_TEMP_MODEL_W (EEPROM_TEMP_MODEL_Ta_corr-4) // float -#define EEPROM_TEMP_MODEL_E (EEPROM_TEMP_MODEL_W-4) // float +#define EEPROM_THERMAL_MODEL_ENABLE (EEPROM_FW_CRASH_FLAG-1) // uint8_t +#define EEPROM_THERMAL_MODEL_P (EEPROM_THERMAL_MODEL_ENABLE-4) // float +#define EEPROM_THERMAL_MODEL_C (EEPROM_THERMAL_MODEL_P-4) // float +#define EEPROM_THERMAL_MODEL_R (EEPROM_THERMAL_MODEL_C-4*16) // float[16] +#define EEPROM_THERMAL_MODEL_Ta_corr (EEPROM_THERMAL_MODEL_R-4) // float +#define EEPROM_THERMAL_MODEL_W (EEPROM_THERMAL_MODEL_Ta_corr-4) // float +#define EEPROM_THERMAL_MODEL_E (EEPROM_THERMAL_MODEL_W-4) // float -#define EEPROM_FSENSOR_JAM_DETECTION (EEPROM_TEMP_MODEL_E-1) // uint8_t +#define EEPROM_FSENSOR_JAM_DETECTION (EEPROM_THERMAL_MODEL_E-1) // uint8_t #define EEPROM_MMU_ENABLED (EEPROM_FSENSOR_JAM_DETECTION-1) // uint8_t #define EEPROM_MMU_MATERIAL_CHANGES (EEPROM_MMU_ENABLED-4) // uint32_t #define EEPROM_HEAT_BED_ON_LOAD_FILAMENT (EEPROM_MMU_MATERIAL_CHANGES-1) //uint8 #define EEPROM_CALIBRATION_STATUS_V2 (EEPROM_HEAT_BED_ON_LOAD_FILAMENT-1) //uint8 -#define EEPROM_TEMP_MODEL_U (EEPROM_CALIBRATION_STATUS_V2-4) //float -#define EEPROM_TEMP_MODEL_V (EEPROM_TEMP_MODEL_U-4) //float -#define EEPROM_TEMP_MODEL_D (EEPROM_TEMP_MODEL_V-4) //float -#define EEPROM_TEMP_MODEL_L (EEPROM_TEMP_MODEL_D-2) //uint16_t -#define EEPROM_TEMP_MODEL_VER (EEPROM_TEMP_MODEL_L-1) //uint8_t +#define EEPROM_THERMAL_MODEL_U (EEPROM_CALIBRATION_STATUS_V2-4) //float +#define EEPROM_THERMAL_MODEL_V (EEPROM_THERMAL_MODEL_U-4) //float +#define EEPROM_THERMAL_MODEL_D (EEPROM_THERMAL_MODEL_V-4) //float +#define EEPROM_THERMAL_MODEL_L (EEPROM_THERMAL_MODEL_D-2) //uint16_t +#define EEPROM_THERMAL_MODEL_VER (EEPROM_THERMAL_MODEL_L-1) //uint8_t -#define EEPROM_KILL_MESSAGE (EEPROM_TEMP_MODEL_VER-2) //PGM_P +#define EEPROM_KILL_MESSAGE (EEPROM_THERMAL_MODEL_VER-2) //PGM_P #define EEPROM_KILL_PENDING_FLAG (EEPROM_KILL_MESSAGE-1) //uint8 //This is supposed to point to last item to allow EEPROM overrun check. Please update when adding new items. diff --git a/Firmware/menu.h b/Firmware/menu.h index d89b11365..02692984e 100755 --- a/Firmware/menu.h +++ b/Firmware/menu.h @@ -35,8 +35,8 @@ extern uint8_t menu_depth; enum ESeriousErrors { MENU_BLOCK_NONE = 0, MENU_BLOCK_THERMAL_ERROR = 0x01, -#ifdef TEMP_MODEL - MENU_BLOCK_TEMP_MODEL_AUTOTUNE = 0x02, +#ifdef THERMAL_MODEL + MENU_BLOCK_THERMAL_MODEL_AUTOTUNE = 0x02, #endif MENU_BLOCK_STATUS_SCREEN_M0 = 0x04, }; // and possibly others in the future. diff --git a/Firmware/messages.cpp b/Firmware/messages.cpp index a1647d329..56c03257e 100644 --- a/Firmware/messages.cpp +++ b/Firmware/messages.cpp @@ -173,7 +173,7 @@ const char MSG_IR_03_OR_OLDER[] PROGMEM_I1 = ISTR(" 0.3 or older");////MSG_IR_03 const char MSG_IR_UNKNOWN[] PROGMEM_I1 = ISTR("unknown state");////MSG_IR_UNKNOWN c=18 #endif extern const char MSG_PAUSED_THERMAL_ERROR[] PROGMEM_I1 = ISTR("PAUSED THERMAL ERROR");////MSG_PAUSED_THERMAL_ERROR c=20 -#ifdef TEMP_MODEL +#ifdef THERMAL_MODEL extern const char MSG_THERMAL_ANOMALY[] PROGMEM_I1 = ISTR("THERMAL ANOMALY");////MSG_THERMAL_ANOMALY c=20 extern const char MSG_TM_NOT_CAL[] PROGMEM_I1 = ISTR("Thermal model not calibrated yet.");////MSG_TM_NOT_CAL c=20 r=4 extern const char MSG_TM_ACK_ERROR[] PROGMEM_I1 = ISTR("Clear TM error");////MSG_TM_ACK_ERROR c=18 diff --git a/Firmware/messages.h b/Firmware/messages.h index 0d770371c..59a7d63fa 100644 --- a/Firmware/messages.h +++ b/Firmware/messages.h @@ -177,7 +177,7 @@ extern const char MSG_IR_03_OR_OLDER[]; extern const char MSG_IR_UNKNOWN[]; #endif extern const char MSG_PAUSED_THERMAL_ERROR[]; -#ifdef TEMP_MODEL +#ifdef THERMAL_MODEL extern const char MSG_THERMAL_ANOMALY[]; extern const char MSG_TM_NOT_CAL[]; extern const char MSG_TM_ACK_ERROR[]; diff --git a/Firmware/temperature.cpp b/Firmware/temperature.cpp index 4f44749ba..684ea8d04 100755 --- a/Firmware/temperature.cpp +++ b/Firmware/temperature.cpp @@ -92,7 +92,7 @@ #define ENABLE_TEMP_MGR_INTERRUPT() TIMSKx |= (1< 0)) return false; if(!(data.Ta_corr != NAN)) return false; - for(uint8_t i = 0; i != TEMP_MODEL_R_SIZE; ++i) { + for(uint8_t i = 0; i != THERMAL_MODEL_R_SIZE; ++i) { if(!(thermal_model::data.R[i] >= 0)) return false; } @@ -2234,7 +2234,7 @@ static void handle_warning() } } -#ifdef TEMP_MODEL_DEBUG +#ifdef THERMAL_MODEL_DEBUG static void log_usr() { if(!log_buf.enabled) return; @@ -2324,8 +2324,8 @@ static void thermal_model_set_lag(uint16_t ms) // ensure we do not exceed the maximum lag buffer and have at least one lag sample for filtering if(samples < 1) samples = 1; - else if(samples > TEMP_MODEL_MAX_LAG_SIZE) - samples = TEMP_MODEL_MAX_LAG_SIZE; + else if(samples > THERMAL_MODEL_MAX_LAG_SIZE) + samples = THERMAL_MODEL_MAX_LAG_SIZE; // round back to ms thermal_model::data.L = samples * intv_ms; @@ -2354,7 +2354,7 @@ void thermal_model_set_params(float P, float U, float V, float C, float D, int16 void thermal_model_set_resistance(uint8_t index, float R) { - if(index >= TEMP_MODEL_R_SIZE || R <= 0) + if(index >= THERMAL_MODEL_R_SIZE || R <= 0) return; TempMgrGuard temp_mgr_guard; @@ -2366,7 +2366,7 @@ void thermal_model_report_settings() { SERIAL_ECHO_START; SERIAL_ECHOLNPGM("Temperature Model settings:"); - for(uint8_t i = 0; i != TEMP_MODEL_R_SIZE; ++i) + for(uint8_t i = 0; i != THERMAL_MODEL_R_SIZE; ++i) printf_P(PSTR("%S M310 I%u R%.2f\n"), echomagic, (unsigned)i, (double)thermal_model::data.R[i]); printf_P(PSTR("%S M310 P%.2f U%.4f V%.2f C%.2f D%.4f L%u S%u B%u E%.2f W%.2f T%.2f\n"), echomagic, (double)thermal_model::data.P, (double)thermal_model::data.U, (double)thermal_model::data.V, @@ -2380,17 +2380,17 @@ void thermal_model_reset_settings() { TempMgrGuard temp_mgr_guard; - thermal_model::data.P = TEMP_MODEL_DEF(P); - thermal_model::data.U = TEMP_MODEL_DEF(U); - thermal_model::data.V = TEMP_MODEL_DEF(V); - thermal_model::data.C = TEMP_MODEL_DEF(C); - thermal_model::data.fS = TEMP_MODEL_DEF(fS); - thermal_model::data.L = (uint16_t)(TEMP_MODEL_DEF(LAG) / (TEMP_MGR_INTV * 1000) + 0.5) * (uint16_t)(TEMP_MGR_INTV * 1000); - for(uint8_t i = 0; i != TEMP_MODEL_R_SIZE; ++i) - thermal_model::data.R[i] = pgm_read_float(TEMP_MODEL_R_DEFAULT + i); - thermal_model::data.Ta_corr = TEMP_MODEL_Ta_corr; - thermal_model::data.warn = TEMP_MODEL_DEF(W); - thermal_model::data.err = TEMP_MODEL_DEF(E); + thermal_model::data.P = THERMAL_MODEL_DEF(P); + thermal_model::data.U = THERMAL_MODEL_DEF(U); + thermal_model::data.V = THERMAL_MODEL_DEF(V); + thermal_model::data.C = THERMAL_MODEL_DEF(C); + thermal_model::data.fS = THERMAL_MODEL_DEF(fS); + thermal_model::data.L = (uint16_t)(THERMAL_MODEL_DEF(LAG) / (TEMP_MGR_INTV * 1000) + 0.5) * (uint16_t)(TEMP_MGR_INTV * 1000); + for(uint8_t i = 0; i != THERMAL_MODEL_R_SIZE; ++i) + thermal_model::data.R[i] = pgm_read_float(THERMAL_MODEL_R_DEFAULT + i); + thermal_model::data.Ta_corr = THERMAL_MODEL_Ta_corr; + thermal_model::data.warn = THERMAL_MODEL_DEF(W); + thermal_model::data.err = THERMAL_MODEL_DEF(E); thermal_model::warn_beep = true; thermal_model::enabled = true; thermal_model::reinitialize(); @@ -2398,29 +2398,29 @@ void thermal_model_reset_settings() void thermal_model_load_settings() { - static_assert(TEMP_MODEL_R_SIZE == 16); // ensure we don't desync with the eeprom table + static_assert(THERMAL_MODEL_R_SIZE == 16); // ensure we don't desync with the eeprom table TempMgrGuard temp_mgr_guard; // handle upgrade from a model without UVDL (FW<3.13, TM VER<1): model is retro-compatible, // reset UV to an identity without doing any special handling - eeprom_init_default_float((float*)EEPROM_TEMP_MODEL_U, TEMP_MODEL_DEF(U)); - eeprom_init_default_float((float*)EEPROM_TEMP_MODEL_V, TEMP_MODEL_DEF(V)); - eeprom_init_default_float((float*)EEPROM_TEMP_MODEL_D, TEMP_MODEL_DEF(fS)); - eeprom_init_default_word((uint16_t*)EEPROM_TEMP_MODEL_L, TEMP_MODEL_DEF(LAG)); - eeprom_init_default_byte((uint8_t*)EEPROM_TEMP_MODEL_VER, TEMP_MODEL_DEF(VER)); + eeprom_init_default_float((float*)EEPROM_THERMAL_MODEL_U, THERMAL_MODEL_DEF(U)); + eeprom_init_default_float((float*)EEPROM_THERMAL_MODEL_V, THERMAL_MODEL_DEF(V)); + eeprom_init_default_float((float*)EEPROM_THERMAL_MODEL_D, THERMAL_MODEL_DEF(fS)); + eeprom_init_default_word((uint16_t*)EEPROM_THERMAL_MODEL_L, THERMAL_MODEL_DEF(LAG)); + eeprom_init_default_byte((uint8_t*)EEPROM_THERMAL_MODEL_VER, THERMAL_MODEL_DEF(VER)); - thermal_model::enabled = eeprom_read_byte((uint8_t*)EEPROM_TEMP_MODEL_ENABLE); - thermal_model::data.P = eeprom_read_float((float*)EEPROM_TEMP_MODEL_P); - thermal_model::data.U = eeprom_read_float((float*)EEPROM_TEMP_MODEL_U); - thermal_model::data.V = eeprom_read_float((float*)EEPROM_TEMP_MODEL_V); - thermal_model::data.C = eeprom_read_float((float*)EEPROM_TEMP_MODEL_C); - thermal_model::data.fS = eeprom_read_float((float*)EEPROM_TEMP_MODEL_D); - thermal_model_set_lag(eeprom_read_word((uint16_t*)EEPROM_TEMP_MODEL_L)); - for(uint8_t i = 0; i != TEMP_MODEL_R_SIZE; ++i) - thermal_model::data.R[i] = eeprom_read_float((float*)EEPROM_TEMP_MODEL_R + i); - thermal_model::data.Ta_corr = eeprom_read_float((float*)EEPROM_TEMP_MODEL_Ta_corr); - thermal_model::data.warn = eeprom_read_float((float*)EEPROM_TEMP_MODEL_W); - thermal_model::data.err = eeprom_read_float((float*)EEPROM_TEMP_MODEL_E); + thermal_model::enabled = eeprom_read_byte((uint8_t*)EEPROM_THERMAL_MODEL_ENABLE); + thermal_model::data.P = eeprom_read_float((float*)EEPROM_THERMAL_MODEL_P); + thermal_model::data.U = eeprom_read_float((float*)EEPROM_THERMAL_MODEL_U); + thermal_model::data.V = eeprom_read_float((float*)EEPROM_THERMAL_MODEL_V); + thermal_model::data.C = eeprom_read_float((float*)EEPROM_THERMAL_MODEL_C); + thermal_model::data.fS = eeprom_read_float((float*)EEPROM_THERMAL_MODEL_D); + thermal_model_set_lag(eeprom_read_word((uint16_t*)EEPROM_THERMAL_MODEL_L)); + for(uint8_t i = 0; i != THERMAL_MODEL_R_SIZE; ++i) + thermal_model::data.R[i] = eeprom_read_float((float*)EEPROM_THERMAL_MODEL_R + i); + thermal_model::data.Ta_corr = eeprom_read_float((float*)EEPROM_THERMAL_MODEL_Ta_corr); + thermal_model::data.warn = eeprom_read_float((float*)EEPROM_THERMAL_MODEL_W); + thermal_model::data.err = eeprom_read_float((float*)EEPROM_THERMAL_MODEL_E); if(!thermal_model::calibrated()) { SERIAL_ECHOLNPGM("TM: stored calibration invalid, resetting"); @@ -2431,18 +2431,18 @@ void thermal_model_load_settings() void thermal_model_save_settings() { - eeprom_update_byte((uint8_t*)EEPROM_TEMP_MODEL_ENABLE, thermal_model::enabled); - eeprom_update_float((float*)EEPROM_TEMP_MODEL_P, thermal_model::data.P); - eeprom_update_float((float*)EEPROM_TEMP_MODEL_U, thermal_model::data.U); - eeprom_update_float((float*)EEPROM_TEMP_MODEL_V, thermal_model::data.V); - eeprom_update_float((float*)EEPROM_TEMP_MODEL_C, thermal_model::data.C); - eeprom_update_float((float*)EEPROM_TEMP_MODEL_D, thermal_model::data.fS); - eeprom_update_word((uint16_t*)EEPROM_TEMP_MODEL_L, thermal_model::data.L); - for(uint8_t i = 0; i != TEMP_MODEL_R_SIZE; ++i) - eeprom_update_float((float*)EEPROM_TEMP_MODEL_R + i, thermal_model::data.R[i]); - eeprom_update_float((float*)EEPROM_TEMP_MODEL_Ta_corr, thermal_model::data.Ta_corr); - eeprom_update_float((float*)EEPROM_TEMP_MODEL_W, thermal_model::data.warn); - eeprom_update_float((float*)EEPROM_TEMP_MODEL_E, thermal_model::data.err); + eeprom_update_byte((uint8_t*)EEPROM_THERMAL_MODEL_ENABLE, thermal_model::enabled); + eeprom_update_float((float*)EEPROM_THERMAL_MODEL_P, thermal_model::data.P); + eeprom_update_float((float*)EEPROM_THERMAL_MODEL_U, thermal_model::data.U); + eeprom_update_float((float*)EEPROM_THERMAL_MODEL_V, thermal_model::data.V); + eeprom_update_float((float*)EEPROM_THERMAL_MODEL_C, thermal_model::data.C); + eeprom_update_float((float*)EEPROM_THERMAL_MODEL_D, thermal_model::data.fS); + eeprom_update_word((uint16_t*)EEPROM_THERMAL_MODEL_L, thermal_model::data.L); + for(uint8_t i = 0; i != THERMAL_MODEL_R_SIZE; ++i) + eeprom_update_float((float*)EEPROM_THERMAL_MODEL_R + i, thermal_model::data.R[i]); + eeprom_update_float((float*)EEPROM_THERMAL_MODEL_Ta_corr, thermal_model::data.Ta_corr); + eeprom_update_float((float*)EEPROM_THERMAL_MODEL_W, thermal_model::data.warn); + eeprom_update_float((float*)EEPROM_THERMAL_MODEL_E, thermal_model::data.err); } namespace thermal_model_cal { @@ -2618,10 +2618,10 @@ static bool autotune(int16_t cal_temp) for(uint8_t i = 0; i != 2; ++i) { const char* PROGMEM verb = (i == 0? PSTR("initial"): PSTR("refine")); target_temperature[0] = 0; - if(current_temperature[0] >= TEMP_MODEL_CAL_T_low) { - sprintf_P(tm_message, PSTR("TM: cool down <%dC"), TEMP_MODEL_CAL_T_low); + if(current_temperature[0] >= THERMAL_MODEL_CAL_T_low) { + sprintf_P(tm_message, PSTR("TM: cool down <%dC"), THERMAL_MODEL_CAL_T_low); lcd_setstatus_serial(tm_message); - cooldown(TEMP_MODEL_CAL_T_low); + cooldown(THERMAL_MODEL_CAL_T_low); wait(10000); } @@ -2634,11 +2634,11 @@ static bool autotune(int16_t cal_temp) // we need a high R value for the initial C guess if(isnan(thermal_model::data.R[0])) - thermal_model::data.R[0] = TEMP_MODEL_CAL_R_high; + thermal_model::data.R[0] = THERMAL_MODEL_CAL_R_high; e = estimate(samples, &thermal_model::data.C, - TEMP_MODEL_CAL_C_low, TEMP_MODEL_CAL_C_high, - TEMP_MODEL_CAL_C_thr, TEMP_MODEL_CAL_C_itr, + THERMAL_MODEL_CAL_C_low, THERMAL_MODEL_CAL_C_high, + THERMAL_MODEL_CAL_C_thr, THERMAL_MODEL_CAL_C_itr, 0, current_temperature_ambient); if(isnan(e)) return true; @@ -2654,8 +2654,8 @@ static bool autotune(int16_t cal_temp) return true; e = estimate(samples, &thermal_model::data.R[0], - TEMP_MODEL_CAL_R_low, TEMP_MODEL_CAL_R_high, - TEMP_MODEL_CAL_R_thr, TEMP_MODEL_CAL_R_itr, + THERMAL_MODEL_CAL_R_low, THERMAL_MODEL_CAL_R_high, + THERMAL_MODEL_CAL_R_thr, THERMAL_MODEL_CAL_R_itr, 0, current_temperature_ambient); if(isnan(e)) return true; @@ -2668,12 +2668,12 @@ static bool autotune(int16_t cal_temp) set_fan_speed(255); wait(30000); - for(int8_t i = TEMP_MODEL_R_SIZE - 1; i > 0; i -= TEMP_MODEL_CAL_R_STEP) { + for(int8_t i = THERMAL_MODEL_R_SIZE - 1; i > 0; i -= THERMAL_MODEL_CAL_R_STEP) { // always disable the checker while estimating fan resistance as the difference // (esp with 3rd-party blowers) can be massive thermal_model::data.R[i] = NAN; - uint8_t speed = 256 / TEMP_MODEL_R_SIZE * (i + 1) - 1; + uint8_t speed = 256 / THERMAL_MODEL_R_SIZE * (i + 1) - 1; set_fan_speed(speed); wait(10000); @@ -2686,7 +2686,7 @@ static bool autotune(int16_t cal_temp) // a fixed fan pwm (the norminal value) is used here, as soft_pwm_fan will be modified // during fan measurements and we'd like to include that skew during normal operation. e = estimate(samples, &thermal_model::data.R[i], - TEMP_MODEL_CAL_R_low, thermal_model::data.R[0], TEMP_MODEL_CAL_R_thr, TEMP_MODEL_CAL_R_itr, + THERMAL_MODEL_CAL_R_low, thermal_model::data.R[0], THERMAL_MODEL_CAL_R_thr, THERMAL_MODEL_CAL_R_itr, i, current_temperature_ambient); if(isnan(e)) return true; @@ -2694,15 +2694,15 @@ static bool autotune(int16_t cal_temp) // interpolate remaining steps to speed-up calibration // TODO: verify that the sampled values are monotically increasing? - int8_t next = TEMP_MODEL_R_SIZE - 1; - for(uint8_t i = TEMP_MODEL_R_SIZE - 2; i != 0; --i) { - if(!((TEMP_MODEL_R_SIZE - i - 1) % TEMP_MODEL_CAL_R_STEP)) { + int8_t next = THERMAL_MODEL_R_SIZE - 1; + for(uint8_t i = THERMAL_MODEL_R_SIZE - 2; i != 0; --i) { + if(!((THERMAL_MODEL_R_SIZE - i - 1) % THERMAL_MODEL_CAL_R_STEP)) { next = i; continue; } - int8_t prev = next - TEMP_MODEL_CAL_R_STEP; + int8_t prev = next - THERMAL_MODEL_CAL_R_STEP; if(prev < 0) prev = 0; - float f = (float)(i - prev) / TEMP_MODEL_CAL_R_STEP; + float f = (float)(i - prev) / THERMAL_MODEL_CAL_R_STEP; float d = (thermal_model::data.R[next] - thermal_model::data.R[prev]); thermal_model::data.R[i] = thermal_model::data.R[prev] + d * f; } @@ -2716,7 +2716,7 @@ static bool thermal_model_autotune_err = true; void thermal_model_autotune(int16_t temp, bool selftest) { - float orig_C, orig_R[TEMP_MODEL_R_SIZE]; + float orig_C, orig_R[THERMAL_MODEL_R_SIZE]; bool orig_enabled; static_assert(sizeof(orig_R) == sizeof(thermal_model::data.R)); @@ -2732,7 +2732,7 @@ void thermal_model_autotune(int16_t temp, bool selftest) // lockout the printer during calibration KEEPALIVE_STATE(IN_PROCESS); - menu_set_block(MENU_BLOCK_TEMP_MODEL_AUTOTUNE); + menu_set_block(MENU_BLOCK_THERMAL_MODEL_AUTOTUNE); lcd_return_to_status(); // save the original model data and set the model checking state during self-calibration @@ -2743,7 +2743,7 @@ void thermal_model_autotune(int16_t temp, bool selftest) // autotune SERIAL_ECHOLNPGM("TM: calibration start"); - thermal_model_autotune_err = thermal_model_cal::autotune(temp > 0 ? temp : TEMP_MODEL_CAL_T_high); + thermal_model_autotune_err = thermal_model_cal::autotune(temp > 0 ? temp : THERMAL_MODEL_CAL_T_high); // always reset temperature disable_heater(); @@ -2762,7 +2762,7 @@ void thermal_model_autotune(int16_t temp, bool selftest) memcpy(thermal_model::data.R, orig_R, sizeof(thermal_model::data.R)); thermal_model_set_enabled(orig_enabled); } else { - calibration_status_set(CALIBRATION_STATUS_TEMP_MODEL); + calibration_status_set(CALIBRATION_STATUS_THERMAL_MODEL); lcd_setstatuspgm(MSG_WELCOME); thermal_model_cal::set_fan_speed(0); thermal_model_set_enabled(orig_enabled); @@ -2770,7 +2770,7 @@ void thermal_model_autotune(int16_t temp, bool selftest) } lcd_consume_click(); - menu_unset_block(MENU_BLOCK_TEMP_MODEL_AUTOTUNE); + menu_unset_block(MENU_BLOCK_THERMAL_MODEL_AUTOTUNE); } bool thermal_model_autotune_result() @@ -2778,7 +2778,7 @@ bool thermal_model_autotune_result() return !thermal_model_autotune_err; } -#ifdef TEMP_MODEL_DEBUG +#ifdef THERMAL_MODEL_DEBUG void thermal_model_log_enable(bool enable) { if(enable) { diff --git a/Firmware/temperature.h b/Firmware/temperature.h index 07a05bba9..1264439ee 100755 --- a/Firmware/temperature.h +++ b/Firmware/temperature.h @@ -174,7 +174,7 @@ FORCE_INLINE void autotempShutdown(){ void PID_autotune(float temp, int extruder, int ncycles); -#ifdef TEMP_MODEL +#ifdef THERMAL_MODEL bool thermal_model_enabled(); // return temperature model state void thermal_model_set_enabled(bool enabled); void thermal_model_set_warn_beep(bool enabled); @@ -190,7 +190,7 @@ void thermal_model_save_settings(); void thermal_model_autotune(int16_t temp = 0, bool selftest = false); bool thermal_model_autotune_result(); // return true if the last autotune was complete and successful -#ifdef TEMP_MODEL_DEBUG +#ifdef THERMAL_MODEL_DEBUG void thermal_model_log_enable(bool enable); #endif #endif diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 366cc3654..e980bf7ff 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -887,7 +887,7 @@ void lcd_commands() } } -#ifdef TEMP_MODEL +#ifdef THERMAL_MODEL if (lcd_commands_type == LcdCommands::TempModel && cmd_buffer_empty()) { switch (lcd_commands_step) @@ -931,15 +931,15 @@ void lcd_commands() break; } } -#endif //TEMP_MODEL +#endif //THERMAL_MODEL if (lcd_commands_type == LcdCommands::NozzleCNG) { if (!blocks_queued() && cmd_buffer_empty() && !saved_printing) { -#ifdef TEMP_MODEL +#ifdef THERMAL_MODEL static bool was_enabled; -#endif //TEMP_MODEL +#endif //THERMAL_MODEL switch(lcd_commands_step) { case 0: @@ -953,10 +953,10 @@ void lcd_commands() enquecommand_P(G28W); enquecommand_P(PSTR("G1 X125 Z200 F1000")); enquecommand_P(PSTR("M109 S280")); -#ifdef TEMP_MODEL +#ifdef THERMAL_MODEL was_enabled = thermal_model_enabled(); thermal_model_set_enabled(false); -#endif //TEMP_MODEL +#endif //THERMAL_MODEL lcd_commands_step = 2; break; case 2: @@ -969,9 +969,9 @@ void lcd_commands() lcd_update_enabled = false; //hack to avoid lcd_update recursion. if (lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_NOZZLE_CNG_CHANGED), false) == LCD_LEFT_BUTTON_CHOICE) { setTargetHotend(0); -#ifdef TEMP_MODEL +#ifdef THERMAL_MODEL thermal_model_set_enabled(was_enabled); -#endif //TEMP_MODEL +#endif //THERMAL_MODEL lcd_commands_step = 1; } lcd_update_enabled = true; @@ -3802,10 +3802,10 @@ void lcd_wizard(WizState state) state = S::Xyz; } else if (!calibration_status_get(CALIBRATION_STATUS_Z)) { state = S::Z; -#ifdef TEMP_MODEL - } else if (!calibration_status_get(CALIBRATION_STATUS_TEMP_MODEL)) { +#ifdef THERMAL_MODEL + } else if (!calibration_status_get(CALIBRATION_STATUS_THERMAL_MODEL)) { state = S::TempModel; -#endif //TEMP_MODEL +#endif //THERMAL_MODEL } else if (!calibration_status_get(CALIBRATION_STATUS_LIVE_ADJUST)) { state = S::IsFil; } else { @@ -3847,13 +3847,13 @@ void lcd_wizard(WizState state) state = S::Restore; } break; -#ifdef TEMP_MODEL +#ifdef THERMAL_MODEL case S::TempModel: lcd_show_fullscreen_message_and_wait_P(_i("Thermal model cal. takes approx. 12 mins. See\nprusa.io/tm-cal"));////MSG_TM_CAL c=20 r=4 lcd_commands_type = LcdCommands::TempModel; end = true; // Leave wizard temporarily for TM cal. break; -#endif //TEMP_MODEL +#endif //THERMAL_MODEL case S::IsFil: //start to preheat nozzle and bed to save some time later setTargetHotend(PLA_PREHEAT_HOTEND_TEMP); @@ -4551,9 +4551,9 @@ static void lcd_calibration_menu() MENU_ITEM_FUNCTION_P(_T(MSG_PINDA_CALIBRATION), lcd_calibrate_pinda); #endif } -#ifdef TEMP_MODEL +#ifdef THERMAL_MODEL MENU_ITEM_SUBMENU_P(_n("Thermal Model cal."), lcd_thermal_model_cal); -#endif //TEMP_MODEL +#endif //THERMAL_MODEL MENU_END(); } @@ -5173,7 +5173,7 @@ static void lcd_main_menu() if((printJobOngoing() || isPrintPaused) && (custom_message_type != CustomMsg::MeshBedLeveling) && !processing_tcode) { MENU_ITEM_SUBMENU_P(_T(MSG_STOP_PRINT), lcd_sdcard_stop); } -#ifdef TEMP_MODEL +#ifdef THERMAL_MODEL else if(Stopped) { MENU_ITEM_SUBMENU_P(_T(MSG_TM_ACK_ERROR), lcd_print_stop); } @@ -5591,13 +5591,13 @@ void lcd_print_stop() print_stop(true); } -#ifdef TEMP_MODEL +#ifdef THERMAL_MODEL void lcd_thermal_model_cal() { lcd_commands_type = LcdCommands::TempModel; lcd_return_to_status(); } -#endif //TEMP_MODEL +#endif //THERMAL_MODEL void lcd_sdcard_stop() { @@ -6447,10 +6447,10 @@ static bool lcd_selfcheck_check_heater(bool _isbed) target_temperature[0] = (_isbed) ? 0 : 200; target_temperature_bed = (_isbed) ? 100 : 0; -#ifdef TEMP_MODEL +#ifdef THERMAL_MODEL bool tm_was_enabled = thermal_model_enabled(); thermal_model_set_enabled(false); -#endif //TEMP_MODEL +#endif //THERMAL_MODEL manage_heater(); manage_inactivity(true); @@ -6499,9 +6499,9 @@ static bool lcd_selfcheck_check_heater(bool _isbed) lcd_selftest_error(TestError::Bed, "", ""); } -#ifdef TEMP_MODEL +#ifdef THERMAL_MODEL thermal_model_set_enabled(tm_was_enabled); -#endif //TEMP_MODEL +#endif //THERMAL_MODEL manage_heater(); manage_inactivity(true); return _stepresult; diff --git a/Firmware/ultralcd.h b/Firmware/ultralcd.h index ea1681837..441f6b5c0 100755 --- a/Firmware/ultralcd.h +++ b/Firmware/ultralcd.h @@ -50,9 +50,9 @@ void lcd_pause_usb_print(); void lcd_resume_print(); void lcd_print_stop(); // interactive print stop void print_stop(bool interactive=false); -#ifdef TEMP_MODEL +#ifdef THERMAL_MODEL void lcd_thermal_model_cal(); -#endif //TEMP_MODEL +#endif //THERMAL_MODEL void lcd_load_filament_color_check(); extern void lcd_belttest(); @@ -117,9 +117,9 @@ enum class LcdCommands : uint_least8_t LongPause, PidExtruder, Layer1Cal, -#ifdef TEMP_MODEL +#ifdef THERMAL_MODEL TempModel, -#endif //TEMP_MODEL +#endif //THERMAL_MODEL NozzleCNG, }; @@ -225,9 +225,9 @@ enum class WizState : uint8_t Selftest, //!< self test Xyz, //!< xyz calibration Z, //!< z calibration -#ifdef TEMP_MODEL +#ifdef THERMAL_MODEL TempModel, //!< Temp model calibration -#endif //TEMP_MODEL +#endif //THERMAL_MODEL IsFil, //!< Is filament loaded? First step of 1st layer calibration Preheat, //!< Preheat for any material LoadFilCold, //!< Load filament for MMU diff --git a/Firmware/util.h b/Firmware/util.h index 20f03388b..26deb782a 100644 --- a/Firmware/util.h +++ b/Firmware/util.h @@ -106,8 +106,8 @@ typedef uint8_t CalibrationStatus; const CalibrationStatus CALIBRATION_STATUS_SELFTEST = 0b00000001; // Selftest const CalibrationStatus CALIBRATION_STATUS_XYZ = 0b00000010; // XYZ calibration const CalibrationStatus CALIBRATION_STATUS_Z = 0b00000100; // Z calibration -#ifdef TEMP_MODEL -const CalibrationStatus CALIBRATION_STATUS_TEMP_MODEL = 0b00001000; // Temperature model calibration +#ifdef THERMAL_MODEL +const CalibrationStatus CALIBRATION_STATUS_THERMAL_MODEL = 0b00001000; // Temperature model calibration #endif const CalibrationStatus CALIBRATION_STATUS_LIVE_ADJUST = 0b00010000; // 1st layer calibration const CalibrationStatus CALIBRATION_STATUS_UNKNOWN = 0b10000000; // Freshly assembled or unknown status @@ -117,8 +117,8 @@ const CalibrationStatus CALIBRATION_WIZARD_STEPS = CALIBRATION_STATUS_SELFTEST | CALIBRATION_STATUS_XYZ | CALIBRATION_STATUS_Z | -#ifdef TEMP_MODEL - CALIBRATION_STATUS_TEMP_MODEL | +#ifdef THERMAL_MODEL + CALIBRATION_STATUS_THERMAL_MODEL | #endif CALIBRATION_STATUS_LIVE_ADJUST; diff --git a/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h b/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h index fe2f82432..e6ce1915d 100644 --- a/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h @@ -384,26 +384,26 @@ #define TEMP_RUNAWAY_EXTRUDER_TIMEOUT 45 // model-based temperature check -#define TEMP_MODEL 1 // enable model-based temperature checks -#define TEMP_MODEL_DEBUG 1 // extended runtime logging +#define THERMAL_MODEL 1 // enable model-based temperature checks +#define THERMAL_MODEL_DEBUG 1 // extended runtime logging -#define TEMP_MODEL_CAL_C_low 5 // C estimation lower limit -#define TEMP_MODEL_CAL_C_high 20 // C estimation upper limit -#define TEMP_MODEL_CAL_C_thr 0.01 // C estimation iteration threshold -#define TEMP_MODEL_CAL_C_itr 30 // C estimation iteration limit +#define THERMAL_MODEL_CAL_C_low 5 // C estimation lower limit +#define THERMAL_MODEL_CAL_C_high 20 // C estimation upper limit +#define THERMAL_MODEL_CAL_C_thr 0.01 // C estimation iteration threshold +#define THERMAL_MODEL_CAL_C_itr 30 // C estimation iteration limit -#define TEMP_MODEL_CAL_R_low 5 // R estimation lower limit -#define TEMP_MODEL_CAL_R_high 50 // R estimation upper limit -#define TEMP_MODEL_CAL_R_thr 0.01 // R estimation iteration threshold -#define TEMP_MODEL_CAL_R_itr 30 // R estimation iteration limit +#define THERMAL_MODEL_CAL_R_low 5 // R estimation lower limit +#define THERMAL_MODEL_CAL_R_high 50 // R estimation upper limit +#define THERMAL_MODEL_CAL_R_thr 0.01 // R estimation iteration threshold +#define THERMAL_MODEL_CAL_R_itr 30 // R estimation iteration limit -#define TEMP_MODEL_CAL_T_low 50 // Default calibration cooling temperature (C) -#define TEMP_MODEL_CAL_T_high 230 // Default calibration working temperature (C) +#define THERMAL_MODEL_CAL_T_low 50 // Default calibration cooling temperature (C) +#define THERMAL_MODEL_CAL_T_high 230 // Default calibration working temperature (C) -#define TEMP_MODEL_Ta_corr -7 // Default ambient temperature correction +#define THERMAL_MODEL_Ta_corr -7 // Default ambient temperature correction #include "thermal_model/e3d_v6.h" -#define TEMP_MODEL_DEFAULT E3D_V6 // Default model parameters +#define THERMAL_MODEL_DEFAULT E3D_V6 // Default model parameters /*------------------------------------ diff --git a/Firmware/variants/1_75mm_MK3S-EINSy10a-E3Dv6full.h b/Firmware/variants/1_75mm_MK3S-EINSy10a-E3Dv6full.h index 50fa2be55..8b9ee71e2 100644 --- a/Firmware/variants/1_75mm_MK3S-EINSy10a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK3S-EINSy10a-E3Dv6full.h @@ -388,26 +388,26 @@ #define TEMP_RUNAWAY_EXTRUDER_TIMEOUT 45 // model-based temperature check -#define TEMP_MODEL 1 // enable model-based temperature checks -#define TEMP_MODEL_DEBUG 1 // extended runtime logging +#define THERMAL_MODEL 1 // enable model-based temperature checks +#define THERMAL_MODEL_DEBUG 1 // extended runtime logging -#define TEMP_MODEL_CAL_C_low 5 // C estimation lower limit -#define TEMP_MODEL_CAL_C_high 20 // C estimation upper limit -#define TEMP_MODEL_CAL_C_thr 0.01 // C estimation iteration threshold -#define TEMP_MODEL_CAL_C_itr 30 // C estimation iteration limit +#define THERMAL_MODEL_CAL_C_low 5 // C estimation lower limit +#define THERMAL_MODEL_CAL_C_high 20 // C estimation upper limit +#define THERMAL_MODEL_CAL_C_thr 0.01 // C estimation iteration threshold +#define THERMAL_MODEL_CAL_C_itr 30 // C estimation iteration limit -#define TEMP_MODEL_CAL_R_low 5 // R estimation lower limit -#define TEMP_MODEL_CAL_R_high 50 // R estimation upper limit -#define TEMP_MODEL_CAL_R_thr 0.01 // R estimation iteration threshold -#define TEMP_MODEL_CAL_R_itr 30 // R estimation iteration limit +#define THERMAL_MODEL_CAL_R_low 5 // R estimation lower limit +#define THERMAL_MODEL_CAL_R_high 50 // R estimation upper limit +#define THERMAL_MODEL_CAL_R_thr 0.01 // R estimation iteration threshold +#define THERMAL_MODEL_CAL_R_itr 30 // R estimation iteration limit -#define TEMP_MODEL_CAL_T_low 50 // Default calibration cooling temperature (C) -#define TEMP_MODEL_CAL_T_high 230 // Default calibration working temperature (C) +#define THERMAL_MODEL_CAL_T_low 50 // Default calibration cooling temperature (C) +#define THERMAL_MODEL_CAL_T_high 230 // Default calibration working temperature (C) -#define TEMP_MODEL_Ta_corr -7 // Default ambient temperature correction +#define THERMAL_MODEL_Ta_corr -7 // Default ambient temperature correction #include "thermal_model/e3d_v6.h" -#define TEMP_MODEL_DEFAULT E3D_V6 // Default model parameters +#define THERMAL_MODEL_DEFAULT E3D_V6 // Default model parameters /*------------------------------------ From 600a7a0316e82d6f002d7262e8bf22a6107bb647 Mon Sep 17 00:00:00 2001 From: 3d-gussner <3d.gussner@gmail.com> Date: Wed, 24 May 2023 08:38:24 +0200 Subject: [PATCH 3/9] Rename `Temp Model` to `Thermal Model` --- Firmware/eeprom.h | 30 +++++++++++++++--------------- Firmware/ultralcd.h | 2 +- lang/po/Firmware_sv.po | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Firmware/eeprom.h b/Firmware/eeprom.h index d6358773c..e0a598ab8 100644 --- a/Firmware/eeprom.h +++ b/Firmware/eeprom.h @@ -92,7 +92,7 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP | 0x0FF7 4087 | uint8 | EEPROM_CALIBRATION_STATUS_V1 | ffh 255 | ffh 255 | Calibration status ( Date: Wed, 24 May 2023 08:39:24 +0200 Subject: [PATCH 4/9] Rename `TempModel` to `ThermalModel` --- Firmware/ultralcd.cpp | 10 +++++----- Firmware/ultralcd.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index e980bf7ff..18b5b8bc5 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -888,7 +888,7 @@ void lcd_commands() } #ifdef THERMAL_MODEL - if (lcd_commands_type == LcdCommands::TempModel && cmd_buffer_empty()) + if (lcd_commands_type == LcdCommands::ThermalModel && cmd_buffer_empty()) { switch (lcd_commands_step) { @@ -3804,7 +3804,7 @@ void lcd_wizard(WizState state) state = S::Z; #ifdef THERMAL_MODEL } else if (!calibration_status_get(CALIBRATION_STATUS_THERMAL_MODEL)) { - state = S::TempModel; + state = S::ThermalModel; #endif //THERMAL_MODEL } else if (!calibration_status_get(CALIBRATION_STATUS_LIVE_ADJUST)) { state = S::IsFil; @@ -3848,9 +3848,9 @@ void lcd_wizard(WizState state) } break; #ifdef THERMAL_MODEL - case S::TempModel: + case S::ThermalModel: lcd_show_fullscreen_message_and_wait_P(_i("Thermal model cal. takes approx. 12 mins. See\nprusa.io/tm-cal"));////MSG_TM_CAL c=20 r=4 - lcd_commands_type = LcdCommands::TempModel; + lcd_commands_type = LcdCommands::ThermalModel; end = true; // Leave wizard temporarily for TM cal. break; #endif //THERMAL_MODEL @@ -5594,7 +5594,7 @@ void lcd_print_stop() #ifdef THERMAL_MODEL void lcd_thermal_model_cal() { - lcd_commands_type = LcdCommands::TempModel; + lcd_commands_type = LcdCommands::ThermalModel; lcd_return_to_status(); } #endif //THERMAL_MODEL diff --git a/Firmware/ultralcd.h b/Firmware/ultralcd.h index e74390852..5e5c7dba3 100755 --- a/Firmware/ultralcd.h +++ b/Firmware/ultralcd.h @@ -118,7 +118,7 @@ enum class LcdCommands : uint_least8_t PidExtruder, Layer1Cal, #ifdef THERMAL_MODEL - TempModel, + ThermalModel, #endif //THERMAL_MODEL NozzleCNG, }; @@ -226,7 +226,7 @@ enum class WizState : uint8_t Xyz, //!< xyz calibration Z, //!< z calibration #ifdef THERMAL_MODEL - TempModel, //!< Thermal Model calibration + ThermalModel, //!< Thermal Model calibration #endif //THERMAL_MODEL IsFil, //!< Is filament loaded? First step of 1st layer calibration Preheat, //!< Preheat for any material From a6b209d36d2f0fa492b5bed1ffc3fe6abeb79a98 Mon Sep 17 00:00:00 2001 From: 3d-gussner <3d.gussner@gmail.com> Date: Wed, 24 May 2023 08:49:23 +0200 Subject: [PATCH 5/9] Rename `Temperature Model` to `Thermal Model` `Temperature model` to `Thermal model` `temperature model` to `thermal model` --- Firmware/Marlin_main.cpp | 6 +++--- Firmware/temperature.cpp | 4 ++-- Firmware/temperature.h | 2 +- Firmware/util.h | 2 +- tools/README.md | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index ffb2d75d4..fd819ed25 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -3932,7 +3932,7 @@ extern uint8_t st_backlash_y; //!@n M302 - Allow cold extrudes, or set the minimum extrude S. //!@n M303 - PID relay autotune S sets the target temperature. (default target temperature = 150C) //!@n M304 - Set bed PID parameters P I and D -//!@n M310 - Temperature model settings +//!@n M310 - Thermal model settings //!@n M400 - Finish all moves //!@n M401 - Lower z-probe if present //!@n M402 - Raise z-probe if present @@ -7332,7 +7332,7 @@ Sigma_Exit: #ifdef THERMAL_MODEL /*! - ### M310 - Temperature model settings M310: Temperature model settings + ### M310 - Thermal model settings M310: Thermal model settings #### Usage M310 ; report values @@ -8880,7 +8880,7 @@ Sigma_Exit: #ifdef THERMAL_MODEL_DEBUG /*! - ## D70 - Enable low-level temperature model logging for offline simulation + ## D70 - Enable low-level thermal model logging for offline simulation #### Usage D70 [ S ] diff --git a/Firmware/temperature.cpp b/Firmware/temperature.cpp index 684ea8d04..82895486a 100755 --- a/Firmware/temperature.cpp +++ b/Firmware/temperature.cpp @@ -93,7 +93,7 @@ #define DISABLE_TEMP_MGR_INTERRUPT() TIMSKx &= ~(1< Date: Wed, 24 May 2023 08:53:27 +0200 Subject: [PATCH 6/9] Format `eeprom.h` doxygen documentation --- Firmware/eeprom.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Firmware/eeprom.h b/Firmware/eeprom.h index e0a598ab8..4b0446a9e 100644 --- a/Firmware/eeprom.h +++ b/Firmware/eeprom.h @@ -326,7 +326,7 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP | 0x0D11 3345 | float | EEPROM_UVLO_ACCELL | ??? | ff ff ff ffh | Power panic saved normal acceleration | ??? | D3 Ax0d11 C4 | 0x0D0D 3341 | float | EEPROM_UVLO_RETRACT_ACCELL | ??? | ff ff ff ffh | Power panic saved retract acceleration | ??? | D3 Ax0d0d C4 | 0x0D09 3337 | float | EEPROM_UVLO_TRAVEL_ACCELL | ??? | ff ff ff ffh | Power panic saved travel acceleration | ??? | D3 Ax0d09 C4 -| 0x0D05 3333 | unint32 | EEPROM_JOB_ID | ??? | 00 00 00 00h | Job ID used by host software | D3 only | D3 Ax0d05 C4 +| 0x0D05 3333 | unint32 | EEPROM_JOB_ID | ??? | 00 00 00 00h | Job ID used by host software | D3 only | D3 Ax0d05 C4 | 0x0D04 3332 | uint8 | EEPROM_ECOOL_ENABLE | ffh 255 | ^ | Disable extruder motor scaling for non-farm print | LCD menu | D3 Ax0d04 C1 | ^ | ^ | ^ | 2ah 42 | ^ | Enable extruder motor scaling for non-farm print | ^ | D3 Ax0d04 C1 | 0x0D03 3331 | uint8 | EEPROM_FW_CRASH_FLAG | ffh 255 | ffh 255 | Last FW crash reason (dump_crash_reason) | D21/D22 | D3 Ax0d03 C1 @@ -336,14 +336,14 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP | ^ | ^ | ^ | 03h 3 | ^ | bad_isr | ^ | ^ | ^ | ^ | ^ | 04h 4 | ^ | bad_pullup_temp_isr | ^ | ^ | ^ | ^ | ^ | 05h 5 | ^ | bad_pullup_step_isr | ^ | ^ -| 0x0D02 3330 | uint8 | EEPROM_THERMAL_MODEL_ENABLE | 00h 0 | ff/00 | Thermal Model deactivated | Thermal Model | D3 Ax0d02 C1 -| ^ | ^ | ^ | 01h 1 | ^ | Thermal Model activated | ^ | ^ -| 0x0CFE 3326 | float | EEPROM_THERMAL_MODEL_P | ??? | ff ff ff ffh | Thermal Model power (W) | Thermal Model | D3 Ax0cfe C4 -| 0x0CFA 3322 | float | EEPROM_THERMAL_MODEL_C | ??? | ff ff ff ffh | Thermal Model capacitance (J/K) | Thermal Model | D3 Ax0cfa C4 -| 0x0CBA 3258 |float[16]| EEPROM_THERMAL_MODEL_R | ??? | ff ff ff ffh | Thermal Model resistance (K/W) | Thermal Model | D3 Ax0cba C64 -| 0x0CB6 3254 | float | EEPROM_THERMAL_MODEL_Ta_corr | ??? | ff ff ff ffh | Thermal Model ambient temperature correction (K) | Thermal Model | D3 Ax0cb6 C4 -| 0x0CB2 3250 | float | EEPROM_THERMAL_MODEL_W | ??? | ff ff ff ffh | Thermal Model warning threshold (K/s) | Thermal Model | D3 Ax0cb2 C4 -| 0x0CAE 3246 | float | EEPROM_THERMAL_MODEL_E | ??? | ff ff ff ffh | Thermal Model error threshold (K/s) | Thermal Model | D3 Ax0cae C4 +| 0x0D02 3330 | uint8 | EEPROM_THERMAL_MODEL_ENABLE | 00h 0 | ff/00 | Thermal Model deactivated | Thermal Model| D3 Ax0d02 C1 +| ^ | ^ | ^ | 01h 1 | ^ | Thermal Model activated | ^ | ^ +| 0x0CFE 3326 | float | EEPROM_THERMAL_MODEL_P | ??? | ff ff ff ffh | Thermal Model power (W) | Thermal Model| D3 Ax0cfe C4 +| 0x0CFA 3322 | float | EEPROM_THERMAL_MODEL_C | ??? | ff ff ff ffh | Thermal Model capacitance (J/K) | Thermal Model| D3 Ax0cfa C4 +| 0x0CBA 3258 |float[16]| EEPROM_THERMAL_MODEL_R | ??? | ff ff ff ffh | Thermal Model resistance (K/W) | Thermal Model| D3 Ax0cba C64 +| 0x0CB6 3254 | float | EEPROM_THERMAL_MODEL_Ta_corr | ??? | ff ff ff ffh | Thermal Model ambient temperature correction (K) | Thermal Model| D3 Ax0cb6 C4 +| 0x0CB2 3250 | float | EEPROM_THERMAL_MODEL_W | ??? | ff ff ff ffh | Thermal Model warning threshold (K/s) | Thermal Model| D3 Ax0cb2 C4 +| 0x0CAE 3246 | float | EEPROM_THERMAL_MODEL_E | ??? | ff ff ff ffh | Thermal Model error threshold (K/s) | Thermal Model| D3 Ax0cae C4 | 0x0CAD 3245 | uint8 | EEPROM_FSENSOR_JAM_DETECTION | 01h 1 | ff/01 | fsensor pat9125 jam detection feature | LCD menu | D3 Ax0cad C1 | 0x0CAC 3244 | uint8 | EEPROM_MMU_ENABLED | 00h 0 | ff/00 | MMU enabled | LCD menu | D3 Ax0cac C1 | 0x0CA8 3240 | uint32 | EEPROM_MMU_MATERIAL_CHANGES | ??? | ff ff ff ffh | MMU toolchange counter over printers lifetime | LCD statistic| D3 Ax0ca8 C4 @@ -354,16 +354,16 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP | ^ | ^ | ^ | 01h 1 | ^ | Selftest passed | ^ | ^ | ^ | ^ | ^ | 02h 2 | ^ | XYZ cal passed | ^ | ^ | ^ | ^ | ^ | 04h 4 | ^ | Z cal passed | ^ | ^ -| ^ | ^ | ^ | 08h 8 | ^ | Thermal Model cal passed | ^ | ^ +| ^ | ^ | ^ | 08h 8 | ^ | Thermal Model cal passed | ^ | ^ | ^ | ^ | ^ | 10h 16 | ^ | Live Adjust set | ^ | ^ | ^ | ^ | ^ | 20h 32 | ^ | Free bit | ^ | ^ | ^ | ^ | ^ | 40h 64 | ^ | Free bit | ^ | ^ | ^ | ^ | ^ | 80h 128 | ^ | Unknown | ^ | ^ -| 0x0CA2 3234 | float | EEPROM_THERMAL_MODEL_U | ??? | ff ff ff ffh | Thermal Model linear temperature coefficient (W/K/W) | Thermal Model | D3 Ax0ca2 C4 -| 0x0C9E 3230 | float | EEPROM_THERMAL_MODEL_V | ??? | ff ff ff ffh | Thermal Model linear temperature intercept (W/W) | Thermal Model | D3 Ax0c9e C4 -| 0x0C9A 3226 | float | EEPROM_THERMAL_MODEL_D | ??? | ff ff ff ffh | Thermal Model sim. 1st order IIR filter factor | Thermal Model | D3 Ax0c9a C4 -| 0x0C98 3224 | uint16 | EEPROM_THERMAL_MODEL_L | 0-2160 | ff ffh | Thermal Model sim. response lag (ms) | Thermal Model | D3 Ax0c98 C2 -| 0x0C97 3223 | uint8 | EEPROM_THERMAL_MODEL_VER | 0-255 | ffh | Thermal Model Version | Thermal Model | D3 Ax0c97 C1 +| 0x0CA2 3234 | float | EEPROM_THERMAL_MODEL_U | ??? | ff ff ff ffh | Thermal Model linear temp coefficient (W/K/W) | Thermal Model| D3 Ax0ca2 C4 +| 0x0C9E 3230 | float | EEPROM_THERMAL_MODEL_V | ??? | ff ff ff ffh | Thermal Model linear temp intercept (W/W) | Thermal Model| D3 Ax0c9e C4 +| 0x0C9A 3226 | float | EEPROM_THERMAL_MODEL_D | ??? | ff ff ff ffh | Thermal Model sim. 1st order IIR filter factor | Thermal Model| D3 Ax0c9a C4 +| 0x0C98 3224 | uint16 | EEPROM_THERMAL_MODEL_L | 0-2160 | ff ffh | Thermal Model sim. response lag (ms) | Thermal Model| D3 Ax0c98 C2 +| 0x0C97 3223 | uint8 | EEPROM_THERMAL_MODEL_VER | 0-255 | ffh | Thermal Model Version | Thermal Model| D3 Ax0c97 C1 | 0x0C95 3221 | PGM_P | EEPROM_KILL_MESSAGE | 0-65535 | ff ffh | Kill message PGM pointer | kill() | D3 Ax0c95 C2 | 0x0C94 3220 | uint8 | EEPROM_KILL_PENDING_FLAG | 42h, ffh | ffh | Kill pending flag (0x42 magic value) | kill() | D3 Ax0c94 C1 From 8ae0e1952e655678e53a6583f3d556e6b1b6addd Mon Sep 17 00:00:00 2001 From: 3d-gussner <3d.gussner@gmail.com> Date: Wed, 24 May 2023 09:01:28 +0200 Subject: [PATCH 7/9] Rename `temp_model.h` to `thermal_model.h` `/temp_model` to `/thermal_model` `Temperature_model` to `Thermal_model` minor format in eeprom.h --- Firmware/Marlin_main.cpp | 2 +- Firmware/eeprom.h | 2 +- Firmware/thermal_model.h | 125 ++++++++++++++++++++++++++++++++ Firmware/thermal_model/e3d_v6.h | 19 +++++ 4 files changed, 146 insertions(+), 2 deletions(-) create mode 100644 Firmware/thermal_model.h create mode 100644 Firmware/thermal_model/e3d_v6.h diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index fd819ed25..5ea788e79 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -7332,7 +7332,7 @@ Sigma_Exit: #ifdef THERMAL_MODEL /*! - ### M310 - Thermal model settings M310: Thermal model settings + ### M310 - Thermal model settings M310: Thermal model settings #### Usage M310 ; report values diff --git a/Firmware/eeprom.h b/Firmware/eeprom.h index 4b0446a9e..cc6546b6f 100644 --- a/Firmware/eeprom.h +++ b/Firmware/eeprom.h @@ -92,7 +92,7 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP | 0x0FF7 4087 | uint8 | EEPROM_CALIBRATION_STATUS_V1 | ffh 255 | ffh 255 | Calibration status ( Date: Tue, 25 Jul 2023 17:24:02 +0200 Subject: [PATCH 8/9] Rebase update REVO and solve @wavexx comments --- Firmware/Marlin_main.cpp | 2 +- Firmware/menu.h | 6 +-- Firmware/temp_model/e3d_REVO.h | 19 --------- Firmware/temp_model/e3d_REVO_HF_60W.h | 19 --------- Firmware/thermal_model.h | 8 ++-- Firmware/thermal_model/e3d_REVO.h | 19 +++++++++ Firmware/thermal_model/e3d_REVO_HF_60W.h | 19 +++++++++ Firmware/ultralcd.h | 2 +- Firmware/util.h | 12 +++--- .../variants/1_75mm_MK3-EINSy10a-E3DREVO.h | 30 +++++++------- .../1_75mm_MK3-EINSy10a-E3DREVO_HF_60W.h | 30 +++++++------- .../variants/1_75mm_MK3S-EINSy10a-E3DREVO.h | 30 +++++++------- .../1_75mm_MK3S-EINSy10a-E3DREVO_HF_60W.h | 30 +++++++------- Firmware/variants/README.md | 40 +++++++++---------- 14 files changed, 133 insertions(+), 133 deletions(-) delete mode 100644 Firmware/temp_model/e3d_REVO.h delete mode 100644 Firmware/temp_model/e3d_REVO_HF_60W.h create mode 100644 Firmware/thermal_model/e3d_REVO.h create mode 100644 Firmware/thermal_model/e3d_REVO_HF_60W.h diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 5ea788e79..cb0e89102 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -7332,7 +7332,7 @@ Sigma_Exit: #ifdef THERMAL_MODEL /*! - ### M310 - Thermal model settings M310: Thermal model settings + ### M310 - Thermal model settings M310: Thermal model settings #### Usage M310 ; report values diff --git a/Firmware/menu.h b/Firmware/menu.h index 02692984e..f3425b81f 100755 --- a/Firmware/menu.h +++ b/Firmware/menu.h @@ -33,12 +33,12 @@ extern uint8_t menu_depth; //! definition of reasons blocking the main menu //! Use them as bit mask, so that the code may set various errors at the same time enum ESeriousErrors { - MENU_BLOCK_NONE = 0, - MENU_BLOCK_THERMAL_ERROR = 0x01, + MENU_BLOCK_NONE = 0, + MENU_BLOCK_THERMAL_ERROR = 0x01, #ifdef THERMAL_MODEL MENU_BLOCK_THERMAL_MODEL_AUTOTUNE = 0x02, #endif - MENU_BLOCK_STATUS_SCREEN_M0 = 0x04, + MENU_BLOCK_STATUS_SCREEN_M0 = 0x04, }; // and possibly others in the future. //! this is a flag for disabling entering the main menu and longpress. If this is set to anything != diff --git a/Firmware/temp_model/e3d_REVO.h b/Firmware/temp_model/e3d_REVO.h deleted file mode 100644 index d129cd11b..000000000 --- a/Firmware/temp_model/e3d_REVO.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -#define TEMP_MODEL_E3D_REVO_VER 1 // model parameters version - -#define TEMP_MODEL_E3D_REVO_P 40. // heater power (W) -#define TEMP_MODEL_E3D_REVO_U -0.0014 // linear temperature coefficient (W/K/power) -#define TEMP_MODEL_E3D_REVO_V 1.05 // linear temperature intercept (W/power) - -#define TEMP_MODEL_E3D_REVO_C 8.77 // initial guess for heatblock capacitance (J/K) -#define TEMP_MODEL_E3D_REVO_R 25.3 // initial guess for heatblock resistance (K/W) - -#define TEMP_MODEL_E3D_REVO_fS 0.15 // sim. 1st order IIR filter factor (f=100/27) -#define TEMP_MODEL_E3D_REVO_LAG 270 // sim. response lag (ms, 0-2160) - -#define TEMP_MODEL_E3D_REVO_W 0.85 // Default warning threshold (K/s) -#define TEMP_MODEL_E3D_REVO_E 1.23 // Default error threshold (K/s) - -// fall-back resistance vector (R0-15) -#define TEMP_MODEL_E3D_REVO_Rv {TEMP_MODEL_E3D_REVO_R, 23.9, 22.5, 19.6, 19.0, 18.3, 17.7, 17.1, 16.8, 16.5, 16.3, 16.0, 15.9, 15.7, 15.6, 15.4} diff --git a/Firmware/temp_model/e3d_REVO_HF_60W.h b/Firmware/temp_model/e3d_REVO_HF_60W.h deleted file mode 100644 index 1da2c22ea..000000000 --- a/Firmware/temp_model/e3d_REVO_HF_60W.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -#define TEMP_MODEL_E3D_REVO_HF_60W_VER 1 // model parameters version - -#define TEMP_MODEL_E3D_REVO_HF_60W_P 60. // heater power (W) -#define TEMP_MODEL_E3D_REVO_HF_60W_U -0.0014 // linear temperature coefficient (W/K/power) -#define TEMP_MODEL_E3D_REVO_HF_60W_V 1.05 // linear temperature intercept (W/power) - -#define TEMP_MODEL_E3D_REVO_HF_60W_C 9.10 // initial guess for heatblock capacitance (J/K) -#define TEMP_MODEL_E3D_REVO_HF_60W_R 30.6 // initial guess for heatblock resistance (K/W) - -#define TEMP_MODEL_E3D_REVO_HF_60W_fS 0.15 // sim. 1st order IIR filter factor (f=100/27) -#define TEMP_MODEL_E3D_REVO_HF_60W_LAG 270 // sim. response lag (ms, 0-2160) - -#define TEMP_MODEL_E3D_REVO_HF_60W_W 0.85 // Default warning threshold (K/s) -#define TEMP_MODEL_E3D_REVO_HF_60W_E 1.23 // Default error threshold (K/s) - -// fall-back resistance vector (R0-15) -#define TEMP_MODEL_E3D_REVO_HF_60W_Rv {TEMP_MODEL_E3D_REVO_HF_60W_R, 29.0, 27.5, 24.5, 23.4, 22.3, 21.2, 20.2, 19.8, 19.4, 19.0, 18.6, 18.3, 18.1, 17.9, 17.7} diff --git a/Firmware/thermal_model.h b/Firmware/thermal_model.h index 225c5c225..b5e696650 100644 --- a/Firmware/thermal_model.h +++ b/Firmware/thermal_model.h @@ -27,10 +27,10 @@ struct model_data { // temporary buffers float dT_lag_buf[THERMAL_MODEL_MAX_LAG_SIZE]; // transport delay buffer - uint8_t dT_lag_size = 0; // transport delay buffer size - uint8_t dT_lag_idx = 0; // transport delay buffer index - float dT_err_prev = 0; // previous temperature delta error - float T_prev = 0; // last temperature extruder + uint8_t dT_lag_size = 0; // transport delay buffer size + uint8_t dT_lag_idx = 0; // transport delay buffer index + float dT_err_prev = 0; // previous temperature delta error + float T_prev = 0; // last temperature extruder // configurable parameters float P; // heater power (W) diff --git a/Firmware/thermal_model/e3d_REVO.h b/Firmware/thermal_model/e3d_REVO.h new file mode 100644 index 000000000..a4fb355d5 --- /dev/null +++ b/Firmware/thermal_model/e3d_REVO.h @@ -0,0 +1,19 @@ +#pragma once + +#define THERMAL_MODEL_E3D_REVO_VER 1 // model parameters version + +#define THERMAL_MODEL_E3D_REVO_P 40. // heater power (W) +#define THERMAL_MODEL_E3D_REVO_U -0.0014 // linear temperature coefficient (W/K/power) +#define THERMAL_MODEL_E3D_REVO_V 1.05 // linear temperature intercept (W/power) + +#define THERMAL_MODEL_E3D_REVO_C 8.77 // initial guess for heatblock capacitance (J/K) +#define THERMAL_MODEL_E3D_REVO_R 25.3 // initial guess for heatblock resistance (K/W) + +#define THERMAL_MODEL_E3D_REVO_fS 0.15 // sim. 1st order IIR filter factor (f=100/27) +#define THERMAL_MODEL_E3D_REVO_LAG 270 // sim. response lag (ms, 0-2160) + +#define THERMAL_MODEL_E3D_REVO_W 0.85 // Default warning threshold (K/s) +#define THERMAL_MODEL_E3D_REVO_E 1.23 // Default error threshold (K/s) + +// fall-back resistance vector (R0-15) +#define THERMAL_MODEL_E3D_REVO_Rv {THERMAL_MODEL_E3D_REVO_R, 23.9, 22.5, 19.6, 19.0, 18.3, 17.7, 17.1, 16.8, 16.5, 16.3, 16.0, 15.9, 15.7, 15.6, 15.4} diff --git a/Firmware/thermal_model/e3d_REVO_HF_60W.h b/Firmware/thermal_model/e3d_REVO_HF_60W.h new file mode 100644 index 000000000..95c01a294 --- /dev/null +++ b/Firmware/thermal_model/e3d_REVO_HF_60W.h @@ -0,0 +1,19 @@ +#pragma once + +#define THERMAL_MODEL_E3D_REVO_HF_60W_VER 1 // model parameters version + +#define THERMAL_MODEL_E3D_REVO_HF_60W_P 60. // heater power (W) +#define THERMAL_MODEL_E3D_REVO_HF_60W_U -0.0014 // linear temperature coefficient (W/K/power) +#define THERMAL_MODEL_E3D_REVO_HF_60W_V 1.05 // linear temperature intercept (W/power) + +#define THERMAL_MODEL_E3D_REVO_HF_60W_C 9.10 // initial guess for heatblock capacitance (J/K) +#define THERMAL_MODEL_E3D_REVO_HF_60W_R 30.6 // initial guess for heatblock resistance (K/W) + +#define THERMAL_MODEL_E3D_REVO_HF_60W_fS 0.15 // sim. 1st order IIR filter factor (f=100/27) +#define THERMAL_MODEL_E3D_REVO_HF_60W_LAG 270 // sim. response lag (ms, 0-2160) + +#define THERMAL_MODEL_E3D_REVO_HF_60W_W 0.85 // Default warning threshold (K/s) +#define THERMAL_MODEL_E3D_REVO_HF_60W_E 1.23 // Default error threshold (K/s) + +// fall-back resistance vector (R0-15) +#define THERMAL_MODEL_E3D_REVO_HF_60W_Rv {THERMAL_MODEL_E3D_REVO_HF_60W_R, 29.0, 27.5, 24.5, 23.4, 22.3, 21.2, 20.2, 19.8, 19.4, 19.0, 18.6, 18.3, 18.1, 17.9, 17.7} diff --git a/Firmware/ultralcd.h b/Firmware/ultralcd.h index 5e5c7dba3..f17c5be33 100755 --- a/Firmware/ultralcd.h +++ b/Firmware/ultralcd.h @@ -226,7 +226,7 @@ enum class WizState : uint8_t Xyz, //!< xyz calibration Z, //!< z calibration #ifdef THERMAL_MODEL - ThermalModel, //!< Thermal Model calibration + ThermalModel, //!< Thermal Model calibration #endif //THERMAL_MODEL IsFil, //!< Is filament loaded? First step of 1st layer calibration Preheat, //!< Preheat for any material diff --git a/Firmware/util.h b/Firmware/util.h index 05adf3493..0fcf76824 100644 --- a/Firmware/util.h +++ b/Firmware/util.h @@ -103,14 +103,14 @@ extern void ip4_to_str(char* dest, uint8_t* IP); // Calibration status of the machine // (unsigned char*)EEPROM_CALIBRATION_STATUS_V2 typedef uint8_t CalibrationStatus; -const CalibrationStatus CALIBRATION_STATUS_SELFTEST = 0b00000001; // Selftest -const CalibrationStatus CALIBRATION_STATUS_XYZ = 0b00000010; // XYZ calibration -const CalibrationStatus CALIBRATION_STATUS_Z = 0b00000100; // Z calibration +const CalibrationStatus CALIBRATION_STATUS_SELFTEST = 0b00000001; // Selftest +const CalibrationStatus CALIBRATION_STATUS_XYZ = 0b00000010; // XYZ calibration +const CalibrationStatus CALIBRATION_STATUS_Z = 0b00000100; // Z calibration #ifdef THERMAL_MODEL -const CalibrationStatus CALIBRATION_STATUS_THERMAL_MODEL = 0b00001000; // Thermal model calibration +const CalibrationStatus CALIBRATION_STATUS_THERMAL_MODEL = 0b00001000; // Thermal model calibration #endif -const CalibrationStatus CALIBRATION_STATUS_LIVE_ADJUST = 0b00010000; // 1st layer calibration -const CalibrationStatus CALIBRATION_STATUS_UNKNOWN = 0b10000000; // Freshly assembled or unknown status +const CalibrationStatus CALIBRATION_STATUS_LIVE_ADJUST = 0b00010000; // 1st layer calibration +const CalibrationStatus CALIBRATION_STATUS_UNKNOWN = 0b10000000; // Freshly assembled or unknown status // Calibration steps performed by the wizard const CalibrationStatus CALIBRATION_WIZARD_STEPS = diff --git a/Firmware/variants/1_75mm_MK3-EINSy10a-E3DREVO.h b/Firmware/variants/1_75mm_MK3-EINSy10a-E3DREVO.h index 084e5fc69..1deab8178 100644 --- a/Firmware/variants/1_75mm_MK3-EINSy10a-E3DREVO.h +++ b/Firmware/variants/1_75mm_MK3-EINSy10a-E3DREVO.h @@ -381,26 +381,26 @@ #define TEMP_RUNAWAY_EXTRUDER_TIMEOUT 45 // model-based temperature check -#define TEMP_MODEL 1 // enable model-based temperature checks -#define TEMP_MODEL_DEBUG 1 // extended runtime logging +#define THERMAL_MODEL 1 // enable model-based temperature checks +#define THERMAL_MODEL_DEBUG 1 // extended runtime logging -#define TEMP_MODEL_CAL_C_low 5 // C estimation lower limit -#define TEMP_MODEL_CAL_C_high 20 // C estimation upper limit -#define TEMP_MODEL_CAL_C_thr 0.01 // C estimation iteration threshold -#define TEMP_MODEL_CAL_C_itr 30 // C estimation iteration limit +#define THERMAL_MODEL_CAL_C_low 5 // C estimation lower limit +#define THERMAL_MODEL_CAL_C_high 20 // C estimation upper limit +#define THERMAL_MODEL_CAL_C_thr 0.01 // C estimation iteration threshold +#define THERMAL_MODEL_CAL_C_itr 30 // C estimation iteration limit -#define TEMP_MODEL_CAL_R_low 5 // R estimation lower limit -#define TEMP_MODEL_CAL_R_high 50 // R estimation upper limit -#define TEMP_MODEL_CAL_R_thr 0.01 // R estimation iteration threshold -#define TEMP_MODEL_CAL_R_itr 30 // R estimation iteration limit +#define THERMAL_MODEL_CAL_R_low 5 // R estimation lower limit +#define THERMAL_MODEL_CAL_R_high 50 // R estimation upper limit +#define THERMAL_MODEL_CAL_R_thr 0.01 // R estimation iteration threshold +#define THERMAL_MODEL_CAL_R_itr 30 // R estimation iteration limit -#define TEMP_MODEL_CAL_T_low 50 // Default calibration cooling temperature (C) -#define TEMP_MODEL_CAL_T_high 230 // Default calibration working temperature (C) +#define THERMAL_MODEL_CAL_T_low 50 // Default calibration cooling temperature (C) +#define THERMAL_MODEL_CAL_T_high 230 // Default calibration working temperature (C) -#define TEMP_MODEL_Ta_corr -7 // Default ambient temperature correction +#define THERMAL_MODEL_Ta_corr -7 // Default ambient temperature correction -#include "temp_model/e3d_REVO.h" -#define TEMP_MODEL_DEFAULT E3D_REVO // Default E3D REVO model parameters +#include "thermal_model/e3d_REVO.h" +#define THERMAL_MODEL_DEFAULT E3D_REVO // Default E3D REVO model parameters /*------------------------------------ diff --git a/Firmware/variants/1_75mm_MK3-EINSy10a-E3DREVO_HF_60W.h b/Firmware/variants/1_75mm_MK3-EINSy10a-E3DREVO_HF_60W.h index 1985e9132..471e6c8b7 100644 --- a/Firmware/variants/1_75mm_MK3-EINSy10a-E3DREVO_HF_60W.h +++ b/Firmware/variants/1_75mm_MK3-EINSy10a-E3DREVO_HF_60W.h @@ -382,26 +382,26 @@ #define TEMP_RUNAWAY_EXTRUDER_TIMEOUT 45 // model-based temperature check -#define TEMP_MODEL 1 // enable model-based temperature checks -#define TEMP_MODEL_DEBUG 1 // extended runtime logging +#define THERMAL_MODEL 1 // enable model-based temperature checks +#define THERMAL_MODEL_DEBUG 1 // extended runtime logging -#define TEMP_MODEL_CAL_C_low 5 // C estimation lower limit -#define TEMP_MODEL_CAL_C_high 20 // C estimation upper limit -#define TEMP_MODEL_CAL_C_thr 0.01 // C estimation iteration threshold -#define TEMP_MODEL_CAL_C_itr 30 // C estimation iteration limit +#define THERMAL_MODEL_CAL_C_low 5 // C estimation lower limit +#define THERMAL_MODEL_CAL_C_high 20 // C estimation upper limit +#define THERMAL_MODEL_CAL_C_thr 0.01 // C estimation iteration threshold +#define THERMAL_MODEL_CAL_C_itr 30 // C estimation iteration limit -#define TEMP_MODEL_CAL_R_low 5 // R estimation lower limit -#define TEMP_MODEL_CAL_R_high 50 // R estimation upper limit -#define TEMP_MODEL_CAL_R_thr 0.01 // R estimation iteration threshold -#define TEMP_MODEL_CAL_R_itr 30 // R estimation iteration limit +#define THERMAL_MODEL_CAL_R_low 5 // R estimation lower limit +#define THERMAL_MODEL_CAL_R_high 50 // R estimation upper limit +#define THERMAL_MODEL_CAL_R_thr 0.01 // R estimation iteration threshold +#define THERMAL_MODEL_CAL_R_itr 30 // R estimation iteration limit -#define TEMP_MODEL_CAL_T_low 50 // Default calibration cooling temperature (C) -#define TEMP_MODEL_CAL_T_high 230 // Default calibration working temperature (C) +#define THERMAL_MODEL_CAL_T_low 50 // Default calibration cooling temperature (C) +#define THERMAL_MODEL_CAL_T_high 230 // Default calibration working temperature (C) -#define TEMP_MODEL_Ta_corr -7 // Default ambient temperature correction +#define THERMAL_MODEL_Ta_corr -7 // Default ambient temperature correction -#include "temp_model/e3d_REVO_HF_60W.h" -#define TEMP_MODEL_DEFAULT E3D_REVO_HF_60W // Default E3D REVO HF 60W model parameters +#include "thermal_model/e3d_REVO_HF_60W.h" +#define THERMAL_MODEL_DEFAULT E3D_REVO_HF_60W // Default E3D REVO HF 60W model parameters /*------------------------------------ diff --git a/Firmware/variants/1_75mm_MK3S-EINSy10a-E3DREVO.h b/Firmware/variants/1_75mm_MK3S-EINSy10a-E3DREVO.h index c688ce959..2ae876f58 100644 --- a/Firmware/variants/1_75mm_MK3S-EINSy10a-E3DREVO.h +++ b/Firmware/variants/1_75mm_MK3S-EINSy10a-E3DREVO.h @@ -385,26 +385,26 @@ #define TEMP_RUNAWAY_EXTRUDER_TIMEOUT 45 // model-based temperature check -#define TEMP_MODEL 1 // enable model-based temperature checks -#define TEMP_MODEL_DEBUG 1 // extended runtime logging +#define THERMAL_MODEL 1 // enable model-based temperature checks +#define THERMAL_MODEL_DEBUG 1 // extended runtime logging -#define TEMP_MODEL_CAL_C_low 5 // C estimation lower limit -#define TEMP_MODEL_CAL_C_high 20 // C estimation upper limit -#define TEMP_MODEL_CAL_C_thr 0.01 // C estimation iteration threshold -#define TEMP_MODEL_CAL_C_itr 30 // C estimation iteration limit +#define THERMAL_MODEL_CAL_C_low 5 // C estimation lower limit +#define THERMAL_MODEL_CAL_C_high 20 // C estimation upper limit +#define THERMAL_MODEL_CAL_C_thr 0.01 // C estimation iteration threshold +#define THERMAL_MODEL_CAL_C_itr 30 // C estimation iteration limit -#define TEMP_MODEL_CAL_R_low 5 // R estimation lower limit -#define TEMP_MODEL_CAL_R_high 50 // R estimation upper limit -#define TEMP_MODEL_CAL_R_thr 0.01 // R estimation iteration threshold -#define TEMP_MODEL_CAL_R_itr 30 // R estimation iteration limit +#define THERMAL_MODEL_CAL_R_low 5 // R estimation lower limit +#define THERMAL_MODEL_CAL_R_high 50 // R estimation upper limit +#define THERMAL_MODEL_CAL_R_thr 0.01 // R estimation iteration threshold +#define THERMAL_MODEL_CAL_R_itr 30 // R estimation iteration limit -#define TEMP_MODEL_CAL_T_low 50 // Default calibration cooling temperature (C) -#define TEMP_MODEL_CAL_T_high 230 // Default calibration working temperature (C) +#define THERMAL_MODEL_CAL_T_low 50 // Default calibration cooling temperature (C) +#define THERMAL_MODEL_CAL_T_high 230 // Default calibration working temperature (C) -#define TEMP_MODEL_Ta_corr -7 // Default ambient temperature correction +#define THERMAL_MODEL_Ta_corr -7 // Default ambient temperature correction -#include "temp_model/e3d_REVO.h" -#define TEMP_MODEL_DEFAULT E3D_REVO // Default E3D REVO model parameters +#include "thermal_model/e3d_REVO.h" +#define THERMAL_MODEL_DEFAULT E3D_REVO // Default E3D REVO model parameters /*------------------------------------ diff --git a/Firmware/variants/1_75mm_MK3S-EINSy10a-E3DREVO_HF_60W.h b/Firmware/variants/1_75mm_MK3S-EINSy10a-E3DREVO_HF_60W.h index 8125b93e3..bfaae1fc9 100644 --- a/Firmware/variants/1_75mm_MK3S-EINSy10a-E3DREVO_HF_60W.h +++ b/Firmware/variants/1_75mm_MK3S-EINSy10a-E3DREVO_HF_60W.h @@ -386,26 +386,26 @@ #define TEMP_RUNAWAY_EXTRUDER_TIMEOUT 45 // model-based temperature check -#define TEMP_MODEL 1 // enable model-based temperature checks -#define TEMP_MODEL_DEBUG 1 // extended runtime logging +#define THERMAL_MODEL 1 // enable model-based temperature checks +#define THERMAL_MODEL_DEBUG 1 // extended runtime logging -#define TEMP_MODEL_CAL_C_low 5 // C estimation lower limit -#define TEMP_MODEL_CAL_C_high 20 // C estimation upper limit -#define TEMP_MODEL_CAL_C_thr 0.01 // C estimation iteration threshold -#define TEMP_MODEL_CAL_C_itr 30 // C estimation iteration limit +#define THERMAL_MODEL_CAL_C_low 5 // C estimation lower limit +#define THERMAL_MODEL_CAL_C_high 20 // C estimation upper limit +#define THERMAL_MODEL_CAL_C_thr 0.01 // C estimation iteration threshold +#define THERMAL_MODEL_CAL_C_itr 30 // C estimation iteration limit -#define TEMP_MODEL_CAL_R_low 5 // R estimation lower limit -#define TEMP_MODEL_CAL_R_high 50 // R estimation upper limit -#define TEMP_MODEL_CAL_R_thr 0.01 // R estimation iteration threshold -#define TEMP_MODEL_CAL_R_itr 30 // R estimation iteration limit +#define THERMAL_MODEL_CAL_R_low 5 // R estimation lower limit +#define THERMAL_MODEL_CAL_R_high 50 // R estimation upper limit +#define THERMAL_MODEL_CAL_R_thr 0.01 // R estimation iteration threshold +#define THERMAL_MODEL_CAL_R_itr 30 // R estimation iteration limit -#define TEMP_MODEL_CAL_T_low 50 // Default calibration cooling temperature (C) -#define TEMP_MODEL_CAL_T_high 230 // Default calibration working temperature (C) +#define THERMAL_MODEL_CAL_T_low 50 // Default calibration cooling temperature (C) +#define THERMAL_MODEL_CAL_T_high 230 // Default calibration working temperature (C) -#define TEMP_MODEL_Ta_corr -7 // Default ambient temperature correction +#define THERMAL_MODEL_Ta_corr -7 // Default ambient temperature correction -#include "temp_model/e3d_REVO_HF_60W.h" -#define TEMP_MODEL_DEFAULT E3D_REVO_HF_60W // Default E3D REVO HF 60W model parameters +#include "thermal_model/e3d_REVO_HF_60W.h" +#define THERMAL_MODEL_DEFAULT E3D_REVO_HF_60W // Default E3D REVO HF 60W model parameters /*------------------------------------ diff --git a/Firmware/variants/README.md b/Firmware/variants/README.md index 6bb981304..8b85bda16 100644 --- a/Firmware/variants/README.md +++ b/Firmware/variants/README.md @@ -65,48 +65,48 @@ Example: ... ``` 8. Prepare for new 3rd party hotend TM value file - - Search for `#include "temp_model/e3d_v6.h"` + - Search for `#include "thermal_model/e3d_v6.h"` - Change the `e3d_v6.h` to `<3rd party hotend:16>.h` - Change below the `E3D_V6` to `<3rd party hotend:16>` ``` ... - #include "temp_model/e3d_v6.h" - #define TEMP_MODEL_DEFAULT E3D_V6 // Default E3D v6 model parameters + #include "thermal_model/e3d_v6.h" + #define THERMAL_MODEL_DEFAULT E3D_V6 // Default E3D v6 model parameters ... ``` Example: ``` ... - #include "temp_model/e3d_REVO_HF_60W.h" - #define TEMP_MODEL_DEFAULT E3D_REVO_HF_60W // Default E3D REVO HF 60W model parameters + #include "thermal_model/e3d_REVO_HF_60W.h" + #define THERMAL_MODEL_DEFAULT E3D_REVO_HF_60W // Default E3D REVO HF 60W model parameters ... ``` 9. Save and close the new variant file -10. Copy/paste `Firmware/temp_model/e3d_v6.h` as `Firmware/temp_model/<3rd party hotend:16>.h` - - Example: `Firmware/temp_model/e3d_REVO_HF_60W.h` -11. Open the new file `Firmware/temp_model/<3rd party hotend:16>.h` -12. Search `E3D_V6` and replace it with what you have used in `#defined TEMP_MODEL_DEFAULT` +10. Copy/paste `Firmware/thermal_model/e3d_v6.h` as `Firmware/thermal_model/<3rd party hotend:16>.h` + - Example: `Firmware/thermal_model/e3d_REVO_HF_60W.h` +11. Open the new file `Firmware/thermal_model/<3rd party hotend:16>.h` +12. Search `E3D_V6` and replace it with what you have used in `#defined THERMAL_MODEL_DEFAULT` - Example ``` #pragma once - #define TEMP_MODEL_E3D_REVO_HF_60W_VER 1 // model parameters version + #define THERMAL_MODEL_E3D_REVO_HF_60W_VER 1 // model parameters version - #define TEMP_MODEL_E3D_REVO_HF_60W_P 60. // heater power (W) - #define TEMP_MODEL_E3D_REVO_HF_60W_U -0.0014 // linear temperature coefficient (W/K/power) - #define TEMP_MODEL_E3D_REVO_HF_60W_V 1.05 // linear temperature intercept (W/power) + #define THERMAL_MODEL_E3D_REVO_HF_60W_P 60. // heater power (W) + #define THERMAL_MODEL_E3D_REVO_HF_60W_U -0.0014 // linear temperature coefficient (W/K/power) + #define THERMAL_MODEL_E3D_REVO_HF_60W_V 1.05 // linear temperature intercept (W/power) - #define TEMP_MODEL_E3D_REVO_HF_60W_C 8.77 // initial guess for heatblock capacitance (J/K) - #define TEMP_MODEL_E3D_REVO_HF_60W_R 25.3 // initial guess for heatblock resistance (K/W) + #define THERMAL_MODEL_E3D_REVO_HF_60W_C 8.77 // initial guess for heatblock capacitance (J/K) + #define THERMAL_MODEL_E3D_REVO_HF_60W_R 25.3 // initial guess for heatblock resistance (K/W) - #define TEMP_MODEL_E3D_REVO_HF_60W_fS 0.15 // sim. 1st order IIR filter factor (f=100/27) - #define TEMP_MODEL_E3D_REVO_HF_60W_LAG 270 // sim. response lag (ms, 0-2160) + #define THERMAL_MODEL_E3D_REVO_HF_60W_fS 0.15 // sim. 1st order IIR filter factor (f=100/27) + #define THERMAL_MODEL_E3D_REVO_HF_60W_LAG 270 // sim. response lag (ms, 0-2160) - #define TEMP_MODEL_E3D_REVO_HF_60W_W 1.2 // Default warning threshold (K/s) - #define TEMP_MODEL_E3D_REVO_HF_60W_E 1.74 // Default error threshold (K/s) + #define THERMAL_MODEL_E3D_REVO_HF_60W_W 1.2 // Default warning threshold (K/s) + #define THERMAL_MODEL_E3D_REVO_HF_60W_E 1.74 // Default error threshold (K/s) // fall-back resistance vector (R0-15) - #define TEMP_MODEL_E3D_REVO_HF_60W_Rv {TEMP_MODEL_E3D_REVO_HF_60W_R, 23.9, 22.5, 19.6, 19.0, 18.3, 17.7, 17.1, 16.8, 16.5, 16.3, 16.0, 15.9, 15.7, 15.6, 15.4} + #define THERMAL_MODEL_E3D_REVO_HF_60W_Rv {THERMAL_MODEL_E3D_REVO_HF_60W_R, 23.9, 22.5, 19.6, 19.0, 18.3, 17.7, 17.1, 16.8, 16.5, 16.3, 16.0, 15.9, 15.7, 15.6, 15.4} ``` From 897d05d2685abd0e093225e01a0c87c46157eddd Mon Sep 17 00:00:00 2001 From: 3d-gussner <3d.gussner@gmail.com> Date: Wed, 26 Jul 2023 09:33:16 +0200 Subject: [PATCH 9/9] Fix @wavexx complains --- Firmware/thermal_model.h | 2 +- lang/po/Firmware_cs.po | 3 --- lang/po/Firmware_de.po | 3 --- lang/po/Firmware_es.po | 3 --- lang/po/Firmware_fr.po | 3 --- lang/po/Firmware_hr.po | 3 --- lang/po/Firmware_hu.po | 3 --- lang/po/Firmware_it.po | 3 --- lang/po/Firmware_nl.po | 3 --- lang/po/Firmware_no.po | 3 --- lang/po/Firmware_pl.po | 3 --- lang/po/Firmware_ro.po | 3 --- lang/po/Firmware_sk.po | 3 --- lang/po/Firmware_sv.po | 3 --- 14 files changed, 1 insertion(+), 40 deletions(-) diff --git a/Firmware/thermal_model.h b/Firmware/thermal_model.h index b5e696650..c0162fa62 100644 --- a/Firmware/thermal_model.h +++ b/Firmware/thermal_model.h @@ -39,7 +39,7 @@ struct model_data float C; // heatblock capacitance (J/K) float fS; // sim. 1st order IIR filter factor (f=100/27) uint16_t L; // sim. response lag (ms) - float R[THERMAL_MODEL_R_SIZE]; // heatblock resistance for all fan levels (K/W) + float R[THERMAL_MODEL_R_SIZE]; // heatblock resistance for all fan levels (K/W) float Ta_corr; // ambient temperature correction (K) // thresholds diff --git a/lang/po/Firmware_cs.po b/lang/po/Firmware_cs.po index 9e6629887..520cc667f 100644 --- a/lang/po/Firmware_cs.po +++ b/lang/po/Firmware_cs.po @@ -2614,6 +2614,3 @@ msgstr "Došlo k neočekávané chybě." #~ msgid "TM autotune failed" #~ msgstr "TM ladeni selhalo" - -#~ msgid "Temp. model autotune" -#~ msgstr "Ladeni tepl. modelu" diff --git a/lang/po/Firmware_de.po b/lang/po/Firmware_de.po index 9580a7ed6..b0f4cdbd6 100644 --- a/lang/po/Firmware_de.po +++ b/lang/po/Firmware_de.po @@ -2642,6 +2642,3 @@ msgstr "Ein unerwarteter Fehler ist aufgetreten." #~ msgid "TM autotune failed" #~ msgstr "TM kal. fehlgeschlg." - -#~ msgid "Temp. model autotune" -#~ msgstr "Temp. Model Autokal." diff --git a/lang/po/Firmware_es.po b/lang/po/Firmware_es.po index ebe25e949..d9a0ad27a 100644 --- a/lang/po/Firmware_es.po +++ b/lang/po/Firmware_es.po @@ -2638,6 +2638,3 @@ msgstr "Ocurrió un error inesperado." #~ msgid "TM autotune failed" #~ msgstr "Fallo autotune TM" - -#~ msgid "Temp. model autotune" -#~ msgstr "Autotune model temp." diff --git a/lang/po/Firmware_fr.po b/lang/po/Firmware_fr.po index a3c16dcbb..f8667dfa8 100644 --- a/lang/po/Firmware_fr.po +++ b/lang/po/Firmware_fr.po @@ -2653,6 +2653,3 @@ msgstr "Une erreur inattendue s'est produite." #~ msgid "TM autotune failed" #~ msgstr "Echec regl. auto MT" - -#~ msgid "Temp. model autotune" -#~ msgstr "Regl. auto mod temp." diff --git a/lang/po/Firmware_hr.po b/lang/po/Firmware_hr.po index dd5c271c5..1a0d02f0d 100644 --- a/lang/po/Firmware_hr.po +++ b/lang/po/Firmware_hr.po @@ -2635,9 +2635,6 @@ msgstr "Došlo je do neočekivane pogreške." #~ msgid "TM autotune failed" #~ msgstr "TM autotune nije usp" -#~ msgid "Temp. model autotune" -#~ msgstr "Temp. autptune model" - #~ msgid "" #~ "XYZ calibration compromised. Left front calibration point not reachable." #~ msgstr "" diff --git a/lang/po/Firmware_hu.po b/lang/po/Firmware_hu.po index d474e4a82..748e426c6 100644 --- a/lang/po/Firmware_hu.po +++ b/lang/po/Firmware_hu.po @@ -2637,9 +2637,6 @@ msgstr "Váratlan hiba történt." #~ msgid "TM autotune failed" #~ msgstr "HM kalib. sikertelen" -#~ msgid "Temp. model autotune" -#~ msgstr "Homers. modell kalib" - #~ msgid "" #~ "XYZ calibration compromised. Left front calibration point not reachable." #~ msgstr "XYZ kalibracio nem jo. Bal elso kal. pont nem elerheto." diff --git a/lang/po/Firmware_it.po b/lang/po/Firmware_it.po index 0c7a51b1b..a88f94c0d 100644 --- a/lang/po/Firmware_it.po +++ b/lang/po/Firmware_it.po @@ -2636,9 +2636,6 @@ msgstr "Si è verificato un errore imprevisto." #~ msgid "TM autotune failed" #~ msgstr "Autocal. MT fallita" -#~ msgid "Temp. model autotune" -#~ msgstr "Cal. modello termico" - #~ msgid "" #~ "XYZ calibration compromised. Left front calibration point not reachable." #~ msgstr "" diff --git a/lang/po/Firmware_nl.po b/lang/po/Firmware_nl.po index c7354246c..4cfc4672d 100644 --- a/lang/po/Firmware_nl.po +++ b/lang/po/Firmware_nl.po @@ -2641,8 +2641,5 @@ msgstr "Er is een onverwachte fout opgetreden." #~ msgid "TM autotune failed" #~ msgstr "TM autotune mislukt" -#~ msgid "Temp. model autotune" -#~ msgstr "Temp. model autotune" - #~ msgid "XYZ calibration failed. Left front calibration point not reachable." #~ msgstr "XYZ-kalibratie mislukt. Kalibratiepunt linksvoor niet bereikbaar." diff --git a/lang/po/Firmware_no.po b/lang/po/Firmware_no.po index 91f5b349d..d366ccb94 100644 --- a/lang/po/Firmware_no.po +++ b/lang/po/Firmware_no.po @@ -2613,9 +2613,6 @@ msgstr "Det oppstod en uventet feil." #~ msgid "TM autotune failed" #~ msgstr "TM autotune feilet" -#~ msgid "Temp. model autotune" -#~ msgstr "Temp. model autotune" - #~ msgid "" #~ "XYZ calibration compromised. Left front calibration point not reachable." #~ msgstr "XYZ kalibrasjon feilet. Fremre venstre kalibrerings kan ikke nås." diff --git a/lang/po/Firmware_pl.po b/lang/po/Firmware_pl.po index 45da80996..e11d54156 100644 --- a/lang/po/Firmware_pl.po +++ b/lang/po/Firmware_pl.po @@ -2631,6 +2631,3 @@ msgstr "Pojawił się nieoczekiwany błąd." #~ msgid "TM autotune failed" #~ msgstr "Blad TM autotune" - -#~ msgid "Temp. model autotune" -#~ msgstr "Autotune modelu temp" diff --git a/lang/po/Firmware_ro.po b/lang/po/Firmware_ro.po index 4baa82ad5..3a152f702 100644 --- a/lang/po/Firmware_ro.po +++ b/lang/po/Firmware_ro.po @@ -2633,9 +2633,6 @@ msgstr "A apărut o eroare neașteptată." #~ msgid "TM autotune failed" #~ msgstr "Autotune TM esuat" -#~ msgid "Temp. model autotune" -#~ msgstr "Temp. model autotune" - #~ msgid "" #~ "XYZ calibration compromised. Left front calibration point not reachable." #~ msgstr "" diff --git a/lang/po/Firmware_sk.po b/lang/po/Firmware_sk.po index e4bdbf079..457b2ba72 100644 --- a/lang/po/Firmware_sk.po +++ b/lang/po/Firmware_sk.po @@ -2616,9 +2616,6 @@ msgstr "Vyskytla sa neočakávaná chyba." #~ msgid "TM autotune failed" #~ msgstr "TM autotune failed" -#~ msgid "Temp. model autotune" -#~ msgstr "Autom. nast. teploty" - #~ msgid "" #~ "XYZ calibration compromised. Left front calibration point not reachable." #~ msgstr "Kalibracia XYZ je nepresna. Lavy predny bod je nedostupny." diff --git a/lang/po/Firmware_sv.po b/lang/po/Firmware_sv.po index 6eb0e45bf..d92ee3c60 100644 --- a/lang/po/Firmware_sv.po +++ b/lang/po/Firmware_sv.po @@ -2625,9 +2625,6 @@ msgstr "Ett oväntat fel inträffade." #~ msgid "TM autotune failed" #~ msgstr "TM autoinst fallerad" -#~ msgid "Temp. model autotune" -#~ msgstr "Thermal Modell autoinst" - #~ msgid "" #~ "XYZ calibration compromised. Left front calibration point not reachable." #~ msgstr ""