instant stop of sd prints from the panel.
This commit is contained in:
parent
01001b89d2
commit
82c99625fa
3 changed files with 11 additions and 1 deletions
|
@ -432,6 +432,7 @@ void CardReader::updir()
|
||||||
|
|
||||||
void CardReader::printingHasFinished()
|
void CardReader::printingHasFinished()
|
||||||
{
|
{
|
||||||
|
quickStop();
|
||||||
sdprinting = false;
|
sdprinting = false;
|
||||||
if(SD_FINISHED_STEPPERRELEASE)
|
if(SD_FINISHED_STEPPERRELEASE)
|
||||||
{
|
{
|
||||||
|
|
|
@ -752,3 +752,12 @@ void finishAndDisableSteppers()
|
||||||
disable_z();
|
disable_z();
|
||||||
disable_e();
|
disable_e();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void quickStop()
|
||||||
|
{
|
||||||
|
DISABLE_STEPPER_DRIVER_INTERRUPT();
|
||||||
|
while(blocks_queued())
|
||||||
|
plan_discard_current_block();
|
||||||
|
ENABLE_STEPPER_DRIVER_INTERRUPT();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,5 +52,5 @@ 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
|
||||||
|
|
||||||
|
void quickStop();
|
||||||
#endif
|
#endif
|
||||||
|
|
Reference in a new issue