|
|
|
@ -157,12 +157,12 @@ float add_homeing[3]={0,0,0};
|
|
|
|
|
float min_pos[3] = { X_MIN_POS, Y_MIN_POS, Z_MIN_POS };
|
|
|
|
|
float max_pos[3] = { X_MAX_POS, Y_MAX_POS, Z_MAX_POS };
|
|
|
|
|
// Extruder offset, only in XY plane
|
|
|
|
|
#if EXTRUDERS > 1
|
|
|
|
|
#if EXTRUDERS > 1
|
|
|
|
|
float extruder_offset[2][EXTRUDERS] = {
|
|
|
|
|
#if defined(EXTRUDER_OFFSET_X) && defined(EXTRUDER_OFFSET_Y)
|
|
|
|
|
EXTRUDER_OFFSET_X, EXTRUDER_OFFSET_Y
|
|
|
|
|
#endif
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
#endif
|
|
|
|
|
uint8_t active_extruder = 0;
|
|
|
|
|
int fanSpeed=0;
|
|
|
|
@ -376,6 +376,14 @@ void setup()
|
|
|
|
|
setup_photpin();
|
|
|
|
|
|
|
|
|
|
lcd_init();
|
|
|
|
|
|
|
|
|
|
#ifdef CONTROLLERFAN_PIN
|
|
|
|
|
SET_OUTPUT(CONTROLLERFAN_PIN); //Set pin used for driver cooling fan
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifdef EXTRUDERFAN_PIN
|
|
|
|
|
SET_OUTPUT(EXTRUDERFAN_PIN); //Set pin used for extruder cooling fan
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1380,7 +1388,7 @@ void process_commands()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}break;
|
|
|
|
|
#endif // FWRETRACT
|
|
|
|
|
#endif // FWRETRACT
|
|
|
|
|
#if EXTRUDERS > 1
|
|
|
|
|
case 218: // M218 - set hotend offset (in mm), T<extruder_number> X<offset_on_X> Y<offset_on_Y>
|
|
|
|
|
{
|
|
|
|
@ -1405,7 +1413,7 @@ void process_commands()
|
|
|
|
|
SERIAL_ECHO(extruder_offset[Y_AXIS][tmp_extruder]);
|
|
|
|
|
}
|
|
|
|
|
SERIAL_ECHOLN("");
|
|
|
|
|
}break;
|
|
|
|
|
}break;
|
|
|
|
|
#endif
|
|
|
|
|
case 220: // M220 S<factor in percent>- set speed factor override percentage
|
|
|
|
|
{
|
|
|
|
@ -1756,7 +1764,7 @@ void process_commands()
|
|
|
|
|
if(make_move && Stopped == false) {
|
|
|
|
|
prepare_move();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
SERIAL_ECHO_START;
|
|
|
|
|
SERIAL_ECHO(MSG_ACTIVE_EXTRUDER);
|
|
|
|
@ -1953,6 +1961,27 @@ void controllerFan()
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifdef EXTRUDERFAN_PIN
|
|
|
|
|
unsigned long lastExtruderCheck = 0;
|
|
|
|
|
|
|
|
|
|
void extruderFan()
|
|
|
|
|
{
|
|
|
|
|
if ((millis() - lastExtruderCheck) >= 2500) //Not a time critical function, so we only check every 2500ms
|
|
|
|
|
{
|
|
|
|
|
lastExtruderCheck = millis();
|
|
|
|
|
|
|
|
|
|
if (degHotend(active_extruder) < EXTRUDERFAN_DEC)
|
|
|
|
|
{
|
|
|
|
|
WRITE(EXTRUDERFAN_PIN, LOW); //... turn the fan off
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
WRITE(EXTRUDERFAN_PIN, HIGH); //... turn the fan on
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
void manage_inactivity()
|
|
|
|
|
{
|
|
|
|
|
if( (millis() - previous_millis_cmd) > max_inactive_time )
|
|
|
|
|