@@ -228,6 +228,10 @@ uint8_t newFanSpeed = 0;
228
228
float retract_recover_length_swap = RETRACT_RECOVER_LENGTH_SWAP;
229
229
#endif
230
230
231
+ #ifndef PINDA_THERMISTOR
232
+ static bool temp_compensation_retracted = false ;
233
+ #endif // !PINDA_THERMISTOR
234
+
231
235
#ifdef PS_DEFAULT_OFF
232
236
bool powersupply = false ;
233
237
#else
@@ -385,7 +389,7 @@ static void gcode_G28(bool home_x_axis, bool home_y_axis, bool home_z_axis);
385
389
static void gcode_M105 ();
386
390
387
391
#ifndef PINDA_THERMISTOR
388
- static bool temp_compensation_start ();
392
+ static void temp_compensation_start ();
389
393
static void temp_compensation_apply ();
390
394
#endif
391
395
@@ -2838,10 +2842,9 @@ static void gcode_G80()
2838
2842
bool magnet_elimination = (eeprom_read_byte ((uint8_t *)EEPROM_MBL_MAGNET_ELIMINATION) > 0 );
2839
2843
2840
2844
#ifndef PINDA_THERMISTOR
2841
- static bool temp_compensation_retracted = false ;
2842
2845
if (run == false && eeprom_read_byte ((uint8_t *)EEPROM_TEMP_CAL_ACTIVE) && calibration_status_pinda () == true && target_temperature_bed >= 50 )
2843
2846
{
2844
- temp_compensation_retracted = temp_compensation_start ();
2847
+ temp_compensation_start ();
2845
2848
run = true ;
2846
2849
repeatcommand_front (); // repeat G80 with all its parameters
2847
2850
enquecommand_front_P (G28W);
@@ -10242,14 +10245,13 @@ void bed_analysis(float x_dimension, float y_dimension, int x_points_num, int y_
10242
10245
#endif // HEATBED_ANALYSIS
10243
10246
10244
10247
#ifndef PINDA_THERMISTOR
10245
- static bool temp_compensation_start () {
10246
- bool retracted = false ;
10248
+ static void temp_compensation_start () {
10247
10249
custom_message_type = CustomMsg::TempCompPreheat;
10248
10250
custom_message_state = PINDA_HEAT_T + 1 ;
10249
10251
lcd_update (2 );
10250
- if ((int )degHotend (active_extruder) > extrude_min_temp) {
10252
+ if (!temp_compensation_retracted && (int )degHotend (active_extruder) > extrude_min_temp) {
10253
+ temp_compensation_retracted = true ;
10251
10254
current_position[E_AXIS] -= default_retraction;
10252
- retracted = true ;
10253
10255
}
10254
10256
plan_buffer_line_curposXYZE (400 );
10255
10257
@@ -10268,7 +10270,6 @@ static bool temp_compensation_start() {
10268
10270
}
10269
10271
custom_message_type = CustomMsg::Status;
10270
10272
custom_message_state = 0 ;
10271
- return retracted;
10272
10273
}
10273
10274
10274
10275
static void temp_compensation_apply () {
0 commit comments