ソースを参照

Improve runout sensor, fix LIGHTWEIGHT_UI screen size (#12544)

Marcio Teixeira 5年前
コミット
439a3e8463
2個のファイルの変更10行の追加10行の削除
  1. 8
    4
      Marlin/src/feature/runout.h
  2. 2
    6
      Marlin/src/inc/Conditionals_post.h

+ 8
- 4
Marlin/src/feature/runout.h ファイルの表示

@@ -186,7 +186,8 @@ class FilamentSensorBase {
186 186
         old_state = new_state;
187 187
 
188 188
         #ifdef FILAMENT_RUNOUT_SENSOR_DEBUG
189
-          if (change) SERIAL_PROTOCOLLNPAIR("Motion detected: ", int(change));
189
+          for (uint8_t e = 0; e < EXTRUDERS; e++)
190
+            if (TEST(change, e)) SERIAL_PROTOCOLLNPAIR("Motion detected T", e);
190 191
         #endif
191 192
 
192 193
         motion_detected |= change;
@@ -295,9 +296,12 @@ class FilamentSensorBase {
295 296
       }
296 297
 
297 298
       static inline void block_completed(const block_t* const b) {
298
-        const uint8_t e = b->extruder;
299
-        const int32_t steps = b->steps[E_AXIS];
300
-        runout_mm_countdown[e] -= (TEST(b->direction_bits, E_AXIS) ? -steps : steps) * planner.steps_to_mm[E_AXIS_N(e)];
299
+        if (b->steps[X_AXIS] || b->steps[Y_AXIS] || b->steps[Z_AXIS]) {
300
+          // Only trigger on extrusion with XYZ movement to allow filament change and retract/recover.
301
+          const uint8_t e = b->extruder;
302
+          const int32_t steps = b->steps[E_AXIS];
303
+          runout_mm_countdown[e] -= (TEST(b->direction_bits, E_AXIS) ? -steps : steps) * planner.steps_to_mm[E_AXIS_N(e)];
304
+        }
301 305
       }
302 306
   };
303 307
 

+ 2
- 6
Marlin/src/inc/Conditionals_post.h ファイルの表示

@@ -1641,9 +1641,7 @@
1641 1641
 
1642 1642
 // Get LCD character width/height, which may be overridden by pins, configs, etc.
1643 1643
 #ifndef LCD_WIDTH
1644
-  #if ENABLED(LIGHTWEIGHT_UI)
1645
-    #define LCD_WIDTH 16
1646
-  #elif HAS_GRAPHICAL_LCD
1644
+  #if HAS_GRAPHICAL_LCD
1647 1645
     #define LCD_WIDTH 22
1648 1646
   #elif ENABLED(ULTIPANEL)
1649 1647
     #define LCD_WIDTH 20
@@ -1652,9 +1650,7 @@
1652 1650
   #endif
1653 1651
 #endif
1654 1652
 #ifndef LCD_HEIGHT
1655
-  #if ENABLED(LIGHTWEIGHT_UI)
1656
-    #define LCD_HEIGHT 4
1657
-  #elif HAS_GRAPHICAL_LCD
1653
+  #if HAS_GRAPHICAL_LCD
1658 1654
     #define LCD_HEIGHT 5
1659 1655
   #elif ENABLED(ULTIPANEL)
1660 1656
     #define LCD_HEIGHT 4

読み込み中…
キャンセル
保存