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:
parent
0c4d885d5b
commit
2207001333
|
@ -448,11 +448,11 @@
|
|||
// @section extras
|
||||
|
||||
// Arc interpretation settings:
|
||||
#define ARC_SUPPORT // Disabling this saves ~2660bytes
|
||||
#define ARC_SUPPORT // Disabling this saves ~2738 bytes
|
||||
#define MM_PER_ARC_SEGMENT 1
|
||||
#define N_ARC_CORRECTION 25
|
||||
|
||||
// Support for G5 with XYZE destination and IJPQ offsets
|
||||
// Support for G5 with XYZE destination and IJPQ offsets. Needs ~2666 bytes
|
||||
//#define BEZIER_CURVE_SUPPORT
|
||||
|
||||
const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement
|
||||
|
|
|
@ -7604,13 +7604,14 @@ void prepare_move() {
|
|||
|
||||
float feed_rate = feedrate * feedrate_multiplier / 60 / 100.0;
|
||||
|
||||
millis_t previous_ms = millis();
|
||||
millis_t next_ping_ms = millis() + 200UL;
|
||||
|
||||
for (i = 1; i < segments; i++) { // Iterate (segments-1) times
|
||||
|
||||
thermalManager.manage_heater();
|
||||
millis_t now = millis();
|
||||
if (now - previous_ms > 200UL) {
|
||||
previous_ms = now;
|
||||
if (ELAPSED(now, next_ping_ms)) {
|
||||
next_ping_ms = now + 200UL;
|
||||
idle();
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue