Browse Source

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.
AnHardt 8 years ago
parent
commit
2207001333
3 changed files with 8 additions and 7 deletions
  1. 2
    2
      Marlin/Configuration_adv.h
  2. 4
    3
      Marlin/Marlin_main.cpp
  3. 2
    2
      Marlin/planner_bezier.cpp

+ 2
- 2
Marlin/Configuration_adv.h View File

@@ -448,11 +448,11 @@
448 448
 // @section extras
449 449
 
450 450
 // Arc interpretation settings:
451
-#define ARC_SUPPORT  // Disabling this saves ~2660bytes
451
+#define ARC_SUPPORT  // Disabling this saves ~2738 bytes
452 452
 #define MM_PER_ARC_SEGMENT 1
453 453
 #define N_ARC_CORRECTION 25
454 454
 
455
-// Support for G5 with XYZE destination and IJPQ offsets
455
+// Support for G5 with XYZE destination and IJPQ offsets. Needs ~2666 bytes
456 456
 //#define BEZIER_CURVE_SUPPORT
457 457
 
458 458
 const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement

+ 4
- 3
Marlin/Marlin_main.cpp View File

@@ -7604,13 +7604,14 @@ void prepare_move() {
7604 7604
 
7605 7605
     float feed_rate = feedrate * feedrate_multiplier / 60 / 100.0;
7606 7606
 
7607
-    millis_t previous_ms = millis();
7607
+    millis_t next_ping_ms = millis() + 200UL;
7608 7608
 
7609 7609
     for (i = 1; i < segments; i++) { // Iterate (segments-1) times
7610 7610
 
7611
+      thermalManager.manage_heater();
7611 7612
       millis_t now = millis();
7612
-      if (now - previous_ms > 200UL) {
7613
-        previous_ms = now;
7613
+      if (ELAPSED(now, next_ping_ms)) {
7614
+        next_ping_ms = now + 200UL;
7614 7615
         idle();
7615 7616
       }
7616 7617
 

+ 2
- 2
Marlin/planner_bezier.cpp View File

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

Loading…
Cancel
Save