Catch dangerous extrude before trying several

This commit is contained in:
Scott Lahteine
2015-04-09 01:40:48 -07:00
parent bb917ecda8
commit 1269c445ab
4 changed files with 54 additions and 49 deletions

View File

@ -113,9 +113,6 @@ volatile unsigned char block_buffer_tail; // Index of the block to pro
//===========================================================================
//=============================private variables ============================
//===========================================================================
#ifdef PREVENT_DANGEROUS_EXTRUDE
float extrude_min_temp = EXTRUDE_MINTEMP;
#endif
#ifdef XY_FREQUENCY_LIMIT
// Used for the frequency limit
#define MAX_FREQ_TIME (1000000.0/XY_FREQUENCY_LIMIT)
@ -508,7 +505,7 @@ float junction_deviation = 0.1;
#ifdef PREVENT_DANGEROUS_EXTRUDE
if (de) {
if (degHotend(active_extruder) < extrude_min_temp) {
position[E_AXIS] = target[E_AXIS]; //behave as if the move really took place, but ignore E part
position[E_AXIS] = target[E_AXIS]; // Behave as if the move really took place, but ignore E part
de = 0; // no difference
SERIAL_ECHO_START;
SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP);
@ -998,10 +995,6 @@ void plan_set_e_position(const float &e) {
st_set_e_position(position[E_AXIS]);
}
#ifdef PREVENT_DANGEROUS_EXTRUDE
void set_extrude_min_temp(float temp) { extrude_min_temp = temp; }
#endif
// Calculate the steps/s^2 acceleration rates, based on the mm/s^s
void reset_acceleration_rates() {
for (int i = 0; i < NUM_AXIS; i++)