No compromises for the manage_heater()

No compromises for the manage_heater(). manage_heater() will return immediately when there is nothing to do, but needs a constant detaT to work proper.
Calling idle() only every 200ms results in a display update every ~2 seconds - that should be enough.
For the other functionalities in idle() and manage_inactivity() 200ms is a lot but hopefully works.
This commit is contained in:
AnHardt
2016-05-19 20:52:11 +02:00
parent 0c4d885d5b
commit 2207001333
3 changed files with 8 additions and 7 deletions

View File

@ -118,15 +118,15 @@ void cubic_b_spline(const float position[NUM_AXIS], const float target[NUM_AXIS]
bez_target[Y_AXIS] = position[Y_AXIS];
float step = MAX_STEP;
uint8_t idle_counter = 0;
millis_t next_ping_ms = millis() + 200UL;
while (t < 1.0) {
thermalManager.manage_heater();
millis_t now = millis();
if (ELAPSED(now, next_ping_ms)) {
next_ping_ms = now + 200UL;
(idle_counter++ & 0x03) ? thermalManager.manage_heater() : idle();
idle();
}
// First try to reduce the step in order to make it sufficiently