Manually cast to int when comparing against extrude_min_temp

Avoid the automatic conversion to float to improve code size.
This commit is contained in:
Yuri D'Elia 2022-05-12 12:20:54 +02:00
parent ea46402e4d
commit d53eb69150
3 changed files with 5 additions and 5 deletions

View File

@ -3421,7 +3421,7 @@ static void gcode_G80()
go_home_with_z_lift();
// SERIAL_ECHOLNPGM("Go home finished");
//unretract (after PINDA preheat retraction)
if ((degHotend(active_extruder) > extrude_min_temp) && eeprom_read_byte((unsigned char *)EEPROM_TEMP_CAL_ACTIVE) && calibration_status_pinda() && (target_temperature_bed >= 50)) {
if (((int)degHotend(active_extruder) > extrude_min_temp) && eeprom_read_byte((unsigned char *)EEPROM_TEMP_CAL_ACTIVE) && calibration_status_pinda() && (target_temperature_bed >= 50)) {
current_position[E_AXIS] += default_retraction;
plan_buffer_line_curposXYZE(400);
}
@ -9860,7 +9860,7 @@ static uint16_t nFSCheckCount=0;
#ifdef PAT9125
fsensor_autoload_check_stop();
#endif //PAT9125
//-// if (degHotend0() > extrude_min_temp)
//-// if ((int)degHotend0() > extrude_min_temp)
if(0)
{
Sound_MakeCustom(50,1000,false);
@ -10801,7 +10801,7 @@ static void temp_compensation_start() {
custom_message_type = CustomMsg::TempCompPreheat;
custom_message_state = PINDA_HEAT_T + 1;
lcd_update(2);
if (degHotend(active_extruder) > extrude_min_temp) {
if ((int)degHotend(active_extruder) > extrude_min_temp) {
current_position[E_AXIS] -= default_retraction;
}
plan_buffer_line_curposXYZE(400, active_extruder);

View File

@ -833,7 +833,7 @@ void plan_buffer_line(float x, float y, float z, const float &e, float feed_rate
#ifdef PREVENT_DANGEROUS_EXTRUDE
if(target[E_AXIS]!=position[E_AXIS])
{
if(degHotend(active_extruder)<extrude_min_temp)
if((int)degHotend(active_extruder)<extrude_min_temp)
{
position[E_AXIS]=target[E_AXIS]; //behave as if the move really took place, but ignore E part
#ifdef LIN_ADVANCE

View File

@ -2447,7 +2447,7 @@ static void _lcd_move(const char *name, uint8_t axis, int min, int max)
void lcd_move_e()
{
if (degHotend0() > extrude_min_temp)
if ((int)degHotend0() > extrude_min_temp)
{
if (lcd_encoder != 0)
{