Merge pull request #4224 from 3d-gussner/MK3_Rename_Thermal_model

Rename temp model to thermal model
This commit is contained in:
3d-gussner 2023-07-26 16:37:48 +02:00 committed by GitHub
commit cc84e326fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
39 changed files with 496 additions and 535 deletions

View File

@ -103,8 +103,8 @@ void Config_PrintSettings(uint8_t level)
printf_P(PSTR( 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"), "%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); 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
temp_model_report_settings(); thermal_model_report_settings();
#endif #endif
} }
#endif #endif
@ -182,8 +182,8 @@ void Config_StoreSettings()
{ {
strcpy_P(cs.version, default_conf.version); strcpy_P(cs.version, default_conf.version);
eeprom_update_block(reinterpret_cast<uint8_t*>(&cs), reinterpret_cast<uint8_t*>(EEPROM_M500_base), sizeof(cs)); eeprom_update_block(reinterpret_cast<uint8_t*>(&cs), reinterpret_cast<uint8_t*>(EEPROM_M500_base), sizeof(cs));
#ifdef TEMP_MODEL #ifdef THERMAL_MODEL
temp_model_save_settings(); thermal_model_save_settings();
#endif #endif
SERIAL_ECHO_START; SERIAL_ECHO_START;
@ -246,8 +246,8 @@ bool Config_RetrieveSettings()
// Call updatePID (similar to when we have processed M301) // Call updatePID (similar to when we have processed M301)
updatePID(); updatePID();
#ifdef TEMP_MODEL #ifdef THERMAL_MODEL
temp_model_load_settings(); thermal_model_load_settings();
#endif #endif
SERIAL_ECHO_START; SERIAL_ECHO_START;
@ -276,8 +276,8 @@ void Config_ResetDefault()
#ifdef PIDTEMP #ifdef PIDTEMP
updatePID(); updatePID();
#endif//PIDTEMP #endif//PIDTEMP
#ifdef TEMP_MODEL #ifdef THERMAL_MODEL
temp_model_reset_settings(); thermal_model_reset_settings();
#endif #endif
calculate_extruder_multipliers(); calculate_extruder_multipliers();

View File

@ -1550,10 +1550,10 @@ void setup()
// warn about other important steps individually // warn about other important steps individually
if (!calibration_status_get(CALIBRATION_STATUS_LIVE_ADJUST)) if (!calibration_status_get(CALIBRATION_STATUS_LIVE_ADJUST))
lcd_show_fullscreen_message_and_wait_P(_T(MSG_BABYSTEP_Z_NOT_SET)); lcd_show_fullscreen_message_and_wait_P(_T(MSG_BABYSTEP_Z_NOT_SET));
#ifdef TEMP_MODEL #ifdef THERMAL_MODEL
if (!calibration_status_get(CALIBRATION_STATUS_TEMP_MODEL) && temp_model_enabled()) if (!calibration_status_get(CALIBRATION_STATUS_THERMAL_MODEL) && thermal_model_enabled())
lcd_show_fullscreen_message_and_wait_P(_T(MSG_TM_NOT_CAL)); lcd_show_fullscreen_message_and_wait_P(_T(MSG_TM_NOT_CAL));
#endif //TEMP_MODEL #endif //THERMAL_MODEL
} }
} }
@ -3932,7 +3932,7 @@ extern uint8_t st_backlash_y;
//!@n M302 - Allow cold extrudes, or set the minimum extrude S<temperature>. //!@n M302 - Allow cold extrudes, or set the minimum extrude S<temperature>.
//!@n M303 - PID relay autotune S<temperature> sets the target temperature. (default target temperature = 150C) //!@n M303 - PID relay autotune S<temperature> sets the target temperature. (default target temperature = 150C)
//!@n M304 - Set bed PID parameters P I and D //!@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 M400 - Finish all moves
//!@n M401 - Lower z-probe if present //!@n M401 - Lower z-probe if present
//!@n M402 - Raise z-probe if present //!@n M402 - Raise z-probe if present
@ -7330,9 +7330,9 @@ Sigma_Exit:
} }
break; break;
#ifdef TEMP_MODEL #ifdef THERMAL_MODEL
/*! /*!
### M310 - Temperature model settings <a href="https://reprap.org/wiki/G-code#M310:_Temperature_model_settings">M310: Temperature model settings</a> ### M310 - Thermal model settings <a href="https://reprap.org/wiki/G-code#M310:_Thermal_model_settings">M310: Thermal model settings</a>
#### Usage #### Usage
M310 ; report values M310 ; report values
@ -7386,23 +7386,23 @@ Sigma_Exit:
// report values if nothing has been requested // 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) 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) { && I < 0 && S < 0 && B < 0 && A < 0 && L < 0) {
temp_model_report_settings(); thermal_model_report_settings();
break; break;
} }
// update all parameters // update all parameters
if(B >= 0) 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)) 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)) if(I >= 0 && !isnan(R))
temp_model_set_resistance(I, R); thermal_model_set_resistance(I, R);
// enable the model last, if requested // enable the model last, if requested
if(S >= 0) temp_model_set_enabled(S); if(S >= 0) thermal_model_set_enabled(S);
// run autotune // run autotune
if(A >= 0) temp_model_autotune(A, F > 0); if(A >= 0) thermal_model_autotune(A, F > 0);
} }
break; break;
#endif #endif
@ -8878,9 +8878,9 @@ Sigma_Exit:
}; };
#endif #endif
#ifdef TEMP_MODEL_DEBUG #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 #### Usage
D70 [ S ] D70 [ S ]
@ -8890,7 +8890,7 @@ Sigma_Exit:
*/ */
case 70: { case 70: {
if(code_seen('S')) if(code_seen('S'))
temp_model_log_enable(code_value_short()); thermal_model_log_enable(code_value_short());
break; break;
} }
#endif #endif

View File

@ -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 (<v3.12) | ??? | D3 Ax0ff7 C1 | 0x0FF7 4087 | uint8 | EEPROM_CALIBRATION_STATUS_V1 | ffh 255 | ffh 255 | Calibration status (<v3.12) | ??? | D3 Ax0ff7 C1
| ^ | ^ | ^ | 01h 1 | ^ | Calibrated | ^ | ^ | ^ | ^ | ^ | 01h 1 | ^ | Calibrated | ^ | ^
| ^ | ^ | ^ | e6h 230 | ^ | needs Live Z adjustment | ^ | ^ | ^ | ^ | ^ | e6h 230 | ^ | needs Live Z adjustment | ^ | ^
| ^ | ^ | ^ | ebh 235 | ^ | needs Temp Model calibration | ^ | ^ | ^ | ^ | ^ | ebh 235 | ^ | needs Thermal Model calibration | ^ | ^
| ^ | ^ | ^ | f0h 240 | ^ __P__ | needs Z calibration | ^ | ^ | ^ | ^ | ^ | f0h 240 | ^ __P__ | needs Z calibration | ^ | ^
| ^ | ^ | ^ | fah 250 | ^ | needs XYZ calibration | ^ | ^ | ^ | ^ | ^ | fah 250 | ^ | needs XYZ calibration | ^ | ^
| ^ | ^ | ^ | 00h 0 | ^ | Unknown (legacy) | ^ | ^ | ^ | ^ | ^ | 00h 0 | ^ | Unknown (legacy) | ^ | ^
@ -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 | 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 | 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 | 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 | 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 | ^ | ^ | ^ | 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 | 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 | ^ | ^ | ^ | ^ | ^ | 03h 3 | ^ | bad_isr | ^ | ^
| ^ | ^ | ^ | 04h 4 | ^ | bad_pullup_temp_isr | ^ | ^ | ^ | ^ | ^ | 04h 4 | ^ | bad_pullup_temp_isr | ^ | ^
| ^ | ^ | ^ | 05h 5 | ^ | bad_pullup_step_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 | Thermal Model deactivated | Thermal Model| D3 Ax0d02 C1
| ^ | ^ | ^ | 01h 1 | ^ | Temp model activated | ^ | ^ | ^ | ^ | ^ | 01h 1 | ^ | Thermal Model activated | ^ | ^
| 0x0CFE 3326 | float | EEPROM_TEMP_MODEL_P | ??? | ff ff ff ffh | Temp model power (W) | Temp model | D3 Ax0cfe C4 | 0x0CFE 3326 | float | EEPROM_THERMAL_MODEL_P | ??? | ff ff ff ffh | Thermal Model power (W) | Thermal 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 | 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_TEMP_MODEL_R | ??? | ff ff ff ffh | Temp model resistance (K/W) | Temp model | D3 Ax0cba C64 | 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_TEMP_MODEL_Ta_corr | ??? | ff ff ff ffh | Temp model ambient temperature correction (K) | Temp model | D3 Ax0cb6 C4 | 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_TEMP_MODEL_W | ??? | ff ff ff ffh | Temp model warning threshold (K/s) | Temp model | D3 Ax0cb2 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_TEMP_MODEL_E | ??? | ff ff ff ffh | Temp model error threshold (K/s) | Temp model | D3 Ax0cae 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 | 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 | 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 | 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 | ^ | ^ | ^ | ^ | ^ | 01h 1 | ^ | Selftest passed | ^ | ^
| ^ | ^ | ^ | 02h 2 | ^ | XYZ cal passed | ^ | ^ | ^ | ^ | ^ | 02h 2 | ^ | XYZ cal passed | ^ | ^
| ^ | ^ | ^ | 04h 4 | ^ | Z cal passed | ^ | ^ | ^ | ^ | ^ | 04h 4 | ^ | Z cal passed | ^ | ^
| ^ | ^ | ^ | 08h 8 | ^ | Temp model cal passed | ^ | ^ | ^ | ^ | ^ | 08h 8 | ^ | Thermal Model cal passed | ^ | ^
| ^ | ^ | ^ | 10h 16 | ^ | Live Adjust set | ^ | ^ | ^ | ^ | ^ | 10h 16 | ^ | Live Adjust set | ^ | ^
| ^ | ^ | ^ | 20h 32 | ^ | Free bit | ^ | ^ | ^ | ^ | ^ | 20h 32 | ^ | Free bit | ^ | ^
| ^ | ^ | ^ | 40h 64 | ^ | Free bit | ^ | ^ | ^ | ^ | ^ | 40h 64 | ^ | Free bit | ^ | ^
| ^ | ^ | ^ | 80h 128 | ^ | Unknown | ^ | ^ | ^ | ^ | ^ | 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 | 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_TEMP_MODEL_V | ??? | ff ff ff ffh | Temp model linear temperature intercept (W/W) | Temp model | D3 Ax0c9e 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_TEMP_MODEL_D | ??? | ff ff ff ffh | Temp model sim. 1st order IIR filter factor | Temp model | D3 Ax0c9a 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_TEMP_MODEL_L | 0-2160 | ff ffh | Temp model sim. response lag (ms) | Temp model | D3 Ax0c98 C2 | 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_TEMP_MODEL_VER | 0-255 | ffh | Temp model Version | Temp model | D3 Ax0c97 C1 | 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 | 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 | 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_ECOOL_ENABLE (EEPROM_JOB_ID-1) // uint8_t
#define EEPROM_FW_CRASH_FLAG (EEPROM_ECOOL_ENABLE-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_THERMAL_MODEL_ENABLE (EEPROM_FW_CRASH_FLAG-1) // uint8_t
#define EEPROM_TEMP_MODEL_P (EEPROM_TEMP_MODEL_ENABLE-4) // float #define EEPROM_THERMAL_MODEL_P (EEPROM_THERMAL_MODEL_ENABLE-4) // float
#define EEPROM_TEMP_MODEL_C (EEPROM_TEMP_MODEL_P-4) // float #define EEPROM_THERMAL_MODEL_C (EEPROM_THERMAL_MODEL_P-4) // float
#define EEPROM_TEMP_MODEL_R (EEPROM_TEMP_MODEL_C-4*16) // float[16] #define EEPROM_THERMAL_MODEL_R (EEPROM_THERMAL_MODEL_C-4*16) // float[16]
#define EEPROM_TEMP_MODEL_Ta_corr (EEPROM_TEMP_MODEL_R-4) // float #define EEPROM_THERMAL_MODEL_Ta_corr (EEPROM_THERMAL_MODEL_R-4) // float
#define EEPROM_TEMP_MODEL_W (EEPROM_TEMP_MODEL_Ta_corr-4) // float #define EEPROM_THERMAL_MODEL_W (EEPROM_THERMAL_MODEL_Ta_corr-4) // float
#define EEPROM_TEMP_MODEL_E (EEPROM_TEMP_MODEL_W-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_ENABLED (EEPROM_FSENSOR_JAM_DETECTION-1) // uint8_t
#define EEPROM_MMU_MATERIAL_CHANGES (EEPROM_MMU_ENABLED-4) // uint32_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_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_CALIBRATION_STATUS_V2 (EEPROM_HEAT_BED_ON_LOAD_FILAMENT-1) //uint8
#define EEPROM_TEMP_MODEL_U (EEPROM_CALIBRATION_STATUS_V2-4) //float #define EEPROM_THERMAL_MODEL_U (EEPROM_CALIBRATION_STATUS_V2-4) //float
#define EEPROM_TEMP_MODEL_V (EEPROM_TEMP_MODEL_U-4) //float #define EEPROM_THERMAL_MODEL_V (EEPROM_THERMAL_MODEL_U-4) //float
#define EEPROM_TEMP_MODEL_D (EEPROM_TEMP_MODEL_V-4) //float #define EEPROM_THERMAL_MODEL_D (EEPROM_THERMAL_MODEL_V-4) //float
#define EEPROM_TEMP_MODEL_L (EEPROM_TEMP_MODEL_D-2) //uint16_t #define EEPROM_THERMAL_MODEL_L (EEPROM_THERMAL_MODEL_D-2) //uint16_t
#define EEPROM_TEMP_MODEL_VER (EEPROM_TEMP_MODEL_L-1) //uint8_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 #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. //This is supposed to point to last item to allow EEPROM overrun check. Please update when adding new items.

View File

@ -33,12 +33,12 @@ extern uint8_t menu_depth;
//! definition of reasons blocking the main menu //! definition of reasons blocking the main menu
//! Use them as bit mask, so that the code may set various errors at the same time //! Use them as bit mask, so that the code may set various errors at the same time
enum ESeriousErrors { enum ESeriousErrors {
MENU_BLOCK_NONE = 0, MENU_BLOCK_NONE = 0,
MENU_BLOCK_THERMAL_ERROR = 0x01, MENU_BLOCK_THERMAL_ERROR = 0x01,
#ifdef TEMP_MODEL #ifdef THERMAL_MODEL
MENU_BLOCK_TEMP_MODEL_AUTOTUNE = 0x02, MENU_BLOCK_THERMAL_MODEL_AUTOTUNE = 0x02,
#endif #endif
MENU_BLOCK_STATUS_SCREEN_M0 = 0x04, MENU_BLOCK_STATUS_SCREEN_M0 = 0x04,
}; // and possibly others in the future. }; // and possibly others in the future.
//! this is a flag for disabling entering the main menu and longpress. If this is set to anything != //! this is a flag for disabling entering the main menu and longpress. If this is set to anything !=

View File

@ -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 const char MSG_IR_UNKNOWN[] PROGMEM_I1 = ISTR("unknown state");////MSG_IR_UNKNOWN c=18
#endif #endif
extern const char MSG_PAUSED_THERMAL_ERROR[] PROGMEM_I1 = ISTR("PAUSED THERMAL ERROR");////MSG_PAUSED_THERMAL_ERROR c=20 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_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_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 extern const char MSG_TM_ACK_ERROR[] PROGMEM_I1 = ISTR("Clear TM error");////MSG_TM_ACK_ERROR c=18

View File

@ -177,7 +177,7 @@ extern const char MSG_IR_03_OR_OLDER[];
extern const char MSG_IR_UNKNOWN[]; extern const char MSG_IR_UNKNOWN[];
#endif #endif
extern const char MSG_PAUSED_THERMAL_ERROR[]; extern const char MSG_PAUSED_THERMAL_ERROR[];
#ifdef TEMP_MODEL #ifdef THERMAL_MODEL
extern const char MSG_THERMAL_ANOMALY[]; extern const char MSG_THERMAL_ANOMALY[];
extern const char MSG_TM_NOT_CAL[]; extern const char MSG_TM_NOT_CAL[];
extern const char MSG_TM_ACK_ERROR[]; extern const char MSG_TM_ACK_ERROR[];

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -92,9 +92,9 @@
#define ENABLE_TEMP_MGR_INTERRUPT() TIMSKx |= (1<<OCIExA) #define ENABLE_TEMP_MGR_INTERRUPT() TIMSKx |= (1<<OCIExA)
#define DISABLE_TEMP_MGR_INTERRUPT() TIMSKx &= ~(1<<OCIExA) #define DISABLE_TEMP_MGR_INTERRUPT() TIMSKx &= ~(1<<OCIExA)
#ifdef TEMP_MODEL #ifdef THERMAL_MODEL
// temperature model interface // thermal model interface
#include "temp_model.h" #include "thermal_model.h"
#endif #endif
#include "Filament_sensor.h" #include "Filament_sensor.h"
@ -486,7 +486,7 @@ enum class TempErrorType : uint8_t
min, min,
preheat, preheat,
runaway, runaway,
#ifdef TEMP_MODEL #ifdef THERMAL_MODEL
model, model,
#endif #endif
}; };
@ -554,10 +554,10 @@ void manage_heater()
// syncronize temperatures with isr // syncronize temperatures with isr
updateTemperatures(); updateTemperatures();
#ifdef TEMP_MODEL #ifdef THERMAL_MODEL
// handle model warnings first, so not to override the error handler // handle model warnings first, so not to override the error handler
if(temp_model::warning_state.warning) if(thermal_model::warning_state.warning)
temp_model::handle_warning(); thermal_model::handle_warning();
#endif #endif
// handle temperature errors // handle temperature errors
@ -567,8 +567,8 @@ void manage_heater()
// periodically check fans // periodically check fans
checkFans(); checkFans();
#ifdef TEMP_MODEL_DEBUG #ifdef THERMAL_MODEL_DEBUG
temp_model::log_usr(); thermal_model::log_usr();
#endif #endif
} }
@ -1539,7 +1539,7 @@ void handle_temp_error()
#endif #endif
} }
break; break;
#ifdef TEMP_MODEL #ifdef THERMAL_MODEL
case TempErrorType::model: case TempErrorType::model:
if(temp_error_state.assert) { if(temp_error_state.assert) {
if(IsStopped() == false) { if(IsStopped() == false) {
@ -1961,10 +1961,10 @@ static void temp_mgr_isr()
temp_error_state.assert = false; temp_error_state.assert = false;
check_temp_raw(); // check min/max temp using raw values check_temp_raw(); // check min/max temp using raw values
check_temp_runaway(); // classic temperature hysteresis check check_temp_runaway(); // classic temperature hysteresis check
#ifdef TEMP_MODEL #ifdef THERMAL_MODEL
temp_model::check(); // model-based heater check thermal_model::check(); // model-based heater check
#ifdef TEMP_MODEL_DEBUG #ifdef THERMAL_MODEL_DEBUG
temp_model::log_isr(); thermal_model::log_isr();
#endif #endif
#endif #endif
@ -2078,8 +2078,8 @@ static void check_temp_raw()
check_min_temp_raw(); check_min_temp_raw();
} }
#ifdef TEMP_MODEL #ifdef THERMAL_MODEL
namespace temp_model { namespace thermal_model {
void model_data::reset(uint8_t heater_pwm _UNUSED, uint8_t fan_pwm _UNUSED, void model_data::reset(uint8_t heater_pwm _UNUSED, uint8_t fan_pwm _UNUSED,
float heater_temp _UNUSED, float ambient_temp _UNUSED) float heater_temp _UNUSED, float ambient_temp _UNUSED)
@ -2091,7 +2091,7 @@ void model_data::reset(uint8_t heater_pwm _UNUSED, uint8_t fan_pwm _UNUSED,
dT_lag_size = L / (uint16_t)(TEMP_MGR_INTV * 1000); dT_lag_size = L / (uint16_t)(TEMP_MGR_INTV * 1000);
// initial values // initial values
for(uint8_t i = 0; i != TEMP_MODEL_MAX_LAG_SIZE; ++i) for(uint8_t i = 0; i != THERMAL_MODEL_MAX_LAG_SIZE; ++i)
dT_lag_buf[i] = NAN; dT_lag_buf[i] = NAN;
dT_lag_idx = 0; dT_lag_idx = 0;
dT_err_prev = 0; dT_err_prev = 0;
@ -2132,7 +2132,7 @@ void model_data::step(uint8_t heater_pwm, uint8_t fan_pwm, float heater_temp, fl
// calculate and filter dT_err // calculate and filter dT_err
float dT_err = (cur_heater_temp - T_prev) - dT_lag; float dT_err = (cur_heater_temp - T_prev) - dT_lag;
float dT_err_f = iir_mul(dT_err_prev, dT_err, TEMP_MODEL_fE, 0.); float dT_err_f = iir_mul(dT_err_prev, dT_err, THERMAL_MODEL_fE, 0.);
T_prev = cur_heater_temp; T_prev = cur_heater_temp;
dT_err_prev = dT_err_f; dT_err_prev = dT_err_f;
@ -2164,8 +2164,8 @@ static bool calibrated()
if(isnan(data.fS)) return false; if(isnan(data.fS)) return false;
if(!(data.L > 0)) return false; if(!(data.L > 0)) return false;
if(!(data.Ta_corr != NAN)) 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(!(temp_model::data.R[i] >= 0)) if(!(thermal_model::data.R[i] >= 0))
return false; return false;
} }
if(!(data.warn != NAN)) return false; if(!(data.warn != NAN)) return false;
@ -2198,7 +2198,7 @@ static void check()
warning_state.assert = data.flag_bits.warning; warning_state.assert = data.flag_bits.warning;
if(warning_state.assert) { if(warning_state.assert) {
warning_state.warning = true; warning_state.warning = true;
warning_state.dT_err = temp_model::data.dT_err_prev; warning_state.dT_err = thermal_model::data.dT_err_prev;
} }
} }
@ -2234,7 +2234,7 @@ static void handle_warning()
} }
} }
#ifdef TEMP_MODEL_DEBUG #ifdef THERMAL_MODEL_DEBUG
static void log_usr() static void log_usr()
{ {
if(!log_buf.enabled) return; if(!log_buf.enabled) return;
@ -2281,42 +2281,42 @@ static void log_isr()
} }
#endif #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; TempMgrGuard temp_mgr_guard;
temp_model::enabled = enabled; thermal_model::enabled = enabled;
temp_model::reinitialize(); 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 // set the enabled flag
{ {
TempMgrGuard temp_mgr_guard; TempMgrGuard temp_mgr_guard;
temp_model::enabled = enabled; thermal_model::enabled = enabled;
temp_model::setup(); thermal_model::setup();
} }
// verify that the model has been enabled // verify that the model has been enabled
if(enabled && !temp_model::enabled) if(enabled && !thermal_model::enabled)
SERIAL_ECHOLNPGM("TM: invalid parameters, cannot enable"); 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 // 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) // 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); static const uint16_t intv_ms = (uint16_t)(TEMP_MGR_INTV * 1000);
uint16_t samples = ((ms + intv_ms/2) / intv_ms); uint16_t samples = ((ms + intv_ms/2) / intv_ms);
@ -2324,128 +2324,128 @@ static void temp_model_set_lag(uint16_t ms)
// ensure we do not exceed the maximum lag buffer and have at least one lag sample for filtering // ensure we do not exceed the maximum lag buffer and have at least one lag sample for filtering
if(samples < 1) if(samples < 1)
samples = 1; samples = 1;
else if(samples > TEMP_MODEL_MAX_LAG_SIZE) else if(samples > THERMAL_MODEL_MAX_LAG_SIZE)
samples = TEMP_MODEL_MAX_LAG_SIZE; samples = THERMAL_MODEL_MAX_LAG_SIZE;
// round back to ms // 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; TempMgrGuard temp_mgr_guard;
if(!isnan(P) && P > 0) temp_model::data.P = P; if(!isnan(P) && P > 0) thermal_model::data.P = P;
if(!isnan(U)) temp_model::data.U = U; if(!isnan(U)) thermal_model::data.U = U;
if(!isnan(V)) temp_model::data.V = V; if(!isnan(V)) thermal_model::data.V = V;
if(!isnan(C) && C > 0) temp_model::data.C = C; if(!isnan(C) && C > 0) thermal_model::data.C = C;
if(!isnan(D)) temp_model::data.fS = D; if(!isnan(D)) thermal_model::data.fS = D;
if(L >= 0) temp_model_set_lag(L); if(L >= 0) thermal_model_set_lag(L);
if(!isnan(Ta_corr)) temp_model::data.Ta_corr = Ta_corr; if(!isnan(Ta_corr)) thermal_model::data.Ta_corr = Ta_corr;
if(!isnan(warn) && warn > 0) temp_model::data.warn = warn; if(!isnan(warn) && warn > 0) thermal_model::data.warn = warn;
if(!isnan(err) && err > 0) temp_model::data.err = err; if(!isnan(err) && err > 0) thermal_model::data.err = err;
// ensure warn <= err // ensure warn <= err
if (temp_model::data.warn > temp_model::data.err) if (thermal_model::data.warn > thermal_model::data.err)
temp_model::data.warn = temp_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) if(index >= THERMAL_MODEL_R_SIZE || R <= 0)
return; return;
TempMgrGuard temp_mgr_guard; TempMgrGuard temp_mgr_guard;
temp_model::data.R[index] = R; thermal_model::data.R[index] = R;
temp_model::setup(); thermal_model::setup();
} }
void temp_model_report_settings() void thermal_model_report_settings()
{ {
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHOLNPGM("Temperature Model settings:"); SERIAL_ECHOLNPGM("Thermal 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)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"), 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, echomagic, (double)thermal_model::data.P, (double)thermal_model::data.U, (double)thermal_model::data.V,
(double)temp_model::data.C, (double)temp_model::data.fS, (unsigned)temp_model::data.L, (double)thermal_model::data.C, (double)thermal_model::data.fS, (unsigned)thermal_model::data.L,
(unsigned)temp_model::enabled, (unsigned)temp_model::warn_beep, (unsigned)thermal_model::enabled, (unsigned)thermal_model::warn_beep,
(double)temp_model::data.err, (double)temp_model::data.warn, (double)thermal_model::data.err, (double)thermal_model::data.warn,
(double)temp_model::data.Ta_corr); (double)thermal_model::data.Ta_corr);
} }
void temp_model_reset_settings() void thermal_model_reset_settings()
{ {
TempMgrGuard temp_mgr_guard; TempMgrGuard temp_mgr_guard;
temp_model::data.P = TEMP_MODEL_DEF(P); thermal_model::data.P = THERMAL_MODEL_DEF(P);
temp_model::data.U = TEMP_MODEL_DEF(U); thermal_model::data.U = THERMAL_MODEL_DEF(U);
temp_model::data.V = TEMP_MODEL_DEF(V); thermal_model::data.V = THERMAL_MODEL_DEF(V);
temp_model::data.C = TEMP_MODEL_DEF(C); thermal_model::data.C = THERMAL_MODEL_DEF(C);
temp_model::data.fS = TEMP_MODEL_DEF(fS); thermal_model::data.fS = THERMAL_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.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 != TEMP_MODEL_R_SIZE; ++i) for(uint8_t i = 0; i != THERMAL_MODEL_R_SIZE; ++i)
temp_model::data.R[i] = pgm_read_float(TEMP_MODEL_R_DEFAULT + i); thermal_model::data.R[i] = pgm_read_float(THERMAL_MODEL_R_DEFAULT + i);
temp_model::data.Ta_corr = TEMP_MODEL_Ta_corr; thermal_model::data.Ta_corr = THERMAL_MODEL_Ta_corr;
temp_model::data.warn = TEMP_MODEL_DEF(W); thermal_model::data.warn = THERMAL_MODEL_DEF(W);
temp_model::data.err = TEMP_MODEL_DEF(E); thermal_model::data.err = THERMAL_MODEL_DEF(E);
temp_model::warn_beep = true; thermal_model::warn_beep = true;
temp_model::enabled = true; thermal_model::enabled = true;
temp_model::reinitialize(); 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 static_assert(THERMAL_MODEL_R_SIZE == 16); // ensure we don't desync with the eeprom table
TempMgrGuard temp_mgr_guard; TempMgrGuard temp_mgr_guard;
// handle upgrade from a model without UVDL (FW<3.13, TM VER<1): model is retro-compatible, // 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 // 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_THERMAL_MODEL_U, THERMAL_MODEL_DEF(U));
eeprom_init_default_float((float*)EEPROM_TEMP_MODEL_V, TEMP_MODEL_DEF(V)); eeprom_init_default_float((float*)EEPROM_THERMAL_MODEL_V, THERMAL_MODEL_DEF(V));
eeprom_init_default_float((float*)EEPROM_TEMP_MODEL_D, TEMP_MODEL_DEF(fS)); eeprom_init_default_float((float*)EEPROM_THERMAL_MODEL_D, THERMAL_MODEL_DEF(fS));
eeprom_init_default_word((uint16_t*)EEPROM_TEMP_MODEL_L, TEMP_MODEL_DEF(LAG)); eeprom_init_default_word((uint16_t*)EEPROM_THERMAL_MODEL_L, THERMAL_MODEL_DEF(LAG));
eeprom_init_default_byte((uint8_t*)EEPROM_TEMP_MODEL_VER, TEMP_MODEL_DEF(VER)); eeprom_init_default_byte((uint8_t*)EEPROM_THERMAL_MODEL_VER, THERMAL_MODEL_DEF(VER));
temp_model::enabled = eeprom_read_byte((uint8_t*)EEPROM_TEMP_MODEL_ENABLE); thermal_model::enabled = eeprom_read_byte((uint8_t*)EEPROM_THERMAL_MODEL_ENABLE);
temp_model::data.P = eeprom_read_float((float*)EEPROM_TEMP_MODEL_P); thermal_model::data.P = eeprom_read_float((float*)EEPROM_THERMAL_MODEL_P);
temp_model::data.U = eeprom_read_float((float*)EEPROM_TEMP_MODEL_U); thermal_model::data.U = eeprom_read_float((float*)EEPROM_THERMAL_MODEL_U);
temp_model::data.V = eeprom_read_float((float*)EEPROM_TEMP_MODEL_V); thermal_model::data.V = eeprom_read_float((float*)EEPROM_THERMAL_MODEL_V);
temp_model::data.C = eeprom_read_float((float*)EEPROM_TEMP_MODEL_C); thermal_model::data.C = eeprom_read_float((float*)EEPROM_THERMAL_MODEL_C);
temp_model::data.fS = eeprom_read_float((float*)EEPROM_TEMP_MODEL_D); thermal_model::data.fS = eeprom_read_float((float*)EEPROM_THERMAL_MODEL_D);
temp_model_set_lag(eeprom_read_word((uint16_t*)EEPROM_TEMP_MODEL_L)); thermal_model_set_lag(eeprom_read_word((uint16_t*)EEPROM_THERMAL_MODEL_L));
for(uint8_t i = 0; i != TEMP_MODEL_R_SIZE; ++i) for(uint8_t i = 0; i != THERMAL_MODEL_R_SIZE; ++i)
temp_model::data.R[i] = eeprom_read_float((float*)EEPROM_TEMP_MODEL_R + i); thermal_model::data.R[i] = eeprom_read_float((float*)EEPROM_THERMAL_MODEL_R + i);
temp_model::data.Ta_corr = eeprom_read_float((float*)EEPROM_TEMP_MODEL_Ta_corr); thermal_model::data.Ta_corr = eeprom_read_float((float*)EEPROM_THERMAL_MODEL_Ta_corr);
temp_model::data.warn = eeprom_read_float((float*)EEPROM_TEMP_MODEL_W); thermal_model::data.warn = eeprom_read_float((float*)EEPROM_THERMAL_MODEL_W);
temp_model::data.err = eeprom_read_float((float*)EEPROM_TEMP_MODEL_E); thermal_model::data.err = eeprom_read_float((float*)EEPROM_THERMAL_MODEL_E);
if(!temp_model::calibrated()) { if(!thermal_model::calibrated()) {
SERIAL_ECHOLNPGM("TM: stored calibration invalid, resetting"); 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_byte((uint8_t*)EEPROM_THERMAL_MODEL_ENABLE, thermal_model::enabled);
eeprom_update_float((float*)EEPROM_TEMP_MODEL_P, temp_model::data.P); eeprom_update_float((float*)EEPROM_THERMAL_MODEL_P, thermal_model::data.P);
eeprom_update_float((float*)EEPROM_TEMP_MODEL_U, temp_model::data.U); eeprom_update_float((float*)EEPROM_THERMAL_MODEL_U, thermal_model::data.U);
eeprom_update_float((float*)EEPROM_TEMP_MODEL_V, temp_model::data.V); eeprom_update_float((float*)EEPROM_THERMAL_MODEL_V, thermal_model::data.V);
eeprom_update_float((float*)EEPROM_TEMP_MODEL_C, temp_model::data.C); eeprom_update_float((float*)EEPROM_THERMAL_MODEL_C, thermal_model::data.C);
eeprom_update_float((float*)EEPROM_TEMP_MODEL_D, temp_model::data.fS); eeprom_update_float((float*)EEPROM_THERMAL_MODEL_D, thermal_model::data.fS);
eeprom_update_word((uint16_t*)EEPROM_TEMP_MODEL_L, temp_model::data.L); eeprom_update_word((uint16_t*)EEPROM_THERMAL_MODEL_L, thermal_model::data.L);
for(uint8_t i = 0; i != TEMP_MODEL_R_SIZE; ++i) for(uint8_t i = 0; i != THERMAL_MODEL_R_SIZE; ++i)
eeprom_update_float((float*)EEPROM_TEMP_MODEL_R + i, temp_model::data.R[i]); eeprom_update_float((float*)EEPROM_THERMAL_MODEL_R + i, thermal_model::data.R[i]);
eeprom_update_float((float*)EEPROM_TEMP_MODEL_Ta_corr, temp_model::data.Ta_corr); eeprom_update_float((float*)EEPROM_THERMAL_MODEL_Ta_corr, thermal_model::data.Ta_corr);
eeprom_update_float((float*)EEPROM_TEMP_MODEL_W, temp_model::data.warn); eeprom_update_float((float*)EEPROM_THERMAL_MODEL_W, thermal_model::data.warn);
eeprom_update_float((float*)EEPROM_TEMP_MODEL_E, temp_model::data.err); eeprom_update_float((float*)EEPROM_THERMAL_MODEL_E, thermal_model::data.err);
} }
namespace temp_model_cal { namespace thermal_model_cal {
// set current fan speed for both front/backend // set current fan speed for both front/backend
static __attribute__((noinline)) void set_fan_speed(uint8_t fan_speed) static __attribute__((noinline)) void set_fan_speed(uint8_t fan_speed)
@ -2491,7 +2491,7 @@ static void cooldown(float temp)
set_fan_speed(255); set_fan_speed(255);
while(current_temperature[0] >= temp) { while(current_temperature[0] >= temp) {
if(temp_error_state.v) break; 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)) { if(current_temperature[0] < (ambient + TEMP_HYSTERESIS)) {
// do not get stuck waiting very close to ambient temperature // do not get stuck waiting very close to ambient temperature
break; 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) static float cost_fn(uint16_t samples, float* const var, float v, uint8_t fan_pwm, float ambient)
{ {
*var = v; *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; float err = 0;
uint16_t cnt = 0; uint16_t cnt = 0;
for(uint16_t i = 1; i < samples; ++i) { for(uint16_t i = 1; i < samples; ++i) {
temp_model::data.step(rec_buffer[i].pwm, fan_pwm, rec_buffer[i].temp, ambient); thermal_model::data.step(rec_buffer[i].pwm, fan_pwm, rec_buffer[i].temp, ambient);
float err_v = temp_model::data.dT_err_prev; float err_v = thermal_model::data.dT_err_prev;
if(!isnan(err_v)) { if(!isnan(err_v)) {
err += err_v * err_v; err += err_v * err_v;
++cnt; ++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 // 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 // so we cannot keep the main checker active until a value has been found
bool was_enabled = temp_model::enabled; bool was_enabled = thermal_model::enabled;
temp_model_reset_enabled(false); thermal_model_reset_enabled(false);
float orig = *var; float orig = *var;
float e = NAN; float e = NAN;
@ -2595,14 +2595,14 @@ static float estimate(uint16_t samples,
} }
*var = x; *var = x;
temp_model_reset_enabled(was_enabled); thermal_model_reset_enabled(was_enabled);
return e; return e;
} }
} }
SERIAL_ECHOLNPGM("TM estimation did not converge"); SERIAL_ECHOLNPGM("TM estimation did not converge");
*var = orig; *var = orig;
temp_model_reset_enabled(was_enabled); thermal_model_reset_enabled(was_enabled);
return NAN; return NAN;
} }
@ -2618,10 +2618,10 @@ static bool autotune(int16_t cal_temp)
for(uint8_t i = 0; i != 2; ++i) { for(uint8_t i = 0; i != 2; ++i) {
const char* PROGMEM verb = (i == 0? PSTR("initial"): PSTR("refine")); const char* PROGMEM verb = (i == 0? PSTR("initial"): PSTR("refine"));
target_temperature[0] = 0; target_temperature[0] = 0;
if(current_temperature[0] >= TEMP_MODEL_CAL_T_low) { if(current_temperature[0] >= THERMAL_MODEL_CAL_T_low) {
sprintf_P(tm_message, PSTR("TM: cool down <%dC"), TEMP_MODEL_CAL_T_low); sprintf_P(tm_message, PSTR("TM: cool down <%dC"), THERMAL_MODEL_CAL_T_low);
lcd_setstatus_serial(tm_message); lcd_setstatus_serial(tm_message);
cooldown(TEMP_MODEL_CAL_T_low); cooldown(THERMAL_MODEL_CAL_T_low);
wait(10000); wait(10000);
} }
@ -2633,12 +2633,12 @@ static bool autotune(int16_t cal_temp)
return true; return true;
// we need a high R value for the initial C guess // we need a high R value for the initial C guess
if(isnan(temp_model::data.R[0])) if(isnan(thermal_model::data.R[0]))
temp_model::data.R[0] = TEMP_MODEL_CAL_R_high; thermal_model::data.R[0] = THERMAL_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, THERMAL_MODEL_CAL_C_low, THERMAL_MODEL_CAL_C_high,
TEMP_MODEL_CAL_C_thr, TEMP_MODEL_CAL_C_itr, THERMAL_MODEL_CAL_C_thr, THERMAL_MODEL_CAL_C_itr,
0, current_temperature_ambient); 0, current_temperature_ambient);
if(isnan(e)) if(isnan(e))
return true; return true;
@ -2653,9 +2653,9 @@ static bool autotune(int16_t cal_temp)
if(temp_error_state.v || !samples) if(temp_error_state.v || !samples)
return true; 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, THERMAL_MODEL_CAL_R_low, THERMAL_MODEL_CAL_R_high,
TEMP_MODEL_CAL_R_thr, TEMP_MODEL_CAL_R_itr, THERMAL_MODEL_CAL_R_thr, THERMAL_MODEL_CAL_R_itr,
0, current_temperature_ambient); 0, current_temperature_ambient);
if(isnan(e)) if(isnan(e))
return true; return true;
@ -2668,12 +2668,12 @@ static bool autotune(int16_t cal_temp)
set_fan_speed(255); set_fan_speed(255);
wait(30000); 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 // always disable the checker while estimating fan resistance as the difference
// (esp with 3rd-party blowers) can be massive // (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; uint8_t speed = 256 / THERMAL_MODEL_R_SIZE * (i + 1) - 1;
set_fan_speed(speed); set_fan_speed(speed);
wait(10000); wait(10000);
@ -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 // 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. // during fan measurements and we'd like to include that skew during normal operation.
e = estimate(samples, &temp_model::data.R[i], e = estimate(samples, &thermal_model::data.R[i],
TEMP_MODEL_CAL_R_low, temp_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); i, current_temperature_ambient);
if(isnan(e)) if(isnan(e))
return true; return true;
@ -2694,34 +2694,34 @@ static bool autotune(int16_t cal_temp)
// interpolate remaining steps to speed-up calibration // interpolate remaining steps to speed-up calibration
// TODO: verify that the sampled values are monotically increasing? // TODO: verify that the sampled values are monotically increasing?
int8_t next = TEMP_MODEL_R_SIZE - 1; int8_t next = THERMAL_MODEL_R_SIZE - 1;
for(uint8_t i = TEMP_MODEL_R_SIZE - 2; i != 0; --i) { for(uint8_t i = THERMAL_MODEL_R_SIZE - 2; i != 0; --i) {
if(!((TEMP_MODEL_R_SIZE - i - 1) % TEMP_MODEL_CAL_R_STEP)) { if(!((THERMAL_MODEL_R_SIZE - i - 1) % THERMAL_MODEL_CAL_R_STEP)) {
next = i; next = i;
continue; continue;
} }
int8_t prev = next - TEMP_MODEL_CAL_R_STEP; int8_t prev = next - THERMAL_MODEL_CAL_R_STEP;
if(prev < 0) prev = 0; 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 = (temp_model::data.R[next] - temp_model::data.R[prev]); float d = (thermal_model::data.R[next] - thermal_model::data.R[prev]);
temp_model::data.R[i] = temp_model::data.R[prev] + d * f; thermal_model::data.R[i] = thermal_model::data.R[prev] + d * f;
} }
return false; 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]; float orig_C, orig_R[THERMAL_MODEL_R_SIZE];
bool orig_enabled; 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 // fail-safe error state
temp_model_autotune_err = true; thermal_model_autotune_err = true;
char tm_message[LCD_WIDTH+1]; char tm_message[LCD_WIDTH+1];
if(moves_planned() || printer_active()) { if(moves_planned() || printer_active()) {
@ -2732,60 +2732,60 @@ void temp_model_autotune(int16_t temp, bool selftest)
// lockout the printer during calibration // lockout the printer during calibration
KEEPALIVE_STATE(IN_PROCESS); KEEPALIVE_STATE(IN_PROCESS);
menu_set_block(MENU_BLOCK_TEMP_MODEL_AUTOTUNE); menu_set_block(MENU_BLOCK_THERMAL_MODEL_AUTOTUNE);
lcd_return_to_status(); lcd_return_to_status();
// save the original model data and set the model checking state during self-calibration // save the original model data and set the model checking state during self-calibration
orig_C = temp_model::data.C; orig_C = thermal_model::data.C;
memcpy(orig_R, temp_model::data.R, sizeof(temp_model::data.R)); memcpy(orig_R, thermal_model::data.R, sizeof(thermal_model::data.R));
orig_enabled = temp_model::enabled; orig_enabled = thermal_model::enabled;
temp_model_reset_enabled(selftest); thermal_model_reset_enabled(selftest);
// autotune // autotune
SERIAL_ECHOLNPGM("TM: calibration start"); 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 : THERMAL_MODEL_CAL_T_high);
// always reset temperature // always reset temperature
disable_heater(); disable_heater();
if(temp_model_autotune_err) { if(thermal_model_autotune_err) {
sprintf_P(tm_message, PSTR("TM: calibr. failed!")); sprintf_P(tm_message, PSTR("TM: calibr. failed!"));
lcd_setstatus_serial(tm_message); lcd_setstatus_serial(tm_message);
if(temp_error_state.v) 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 // show calibrated values before overwriting them
temp_model_report_settings(); thermal_model_report_settings();
// restore original state // restore original state
temp_model::data.C = orig_C; thermal_model::data.C = orig_C;
memcpy(temp_model::data.R, orig_R, sizeof(temp_model::data.R)); memcpy(thermal_model::data.R, orig_R, sizeof(thermal_model::data.R));
temp_model_set_enabled(orig_enabled); thermal_model_set_enabled(orig_enabled);
} else { } else {
calibration_status_set(CALIBRATION_STATUS_TEMP_MODEL); calibration_status_set(CALIBRATION_STATUS_THERMAL_MODEL);
lcd_setstatuspgm(MSG_WELCOME); lcd_setstatuspgm(MSG_WELCOME);
temp_model_cal::set_fan_speed(0); thermal_model_cal::set_fan_speed(0);
temp_model_set_enabled(orig_enabled); thermal_model_set_enabled(orig_enabled);
temp_model_report_settings(); thermal_model_report_settings();
} }
lcd_consume_click(); lcd_consume_click();
menu_unset_block(MENU_BLOCK_TEMP_MODEL_AUTOTUNE); menu_unset_block(MENU_BLOCK_THERMAL_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 #ifdef THERMAL_MODEL_DEBUG
void temp_model_log_enable(bool enable) void thermal_model_log_enable(bool enable)
{ {
if(enable) { if(enable) {
TempMgrGuard temp_mgr_guard; 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
#endif #endif

View File

@ -174,24 +174,24 @@ FORCE_INLINE void autotempShutdown(){
void PID_autotune(float temp, int extruder, int ncycles); void PID_autotune(float temp, int extruder, int ncycles);
#ifdef TEMP_MODEL #ifdef THERMAL_MODEL
bool temp_model_enabled(); // return temperature model state bool thermal_model_enabled(); // return thermal model state
void temp_model_set_enabled(bool enabled); void thermal_model_set_enabled(bool enabled);
void temp_model_set_warn_beep(bool enabled); void thermal_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, 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); 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 thermal_model_report_settings();
void temp_model_reset_settings(); void thermal_model_reset_settings();
void temp_model_load_settings(); void thermal_model_load_settings();
void temp_model_save_settings(); void thermal_model_save_settings();
void temp_model_autotune(int16_t temp = 0, bool selftest = false); void thermal_model_autotune(int16_t temp = 0, bool selftest = false);
bool temp_model_autotune_result(); // return true if the last autotune was complete and successful bool thermal_model_autotune_result(); // return true if the last autotune was complete and successful
#ifdef TEMP_MODEL_DEBUG #ifdef THERMAL_MODEL_DEBUG
void temp_model_log_enable(bool enable); void thermal_model_log_enable(bool enable);
#endif #endif
#endif #endif

View File

@ -6,31 +6,31 @@
#include "planner.h" #include "planner.h"
// shortcuts to get model defaults // shortcuts to get model defaults
#define __TEMP_MODEL_DEF(MODEL, VAR) TEMP_MODEL_##MODEL##_##VAR #define __THERMAL_MODEL_DEF(MODEL, VAR) THERMAL_MODEL_##MODEL##_##VAR
#define _TEMP_MODEL_DEF(MODEL, VAR) __TEMP_MODEL_DEF(MODEL, VAR) #define _THERMAL_MODEL_DEF(MODEL, VAR) __THERMAL_MODEL_DEF(MODEL, VAR)
#define TEMP_MODEL_DEF(VAR) _TEMP_MODEL_DEF(TEMP_MODEL_DEFAULT, VAR) #define THERMAL_MODEL_DEF(VAR) _THERMAL_MODEL_DEF(THERMAL_MODEL_DEFAULT, VAR)
constexpr uint8_t TEMP_MODEL_CAL_S = 60; // Maximum recording length during calibration (s) constexpr uint8_t THERMAL_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 uint8_t THERMAL_MODEL_CAL_R_STEP = 4; // Fan interpolation steps during calibration
constexpr float TEMP_MODEL_fE = 0.05; // error filter (1st-order IIR factor) constexpr float THERMAL_MODEL_fE = 0.05; // error filter (1st-order IIR factor)
// transport delay buffer size (samples) // transport delay buffer size (samples)
constexpr uint8_t TEMP_MODEL_MAX_LAG_SIZE = 8; // * TEMP_MGR_INTV = 2160 constexpr uint8_t THERMAL_MODEL_MAX_LAG_SIZE = 8; // * TEMP_MGR_INTV = 2160
// resistance values for all fan levels // resistance values for all fan levels
constexpr uint8_t TEMP_MODEL_R_SIZE = (1 << FAN_SOFT_PWM_BITS); constexpr uint8_t THERMAL_MODEL_R_SIZE = (1 << FAN_SOFT_PWM_BITS);
static const float TEMP_MODEL_R_DEFAULT[TEMP_MODEL_R_SIZE] PROGMEM = TEMP_MODEL_DEF(Rv); static const float THERMAL_MODEL_R_DEFAULT[THERMAL_MODEL_R_SIZE] PROGMEM = THERMAL_MODEL_DEF(Rv);
namespace temp_model { namespace thermal_model {
struct model_data struct model_data
{ {
// temporary buffers // temporary buffers
float dT_lag_buf[TEMP_MODEL_MAX_LAG_SIZE]; // transport delay buffer 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_size = 0; // transport delay buffer size
uint8_t dT_lag_idx = 0; // transport delay buffer index uint8_t dT_lag_idx = 0; // transport delay buffer index
float dT_err_prev = 0; // previous temperature delta error float dT_err_prev = 0; // previous temperature delta error
float T_prev = 0; // last temperature extruder float T_prev = 0; // last temperature extruder
// configurable parameters // configurable parameters
float P; // heater power (W) float P; // heater power (W)
@ -39,7 +39,7 @@ struct model_data
float C; // heatblock capacitance (J/K) float C; // heatblock capacitance (J/K)
float fS; // sim. 1st order IIR filter factor (f=100/27) float fS; // sim. 1st order IIR filter factor (f=100/27)
uint16_t L; // sim. response lag (ms) uint16_t L; // sim. response lag (ms)
float R[TEMP_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) float Ta_corr; // ambient temperature correction (K)
// thresholds // thresholds
@ -85,7 +85,7 @@ volatile static struct
static void handle_warning(); // handle warnings from user context static void handle_warning(); // handle warnings from user context
#ifdef TEMP_MODEL_DEBUG #ifdef THERMAL_MODEL_DEBUG
static struct static struct
{ {
volatile struct volatile struct
@ -106,9 +106,9 @@ static void log_usr(); // user log handler
static void log_isr(); // isr log handler static void log_isr(); // isr log handler
#endif #endif
} // namespace temp_model } // namespace thermal_model
namespace temp_model_cal { namespace thermal_model_cal {
// recording scratch buffer // recording scratch buffer
struct rec_entry struct rec_entry
@ -117,9 +117,9 @@ struct rec_entry
uint8_t pwm; // heater PWM uint8_t pwm; // heater PWM
}; };
constexpr uint16_t REC_BUFFER_SIZE = TEMP_MODEL_CAL_S / TEMP_MGR_INTV; constexpr uint16_t REC_BUFFER_SIZE = THERMAL_MODEL_CAL_S / TEMP_MGR_INTV;
static rec_entry* const rec_buffer = (rec_entry*)block_buffer; // oh-hey, free memory! 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), static_assert(sizeof(rec_entry[REC_BUFFER_SIZE]) <= sizeof(block_buffer),
"recording length too long to fit within available buffer"); "recording length too long to fit within available buffer");
} // namespace temp_model_cal } // namespace thermal_model_cal

View File

@ -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}

View File

@ -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}

View File

@ -0,0 +1,19 @@
#pragma once
#define THERMAL_MODEL_E3D_V6_VER 1 // model parameters version
#define THERMAL_MODEL_E3D_V6_P 38. // heater power (W)
#define THERMAL_MODEL_E3D_V6_U 0. // linear temperature coefficient (W/K/power)
#define THERMAL_MODEL_E3D_V6_V 1. // linear temperature intercept (W/power)
#define THERMAL_MODEL_E3D_V6_C 12.1 // initial guess for heatblock capacitance (J/K)
#define THERMAL_MODEL_E3D_V6_R 20.5 // initial guess for heatblock resistance (K/W)
#define THERMAL_MODEL_E3D_V6_fS 0.065 // sim. 1st order IIR filter factor (f=100/27)
#define THERMAL_MODEL_E3D_V6_LAG 2100 // sim. response lag (ms, 0-2160)
#define THERMAL_MODEL_E3D_V6_W 1.2 // Default warning threshold (K/s)
#define THERMAL_MODEL_E3D_V6_E 1.74 // Default error threshold (K/s)
// fall-back resistance vector (R0-15)
#define THERMAL_MODEL_E3D_V6_Rv {THERMAL_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}

View File

@ -887,8 +887,8 @@ void lcd_commands()
} }
} }
#ifdef TEMP_MODEL #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) switch (lcd_commands_step)
{ {
@ -908,13 +908,13 @@ void lcd_commands()
break; break;
case 3: case 3:
temp_model_set_warn_beep(false); thermal_model_set_warn_beep(false);
enquecommand_P(PSTR("M310 A F1")); enquecommand_P(PSTR("M310 A F1"));
lcd_commands_step = 2; lcd_commands_step = 2;
break; break;
case 2: case 2:
if (temp_model_autotune_result()) if (thermal_model_autotune_result())
enquecommand_P(MSG_M500); enquecommand_P(MSG_M500);
lcd_commands_step = 1; lcd_commands_step = 1;
break; break;
@ -922,8 +922,8 @@ void lcd_commands()
case 1: case 1:
lcd_commands_step = 0; lcd_commands_step = 0;
lcd_commands_type = LcdCommands::Idle; lcd_commands_type = LcdCommands::Idle;
temp_model_set_warn_beep(true); thermal_model_set_warn_beep(true);
bool res = temp_model_autotune_result(); bool res = thermal_model_autotune_result();
if (eeprom_read_byte((uint8_t*)EEPROM_WIZARD_ACTIVE)) { if (eeprom_read_byte((uint8_t*)EEPROM_WIZARD_ACTIVE)) {
// resume the wizard // resume the wizard
lcd_wizard(res ? WizState::Restore : WizState::Failed); lcd_wizard(res ? WizState::Restore : WizState::Failed);
@ -931,15 +931,15 @@ void lcd_commands()
break; break;
} }
} }
#endif //TEMP_MODEL #endif //THERMAL_MODEL
if (lcd_commands_type == LcdCommands::NozzleCNG) if (lcd_commands_type == LcdCommands::NozzleCNG)
{ {
if (!blocks_queued() && cmd_buffer_empty() && !saved_printing) if (!blocks_queued() && cmd_buffer_empty() && !saved_printing)
{ {
#ifdef TEMP_MODEL #ifdef THERMAL_MODEL
static bool was_enabled; static bool was_enabled;
#endif //TEMP_MODEL #endif //THERMAL_MODEL
switch(lcd_commands_step) switch(lcd_commands_step)
{ {
case 0: case 0:
@ -953,10 +953,10 @@ void lcd_commands()
enquecommand_P(G28W); enquecommand_P(G28W);
enquecommand_P(PSTR("G1 X125 Z200 F1000")); enquecommand_P(PSTR("G1 X125 Z200 F1000"));
enquecommand_P(PSTR("M109 S280")); enquecommand_P(PSTR("M109 S280"));
#ifdef TEMP_MODEL #ifdef THERMAL_MODEL
was_enabled = temp_model_enabled(); was_enabled = thermal_model_enabled();
temp_model_set_enabled(false); thermal_model_set_enabled(false);
#endif //TEMP_MODEL #endif //THERMAL_MODEL
lcd_commands_step = 2; lcd_commands_step = 2;
break; break;
case 2: case 2:
@ -969,9 +969,9 @@ void lcd_commands()
lcd_update_enabled = false; //hack to avoid lcd_update recursion. 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) { if (lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_NOZZLE_CNG_CHANGED), false) == LCD_LEFT_BUTTON_CHOICE) {
setTargetHotend(0); setTargetHotend(0);
#ifdef TEMP_MODEL #ifdef THERMAL_MODEL
temp_model_set_enabled(was_enabled); thermal_model_set_enabled(was_enabled);
#endif //TEMP_MODEL #endif //THERMAL_MODEL
lcd_commands_step = 1; lcd_commands_step = 1;
} }
lcd_update_enabled = true; lcd_update_enabled = true;
@ -3802,10 +3802,10 @@ void lcd_wizard(WizState state)
state = S::Xyz; state = S::Xyz;
} else if (!calibration_status_get(CALIBRATION_STATUS_Z)) { } else if (!calibration_status_get(CALIBRATION_STATUS_Z)) {
state = S::Z; state = S::Z;
#ifdef TEMP_MODEL #ifdef THERMAL_MODEL
} else if (!calibration_status_get(CALIBRATION_STATUS_TEMP_MODEL)) { } else if (!calibration_status_get(CALIBRATION_STATUS_THERMAL_MODEL)) {
state = S::TempModel; state = S::ThermalModel;
#endif //TEMP_MODEL #endif //THERMAL_MODEL
} else if (!calibration_status_get(CALIBRATION_STATUS_LIVE_ADJUST)) { } else if (!calibration_status_get(CALIBRATION_STATUS_LIVE_ADJUST)) {
state = S::IsFil; state = S::IsFil;
} else { } else {
@ -3847,13 +3847,13 @@ void lcd_wizard(WizState state)
state = S::Restore; state = S::Restore;
} }
break; break;
#ifdef TEMP_MODEL #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_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. end = true; // Leave wizard temporarily for TM cal.
break; break;
#endif //TEMP_MODEL #endif //THERMAL_MODEL
case S::IsFil: case S::IsFil:
//start to preheat nozzle and bed to save some time later //start to preheat nozzle and bed to save some time later
setTargetHotend(PLA_PREHEAT_HOTEND_TEMP); 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); MENU_ITEM_FUNCTION_P(_T(MSG_PINDA_CALIBRATION), lcd_calibrate_pinda);
#endif #endif
} }
#ifdef TEMP_MODEL #ifdef THERMAL_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 #endif //THERMAL_MODEL
MENU_END(); MENU_END();
} }
@ -5173,7 +5173,7 @@ static void lcd_main_menu()
if((printJobOngoing() || isPrintPaused) && (custom_message_type != CustomMsg::MeshBedLeveling) && !processing_tcode) { if((printJobOngoing() || isPrintPaused) && (custom_message_type != CustomMsg::MeshBedLeveling) && !processing_tcode) {
MENU_ITEM_SUBMENU_P(_T(MSG_STOP_PRINT), lcd_sdcard_stop); MENU_ITEM_SUBMENU_P(_T(MSG_STOP_PRINT), lcd_sdcard_stop);
} }
#ifdef TEMP_MODEL #ifdef THERMAL_MODEL
else if(Stopped) { else if(Stopped) {
MENU_ITEM_SUBMENU_P(_T(MSG_TM_ACK_ERROR), lcd_print_stop); MENU_ITEM_SUBMENU_P(_T(MSG_TM_ACK_ERROR), lcd_print_stop);
} }
@ -5591,13 +5591,13 @@ void lcd_print_stop()
print_stop(true); print_stop(true);
} }
#ifdef TEMP_MODEL #ifdef THERMAL_MODEL
void lcd_temp_model_cal() void lcd_thermal_model_cal()
{ {
lcd_commands_type = LcdCommands::TempModel; lcd_commands_type = LcdCommands::ThermalModel;
lcd_return_to_status(); lcd_return_to_status();
} }
#endif //TEMP_MODEL #endif //THERMAL_MODEL
void lcd_sdcard_stop() void lcd_sdcard_stop()
{ {
@ -6447,10 +6447,10 @@ static bool lcd_selfcheck_check_heater(bool _isbed)
target_temperature[0] = (_isbed) ? 0 : 200; target_temperature[0] = (_isbed) ? 0 : 200;
target_temperature_bed = (_isbed) ? 100 : 0; target_temperature_bed = (_isbed) ? 100 : 0;
#ifdef TEMP_MODEL #ifdef THERMAL_MODEL
bool tm_was_enabled = temp_model_enabled(); bool tm_was_enabled = thermal_model_enabled();
temp_model_set_enabled(false); thermal_model_set_enabled(false);
#endif //TEMP_MODEL #endif //THERMAL_MODEL
manage_heater(); manage_heater();
manage_inactivity(true); manage_inactivity(true);
@ -6499,9 +6499,9 @@ static bool lcd_selfcheck_check_heater(bool _isbed)
lcd_selftest_error(TestError::Bed, "", ""); lcd_selftest_error(TestError::Bed, "", "");
} }
#ifdef TEMP_MODEL #ifdef THERMAL_MODEL
temp_model_set_enabled(tm_was_enabled); thermal_model_set_enabled(tm_was_enabled);
#endif //TEMP_MODEL #endif //THERMAL_MODEL
manage_heater(); manage_heater();
manage_inactivity(true); manage_inactivity(true);
return _stepresult; return _stepresult;

View File

@ -50,9 +50,9 @@ void lcd_pause_usb_print();
void lcd_resume_print(); void lcd_resume_print();
void lcd_print_stop(); // interactive print stop void lcd_print_stop(); // interactive print stop
void print_stop(bool interactive=false); void print_stop(bool interactive=false);
#ifdef TEMP_MODEL #ifdef THERMAL_MODEL
void lcd_temp_model_cal(); void lcd_thermal_model_cal();
#endif //TEMP_MODEL #endif //THERMAL_MODEL
void lcd_load_filament_color_check(); void lcd_load_filament_color_check();
extern void lcd_belttest(); extern void lcd_belttest();
@ -117,9 +117,9 @@ enum class LcdCommands : uint_least8_t
LongPause, LongPause,
PidExtruder, PidExtruder,
Layer1Cal, Layer1Cal,
#ifdef TEMP_MODEL #ifdef THERMAL_MODEL
TempModel, ThermalModel,
#endif //TEMP_MODEL #endif //THERMAL_MODEL
NozzleCNG, NozzleCNG,
}; };
@ -225,9 +225,9 @@ enum class WizState : uint8_t
Selftest, //!< self test Selftest, //!< self test
Xyz, //!< xyz calibration Xyz, //!< xyz calibration
Z, //!< z calibration Z, //!< z calibration
#ifdef TEMP_MODEL #ifdef THERMAL_MODEL
TempModel, //!< Temp model calibration ThermalModel, //!< Thermal Model calibration
#endif //TEMP_MODEL #endif //THERMAL_MODEL
IsFil, //!< Is filament loaded? First step of 1st layer calibration IsFil, //!< Is filament loaded? First step of 1st layer calibration
Preheat, //!< Preheat for any material Preheat, //!< Preheat for any material
LoadFilCold, //!< Load filament for MMU LoadFilCold, //!< Load filament for MMU

View File

@ -103,22 +103,22 @@ extern void ip4_to_str(char* dest, uint8_t* IP);
// Calibration status of the machine // Calibration status of the machine
// (unsigned char*)EEPROM_CALIBRATION_STATUS_V2 // (unsigned char*)EEPROM_CALIBRATION_STATUS_V2
typedef uint8_t CalibrationStatus; typedef uint8_t CalibrationStatus;
const CalibrationStatus CALIBRATION_STATUS_SELFTEST = 0b00000001; // Selftest const CalibrationStatus CALIBRATION_STATUS_SELFTEST = 0b00000001; // Selftest
const CalibrationStatus CALIBRATION_STATUS_XYZ = 0b00000010; // XYZ calibration const CalibrationStatus CALIBRATION_STATUS_XYZ = 0b00000010; // XYZ calibration
const CalibrationStatus CALIBRATION_STATUS_Z = 0b00000100; // Z calibration const CalibrationStatus CALIBRATION_STATUS_Z = 0b00000100; // Z calibration
#ifdef TEMP_MODEL #ifdef THERMAL_MODEL
const CalibrationStatus CALIBRATION_STATUS_TEMP_MODEL = 0b00001000; // Temperature model calibration const CalibrationStatus CALIBRATION_STATUS_THERMAL_MODEL = 0b00001000; // Thermal model calibration
#endif #endif
const CalibrationStatus CALIBRATION_STATUS_LIVE_ADJUST = 0b00010000; // 1st layer calibration 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_UNKNOWN = 0b10000000; // Freshly assembled or unknown status
// Calibration steps performed by the wizard // Calibration steps performed by the wizard
const CalibrationStatus CALIBRATION_WIZARD_STEPS = const CalibrationStatus CALIBRATION_WIZARD_STEPS =
CALIBRATION_STATUS_SELFTEST | CALIBRATION_STATUS_SELFTEST |
CALIBRATION_STATUS_XYZ | CALIBRATION_STATUS_XYZ |
CALIBRATION_STATUS_Z | CALIBRATION_STATUS_Z |
#ifdef TEMP_MODEL #ifdef THERMAL_MODEL
CALIBRATION_STATUS_TEMP_MODEL | CALIBRATION_STATUS_THERMAL_MODEL |
#endif #endif
CALIBRATION_STATUS_LIVE_ADJUST; CALIBRATION_STATUS_LIVE_ADJUST;

View File

@ -381,26 +381,26 @@
#define TEMP_RUNAWAY_EXTRUDER_TIMEOUT 45 #define TEMP_RUNAWAY_EXTRUDER_TIMEOUT 45
// model-based temperature check // model-based temperature check
#define TEMP_MODEL 1 // enable model-based temperature checks #define THERMAL_MODEL 1 // enable model-based temperature checks
#define TEMP_MODEL_DEBUG 1 // extended runtime logging #define THERMAL_MODEL_DEBUG 1 // extended runtime logging
#define TEMP_MODEL_CAL_C_low 5 // C estimation lower limit #define THERMAL_MODEL_CAL_C_low 5 // C estimation lower limit
#define TEMP_MODEL_CAL_C_high 20 // C estimation upper limit #define THERMAL_MODEL_CAL_C_high 20 // C estimation upper limit
#define TEMP_MODEL_CAL_C_thr 0.01 // C estimation iteration threshold #define THERMAL_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_itr 30 // C estimation iteration limit
#define TEMP_MODEL_CAL_R_low 5 // R estimation lower limit #define THERMAL_MODEL_CAL_R_low 5 // R estimation lower limit
#define TEMP_MODEL_CAL_R_high 50 // R estimation upper limit #define THERMAL_MODEL_CAL_R_high 50 // R estimation upper limit
#define TEMP_MODEL_CAL_R_thr 0.01 // R estimation iteration threshold #define THERMAL_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_itr 30 // R estimation iteration limit
#define TEMP_MODEL_CAL_T_low 50 // Default calibration cooling temperature (C) #define THERMAL_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_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" #include "thermal_model/e3d_REVO.h"
#define TEMP_MODEL_DEFAULT E3D_REVO // Default E3D REVO model parameters #define THERMAL_MODEL_DEFAULT E3D_REVO // Default E3D REVO model parameters
/*------------------------------------ /*------------------------------------

View File

@ -382,26 +382,26 @@
#define TEMP_RUNAWAY_EXTRUDER_TIMEOUT 45 #define TEMP_RUNAWAY_EXTRUDER_TIMEOUT 45
// model-based temperature check // model-based temperature check
#define TEMP_MODEL 1 // enable model-based temperature checks #define THERMAL_MODEL 1 // enable model-based temperature checks
#define TEMP_MODEL_DEBUG 1 // extended runtime logging #define THERMAL_MODEL_DEBUG 1 // extended runtime logging
#define TEMP_MODEL_CAL_C_low 5 // C estimation lower limit #define THERMAL_MODEL_CAL_C_low 5 // C estimation lower limit
#define TEMP_MODEL_CAL_C_high 20 // C estimation upper limit #define THERMAL_MODEL_CAL_C_high 20 // C estimation upper limit
#define TEMP_MODEL_CAL_C_thr 0.01 // C estimation iteration threshold #define THERMAL_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_itr 30 // C estimation iteration limit
#define TEMP_MODEL_CAL_R_low 5 // R estimation lower limit #define THERMAL_MODEL_CAL_R_low 5 // R estimation lower limit
#define TEMP_MODEL_CAL_R_high 50 // R estimation upper limit #define THERMAL_MODEL_CAL_R_high 50 // R estimation upper limit
#define TEMP_MODEL_CAL_R_thr 0.01 // R estimation iteration threshold #define THERMAL_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_itr 30 // R estimation iteration limit
#define TEMP_MODEL_CAL_T_low 50 // Default calibration cooling temperature (C) #define THERMAL_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_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" #include "thermal_model/e3d_REVO_HF_60W.h"
#define TEMP_MODEL_DEFAULT E3D_REVO_HF_60W // Default E3D REVO HF 60W model parameters #define THERMAL_MODEL_DEFAULT E3D_REVO_HF_60W // Default E3D REVO HF 60W model parameters
/*------------------------------------ /*------------------------------------

View File

@ -384,26 +384,26 @@
#define TEMP_RUNAWAY_EXTRUDER_TIMEOUT 45 #define TEMP_RUNAWAY_EXTRUDER_TIMEOUT 45
// model-based temperature check // model-based temperature check
#define TEMP_MODEL 1 // enable model-based temperature checks #define THERMAL_MODEL 1 // enable model-based temperature checks
#define TEMP_MODEL_DEBUG 1 // extended runtime logging #define THERMAL_MODEL_DEBUG 1 // extended runtime logging
#define TEMP_MODEL_CAL_C_low 5 // C estimation lower limit #define THERMAL_MODEL_CAL_C_low 5 // C estimation lower limit
#define TEMP_MODEL_CAL_C_high 20 // C estimation upper limit #define THERMAL_MODEL_CAL_C_high 20 // C estimation upper limit
#define TEMP_MODEL_CAL_C_thr 0.01 // C estimation iteration threshold #define THERMAL_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_itr 30 // C estimation iteration limit
#define TEMP_MODEL_CAL_R_low 5 // R estimation lower limit #define THERMAL_MODEL_CAL_R_low 5 // R estimation lower limit
#define TEMP_MODEL_CAL_R_high 50 // R estimation upper limit #define THERMAL_MODEL_CAL_R_high 50 // R estimation upper limit
#define TEMP_MODEL_CAL_R_thr 0.01 // R estimation iteration threshold #define THERMAL_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_itr 30 // R estimation iteration limit
#define TEMP_MODEL_CAL_T_low 50 // Default calibration cooling temperature (C) #define THERMAL_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_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_v6.h" #include "thermal_model/e3d_v6.h"
#define TEMP_MODEL_DEFAULT E3D_V6 // Default model parameters #define THERMAL_MODEL_DEFAULT E3D_V6 // Default model parameters
/*------------------------------------ /*------------------------------------

View File

@ -385,26 +385,26 @@
#define TEMP_RUNAWAY_EXTRUDER_TIMEOUT 45 #define TEMP_RUNAWAY_EXTRUDER_TIMEOUT 45
// model-based temperature check // model-based temperature check
#define TEMP_MODEL 1 // enable model-based temperature checks #define THERMAL_MODEL 1 // enable model-based temperature checks
#define TEMP_MODEL_DEBUG 1 // extended runtime logging #define THERMAL_MODEL_DEBUG 1 // extended runtime logging
#define TEMP_MODEL_CAL_C_low 5 // C estimation lower limit #define THERMAL_MODEL_CAL_C_low 5 // C estimation lower limit
#define TEMP_MODEL_CAL_C_high 20 // C estimation upper limit #define THERMAL_MODEL_CAL_C_high 20 // C estimation upper limit
#define TEMP_MODEL_CAL_C_thr 0.01 // C estimation iteration threshold #define THERMAL_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_itr 30 // C estimation iteration limit
#define TEMP_MODEL_CAL_R_low 5 // R estimation lower limit #define THERMAL_MODEL_CAL_R_low 5 // R estimation lower limit
#define TEMP_MODEL_CAL_R_high 50 // R estimation upper limit #define THERMAL_MODEL_CAL_R_high 50 // R estimation upper limit
#define TEMP_MODEL_CAL_R_thr 0.01 // R estimation iteration threshold #define THERMAL_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_itr 30 // R estimation iteration limit
#define TEMP_MODEL_CAL_T_low 50 // Default calibration cooling temperature (C) #define THERMAL_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_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" #include "thermal_model/e3d_REVO.h"
#define TEMP_MODEL_DEFAULT E3D_REVO // Default E3D REVO model parameters #define THERMAL_MODEL_DEFAULT E3D_REVO // Default E3D REVO model parameters
/*------------------------------------ /*------------------------------------

View File

@ -386,26 +386,26 @@
#define TEMP_RUNAWAY_EXTRUDER_TIMEOUT 45 #define TEMP_RUNAWAY_EXTRUDER_TIMEOUT 45
// model-based temperature check // model-based temperature check
#define TEMP_MODEL 1 // enable model-based temperature checks #define THERMAL_MODEL 1 // enable model-based temperature checks
#define TEMP_MODEL_DEBUG 1 // extended runtime logging #define THERMAL_MODEL_DEBUG 1 // extended runtime logging
#define TEMP_MODEL_CAL_C_low 5 // C estimation lower limit #define THERMAL_MODEL_CAL_C_low 5 // C estimation lower limit
#define TEMP_MODEL_CAL_C_high 20 // C estimation upper limit #define THERMAL_MODEL_CAL_C_high 20 // C estimation upper limit
#define TEMP_MODEL_CAL_C_thr 0.01 // C estimation iteration threshold #define THERMAL_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_itr 30 // C estimation iteration limit
#define TEMP_MODEL_CAL_R_low 5 // R estimation lower limit #define THERMAL_MODEL_CAL_R_low 5 // R estimation lower limit
#define TEMP_MODEL_CAL_R_high 50 // R estimation upper limit #define THERMAL_MODEL_CAL_R_high 50 // R estimation upper limit
#define TEMP_MODEL_CAL_R_thr 0.01 // R estimation iteration threshold #define THERMAL_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_itr 30 // R estimation iteration limit
#define TEMP_MODEL_CAL_T_low 50 // Default calibration cooling temperature (C) #define THERMAL_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_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" #include "thermal_model/e3d_REVO_HF_60W.h"
#define TEMP_MODEL_DEFAULT E3D_REVO_HF_60W // Default E3D REVO HF 60W model parameters #define THERMAL_MODEL_DEFAULT E3D_REVO_HF_60W // Default E3D REVO HF 60W model parameters
/*------------------------------------ /*------------------------------------

View File

@ -388,26 +388,26 @@
#define TEMP_RUNAWAY_EXTRUDER_TIMEOUT 45 #define TEMP_RUNAWAY_EXTRUDER_TIMEOUT 45
// model-based temperature check // model-based temperature check
#define TEMP_MODEL 1 // enable model-based temperature checks #define THERMAL_MODEL 1 // enable model-based temperature checks
#define TEMP_MODEL_DEBUG 1 // extended runtime logging #define THERMAL_MODEL_DEBUG 1 // extended runtime logging
#define TEMP_MODEL_CAL_C_low 5 // C estimation lower limit #define THERMAL_MODEL_CAL_C_low 5 // C estimation lower limit
#define TEMP_MODEL_CAL_C_high 20 // C estimation upper limit #define THERMAL_MODEL_CAL_C_high 20 // C estimation upper limit
#define TEMP_MODEL_CAL_C_thr 0.01 // C estimation iteration threshold #define THERMAL_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_itr 30 // C estimation iteration limit
#define TEMP_MODEL_CAL_R_low 5 // R estimation lower limit #define THERMAL_MODEL_CAL_R_low 5 // R estimation lower limit
#define TEMP_MODEL_CAL_R_high 50 // R estimation upper limit #define THERMAL_MODEL_CAL_R_high 50 // R estimation upper limit
#define TEMP_MODEL_CAL_R_thr 0.01 // R estimation iteration threshold #define THERMAL_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_itr 30 // R estimation iteration limit
#define TEMP_MODEL_CAL_T_low 50 // Default calibration cooling temperature (C) #define THERMAL_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_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_v6.h" #include "thermal_model/e3d_v6.h"
#define TEMP_MODEL_DEFAULT E3D_V6 // Default model parameters #define THERMAL_MODEL_DEFAULT E3D_V6 // Default model parameters
/*------------------------------------ /*------------------------------------

View File

@ -65,48 +65,48 @@ Example:
... ...
``` ```
8. Prepare for new 3rd party hotend TM value file 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 the `e3d_v6.h` to `<3rd party hotend:16>.h`
- Change below the `E3D_V6` to `<3rd party hotend:16>` - Change below the `E3D_V6` to `<3rd party hotend:16>`
``` ```
... ...
#include "temp_model/e3d_v6.h" #include "thermal_model/e3d_v6.h"
#define TEMP_MODEL_DEFAULT E3D_V6 // Default E3D v6 model parameters #define THERMAL_MODEL_DEFAULT E3D_V6 // Default E3D v6 model parameters
... ...
``` ```
Example: Example:
``` ```
... ...
#include "temp_model/e3d_REVO_HF_60W.h" #include "thermal_model/e3d_REVO_HF_60W.h"
#define TEMP_MODEL_DEFAULT E3D_REVO_HF_60W // Default E3D REVO HF 60W model parameters #define THERMAL_MODEL_DEFAULT E3D_REVO_HF_60W // Default E3D REVO HF 60W model parameters
... ...
``` ```
9. Save and close the new variant file 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` 10. Copy/paste `Firmware/thermal_model/e3d_v6.h` as `Firmware/thermal_model/<3rd party hotend:16>.h`
- Example: `Firmware/temp_model/e3d_REVO_HF_60W.h` - Example: `Firmware/thermal_model/e3d_REVO_HF_60W.h`
11. Open the new file `Firmware/temp_model/<3rd party hotend:16>.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 TEMP_MODEL_DEFAULT` 12. Search `E3D_V6` and replace it with what you have used in `#defined THERMAL_MODEL_DEFAULT`
- Example - Example
``` ```
#pragma once #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 THERMAL_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 THERMAL_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_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 THERMAL_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_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 THERMAL_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_LAG 270 // sim. response lag (ms, 0-2160)
#define TEMP_MODEL_E3D_REVO_HF_60W_W 1.2 // Default warning threshold (K/s) #define THERMAL_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_E 1.74 // Default error threshold (K/s)
// fall-back resistance vector (R0-15) // 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}
``` ```

View File

@ -2614,6 +2614,3 @@ msgstr "Došlo k neočekávané chybě."
#~ msgid "TM autotune failed" #~ msgid "TM autotune failed"
#~ msgstr "TM ladeni selhalo" #~ msgstr "TM ladeni selhalo"
#~ msgid "Temp. model autotune"
#~ msgstr "Ladeni tepl. modelu"

View File

@ -2642,6 +2642,3 @@ msgstr "Ein unerwarteter Fehler ist aufgetreten."
#~ msgid "TM autotune failed" #~ msgid "TM autotune failed"
#~ msgstr "TM kal. fehlgeschlg." #~ msgstr "TM kal. fehlgeschlg."
#~ msgid "Temp. model autotune"
#~ msgstr "Temp. Model Autokal."

View File

@ -2638,6 +2638,3 @@ msgstr "Ocurrió un error inesperado."
#~ msgid "TM autotune failed" #~ msgid "TM autotune failed"
#~ msgstr "Fallo autotune TM" #~ msgstr "Fallo autotune TM"
#~ msgid "Temp. model autotune"
#~ msgstr "Autotune model temp."

View File

@ -2653,6 +2653,3 @@ msgstr "Une erreur inattendue s'est produite."
#~ msgid "TM autotune failed" #~ msgid "TM autotune failed"
#~ msgstr "Echec regl. auto MT" #~ msgstr "Echec regl. auto MT"
#~ msgid "Temp. model autotune"
#~ msgstr "Regl. auto mod temp."

View File

@ -2635,9 +2635,6 @@ msgstr "Došlo je do neočekivane pogreške."
#~ msgid "TM autotune failed" #~ msgid "TM autotune failed"
#~ msgstr "TM autotune nije usp" #~ msgstr "TM autotune nije usp"
#~ msgid "Temp. model autotune"
#~ msgstr "Temp. autptune model"
#~ msgid "" #~ msgid ""
#~ "XYZ calibration compromised. Left front calibration point not reachable." #~ "XYZ calibration compromised. Left front calibration point not reachable."
#~ msgstr "" #~ msgstr ""

View File

@ -2637,9 +2637,6 @@ msgstr "Váratlan hiba történt."
#~ msgid "TM autotune failed" #~ msgid "TM autotune failed"
#~ msgstr "HM kalib. sikertelen" #~ msgstr "HM kalib. sikertelen"
#~ msgid "Temp. model autotune"
#~ msgstr "Homers. modell kalib"
#~ msgid "" #~ msgid ""
#~ "XYZ calibration compromised. Left front calibration point not reachable." #~ "XYZ calibration compromised. Left front calibration point not reachable."
#~ msgstr "XYZ kalibracio nem jo. Bal elso kal. pont nem elerheto." #~ msgstr "XYZ kalibracio nem jo. Bal elso kal. pont nem elerheto."

View File

@ -2636,9 +2636,6 @@ msgstr "Si è verificato un errore imprevisto."
#~ msgid "TM autotune failed" #~ msgid "TM autotune failed"
#~ msgstr "Autocal. MT fallita" #~ msgstr "Autocal. MT fallita"
#~ msgid "Temp. model autotune"
#~ msgstr "Cal. modello termico"
#~ msgid "" #~ msgid ""
#~ "XYZ calibration compromised. Left front calibration point not reachable." #~ "XYZ calibration compromised. Left front calibration point not reachable."
#~ msgstr "" #~ msgstr ""

View File

@ -2641,8 +2641,5 @@ msgstr "Er is een onverwachte fout opgetreden."
#~ msgid "TM autotune failed" #~ msgid "TM autotune failed"
#~ msgstr "TM autotune mislukt" #~ msgstr "TM autotune mislukt"
#~ msgid "Temp. model autotune"
#~ msgstr "Temp. model autotune"
#~ msgid "XYZ calibration failed. Left front calibration point not reachable." #~ msgid "XYZ calibration failed. Left front calibration point not reachable."
#~ msgstr "XYZ-kalibratie mislukt. Kalibratiepunt linksvoor niet bereikbaar." #~ msgstr "XYZ-kalibratie mislukt. Kalibratiepunt linksvoor niet bereikbaar."

View File

@ -2613,9 +2613,6 @@ msgstr "Det oppstod en uventet feil."
#~ msgid "TM autotune failed" #~ msgid "TM autotune failed"
#~ msgstr "TM autotune feilet" #~ msgstr "TM autotune feilet"
#~ msgid "Temp. model autotune"
#~ msgstr "Temp. model autotune"
#~ msgid "" #~ msgid ""
#~ "XYZ calibration compromised. Left front calibration point not reachable." #~ "XYZ calibration compromised. Left front calibration point not reachable."
#~ msgstr "XYZ kalibrasjon feilet. Fremre venstre kalibrerings kan ikke nås." #~ msgstr "XYZ kalibrasjon feilet. Fremre venstre kalibrerings kan ikke nås."

View File

@ -2631,6 +2631,3 @@ msgstr "Pojawił się nieoczekiwany błąd."
#~ msgid "TM autotune failed" #~ msgid "TM autotune failed"
#~ msgstr "Blad TM autotune" #~ msgstr "Blad TM autotune"
#~ msgid "Temp. model autotune"
#~ msgstr "Autotune modelu temp"

View File

@ -2633,9 +2633,6 @@ msgstr "A apărut o eroare neașteptată."
#~ msgid "TM autotune failed" #~ msgid "TM autotune failed"
#~ msgstr "Autotune TM esuat" #~ msgstr "Autotune TM esuat"
#~ msgid "Temp. model autotune"
#~ msgstr "Temp. model autotune"
#~ msgid "" #~ msgid ""
#~ "XYZ calibration compromised. Left front calibration point not reachable." #~ "XYZ calibration compromised. Left front calibration point not reachable."
#~ msgstr "" #~ msgstr ""

View File

@ -2616,9 +2616,6 @@ msgstr "Vyskytla sa neočakávaná chyba."
#~ msgid "TM autotune failed" #~ msgid "TM autotune failed"
#~ msgstr "TM autotune failed" #~ msgstr "TM autotune failed"
#~ msgid "Temp. model autotune"
#~ msgstr "Autom. nast. teploty"
#~ msgid "" #~ msgid ""
#~ "XYZ calibration compromised. Left front calibration point not reachable." #~ "XYZ calibration compromised. Left front calibration point not reachable."
#~ msgstr "Kalibracia XYZ je nepresna. Lavy predny bod je nedostupny." #~ msgstr "Kalibracia XYZ je nepresna. Lavy predny bod je nedostupny."

View File

@ -2625,9 +2625,6 @@ msgstr "Ett oväntat fel inträffade."
#~ msgid "TM autotune failed" #~ msgid "TM autotune failed"
#~ msgstr "TM autoinst fallerad" #~ msgstr "TM autoinst fallerad"
#~ msgid "Temp. model autotune"
#~ msgstr "Temp modell autoinst"
#~ msgid "" #~ msgid ""
#~ "XYZ calibration compromised. Left front calibration point not reachable." #~ "XYZ calibration compromised. Left front calibration point not reachable."
#~ msgstr "" #~ msgstr ""

View File

@ -67,9 +67,9 @@ Set the required TTY flags on the specified port to avoid reset-on-connect for *
### ``tml_decode`` ### ``tml_decode``
Decode (or plot) the temperature model trace from a serial log file. Decode (or plot) the thermal model trace from a serial log file.
The TML trace needs to be enabled by issuing "M155 S1 C3" and "D70 S1" to the printer, generally followed by a temperature model calibration request "M310 A F0". The TML trace needs to be enabled by issuing "M155 S1 C3" and "D70 S1" to the printer, generally followed by a thermal model calibration request "M310 A F0".
The parser is not strict, and will consume most serial logs with/without timestamps. The parser is not strict, and will consume most serial logs with/without timestamps.