Kaynağa Gözat

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 9 yıl önce
ebeveyn
işleme
2207001333

+ 2
- 2
Marlin/Configuration_adv.h Dosyayı Görüntüle

448
 // @section extras
448
 // @section extras
449
 
449
 
450
 // Arc interpretation settings:
450
 // Arc interpretation settings:
451
-#define ARC_SUPPORT  // Disabling this saves ~2660bytes
451
+#define ARC_SUPPORT  // Disabling this saves ~2738 bytes
452
 #define MM_PER_ARC_SEGMENT 1
452
 #define MM_PER_ARC_SEGMENT 1
453
 #define N_ARC_CORRECTION 25
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
 //#define BEZIER_CURVE_SUPPORT
456
 //#define BEZIER_CURVE_SUPPORT
457
 
457
 
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
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 Dosyayı Görüntüle

7604
 
7604
 
7605
     float feed_rate = feedrate * feedrate_multiplier / 60 / 100.0;
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
     for (i = 1; i < segments; i++) { // Iterate (segments-1) times
7609
     for (i = 1; i < segments; i++) { // Iterate (segments-1) times
7610
 
7610
 
7611
+      thermalManager.manage_heater();
7611
       millis_t now = millis();
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
         idle();
7615
         idle();
7615
       }
7616
       }
7616
 
7617
 

+ 2
- 2
Marlin/planner_bezier.cpp Dosyayı Görüntüle

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

Loading…
İptal
Kaydet