Skip to content

Commit d53eb69

Browse files
committed
Manually cast to int when comparing against extrude_min_temp
Avoid the automatic conversion to float to improve code size.
1 parent ea46402 commit d53eb69

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Firmware/Marlin_main.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -3421,7 +3421,7 @@ static void gcode_G80()
34213421
go_home_with_z_lift();
34223422
// SERIAL_ECHOLNPGM("Go home finished");
34233423
//unretract (after PINDA preheat retraction)
3424-
if ((degHotend(active_extruder) > extrude_min_temp) && eeprom_read_byte((unsigned char *)EEPROM_TEMP_CAL_ACTIVE) && calibration_status_pinda() && (target_temperature_bed >= 50)) {
3424+
if (((int)degHotend(active_extruder) > extrude_min_temp) && eeprom_read_byte((unsigned char *)EEPROM_TEMP_CAL_ACTIVE) && calibration_status_pinda() && (target_temperature_bed >= 50)) {
34253425
current_position[E_AXIS] += default_retraction;
34263426
plan_buffer_line_curposXYZE(400);
34273427
}
@@ -9860,7 +9860,7 @@ static uint16_t nFSCheckCount=0;
98609860
#ifdef PAT9125
98619861
fsensor_autoload_check_stop();
98629862
#endif //PAT9125
9863-
//-// if (degHotend0() > extrude_min_temp)
9863+
//-// if ((int)degHotend0() > extrude_min_temp)
98649864
if(0)
98659865
{
98669866
Sound_MakeCustom(50,1000,false);
@@ -10801,7 +10801,7 @@ static void temp_compensation_start() {
1080110801
custom_message_type = CustomMsg::TempCompPreheat;
1080210802
custom_message_state = PINDA_HEAT_T + 1;
1080310803
lcd_update(2);
10804-
if (degHotend(active_extruder) > extrude_min_temp) {
10804+
if ((int)degHotend(active_extruder) > extrude_min_temp) {
1080510805
current_position[E_AXIS] -= default_retraction;
1080610806
}
1080710807
plan_buffer_line_curposXYZE(400, active_extruder);

Firmware/planner.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ void plan_buffer_line(float x, float y, float z, const float &e, float feed_rate
833833
#ifdef PREVENT_DANGEROUS_EXTRUDE
834834
if(target[E_AXIS]!=position[E_AXIS])
835835
{
836-
if(degHotend(active_extruder)<extrude_min_temp)
836+
if((int)degHotend(active_extruder)<extrude_min_temp)
837837
{
838838
position[E_AXIS]=target[E_AXIS]; //behave as if the move really took place, but ignore E part
839839
#ifdef LIN_ADVANCE

Firmware/ultralcd.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2447,7 +2447,7 @@ static void _lcd_move(const char *name, uint8_t axis, int min, int max)
24472447

24482448
void lcd_move_e()
24492449
{
2450-
if (degHotend0() > extrude_min_temp)
2450+
if ((int)degHotend0() > extrude_min_temp)
24512451
{
24522452
if (lcd_encoder != 0)
24532453
{

0 commit comments

Comments
 (0)