Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't sleep needlessly and delay commands from serial port. #10

Open
wants to merge 1 commit into
base: multimaterials
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions Marlin/Marlin.pde
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ const int sensitive_pins[] = SENSITIVE_PINS; // Sensitive pin list for M42
static unsigned long previous_millis_cmd = 0;
static unsigned long max_inactive_time = 0;
static unsigned long stepper_inactive_time = DEFAULT_STEPPER_DEACTIVE_TIME*1000l;
static unsigned long inactivity_time = 0;

static unsigned long starttime=0;
static unsigned long stoptime=0;
Expand Down Expand Up @@ -1795,14 +1794,8 @@ void controllerFan()
}
#endif

// This is called in a tight loop. No need for that; once every five seconds should do - AB

void manage_inactivity(byte debug)
{
if((long)(inactivity_time - millis()) > 0)
return;
inactivity_time += 5000ul;

if( (millis() - previous_millis_cmd) > max_inactive_time )
if(max_inactive_time)
Stop();
Expand Down