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

View file

@ -75,6 +75,7 @@ public:
bool logging;
bool sdprinting ;
bool cardOK ;
bool paused ;
char filename[13];
uint16_t creationTime, creationDate;
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_change = true;
uint8_t sg_thr = 48;
if (axis == Y_AXIS) sg_thr = 64;
uint8_t sg_thr = 64;
// if (axis == Y_AXIS) sg_thr = 64;
if (tmc2130_sg_err[axis] >= sg_thr)
{
tmc2130_sg_err[axis] = 0;