disable steppers as routine in stepper.cpp

This commit is contained in:
Bernhard 2011-11-26 11:50:23 +01:00
parent 74d0032e25
commit 4d6a5c29df
3 changed files with 14 additions and 6 deletions

View file

@ -641,6 +641,7 @@ inline void process_commands()
//processed in write to file routine above //processed in write to file routine above
//card,saving = false; //card,saving = false;
break; break;
#endif //SDSUPPORT #endif //SDSUPPORT
case 30: //M30 take time since the start of the SD print or an M109 command case 30: //M30 take time since the start of the SD print or an M109 command
@ -832,12 +833,7 @@ inline void process_commands()
} }
else else
{ {
st_synchronize(); finishAndDisableSteppers();
LCD_MESSAGEPGM("Free move.");
disable_x();
disable_y();
disable_z();
disable_e();
} }
break; break;
case 85: // M85 case 85: // M85

View file

@ -702,3 +702,13 @@ long st_get_position(char axis)
CRITICAL_SECTION_END; CRITICAL_SECTION_END;
return count_pos; return count_pos;
} }
void finishAndDisableSteppers()
{
st_synchronize();
LCD_MESSAGEPGM("Released.");
disable_x();
disable_y();
disable_z();
disable_e();
}

View file

@ -46,6 +46,8 @@ void endstops_hit_on_purpose(); //avoid creation of the message, i.e. after home
void checkStepperErrors(); //Print errors detected by the stepper void checkStepperErrors(); //Print errors detected by the stepper
void finishAndDisableSteppers();
extern block_t *current_block; // A pointer to the block currently being traced extern block_t *current_block; // A pointer to the block currently being traced