cardreader - new member "paused"

tmc2130 - decreased crash sensitivity for Y
This commit is contained in:
Robert Pelnar 2018-01-31 15:20:27 +01:00
parent 4c5618c371
commit 1a01282e33
3 changed files with 7 additions and 2 deletions

View file

@ -25,6 +25,7 @@ CardReader::CardReader()
sdpos = 0; sdpos = 0;
sdprinting = false; sdprinting = false;
cardOK = false; cardOK = false;
paused = false;
saving = false; saving = false;
logging = false; logging = false;
autostart_atmillis=0; autostart_atmillis=0;
@ -240,6 +241,7 @@ void CardReader::startFileprint()
if(cardOK) if(cardOK)
{ {
sdprinting = true; sdprinting = true;
paused = false;
#ifdef SDCARD_SORT_ALPHA #ifdef SDCARD_SORT_ALPHA
//flush_presort(); //flush_presort();
#endif #endif
@ -251,6 +253,7 @@ void CardReader::pauseSDPrint()
if(sdprinting) if(sdprinting)
{ {
sdprinting = false; sdprinting = false;
paused = true;
} }
} }
@ -333,6 +336,7 @@ void CardReader::openFile(char* name,bool read, bool replace_current/*=true*/)
SERIAL_ECHOLN(name); SERIAL_ECHOLN(name);
} }
sdprinting = false; sdprinting = false;
paused = false;
SdFile myDir; SdFile myDir;

View file

@ -75,6 +75,7 @@ public:
bool logging; bool logging;
bool sdprinting ; bool sdprinting ;
bool cardOK ; bool cardOK ;
bool paused ;
char filename[13]; char filename[13];
uint16_t creationTime, creationDate; uint16_t creationTime, creationDate;
uint32_t cluster, position; uint32_t cluster, position;

View file

@ -247,8 +247,8 @@ void tmc2130_st_isr(uint8_t last_step_mask)
{ {
tmc2130_sg_cnt[axis] = tmc2130_sg_err[axis]; tmc2130_sg_cnt[axis] = tmc2130_sg_err[axis];
tmc2130_sg_change = true; tmc2130_sg_change = true;
uint8_t sg_thr = 48; uint8_t sg_thr = 64;
if (axis == Y_AXIS) sg_thr = 64; // if (axis == Y_AXIS) sg_thr = 64;
if (tmc2130_sg_err[axis] >= sg_thr) if (tmc2130_sg_err[axis] >= sg_thr)
{ {
tmc2130_sg_err[axis] = 0; tmc2130_sg_err[axis] = 0;