Merge pull request #5253 from thinkyhead/rc_smooth_move_ex-lax

Ensure smooth print moves even with LCD enabled
This commit is contained in:
Scott Lahteine 2016-11-19 01:38:41 -06:00 committed by GitHub
commit 79c8591192
21 changed files with 619 additions and 54 deletions

View File

@ -496,6 +496,35 @@
#define BABYSTEP_MULTIPLICATOR 1 //faster movements #define BABYSTEP_MULTIPLICATOR 1 //faster movements
#endif #endif
//
// Ensure Smooth Moves
//
// Enable this option to prevent the machine from stuttering when printing multiple short segments.
// This feature uses two strategies to eliminate stuttering:
//
// 1. During short segments a Graphical LCD update may take so much time that the planner buffer gets
// completely drained. When this happens pauses are introduced between short segments, and print moves
// will become jerky until a longer segment provides enough time for the buffer to be filled again.
// This jerkiness negatively affects print quality. The ENSURE_SMOOTH_MOVES option addresses the issue
// by pausing the LCD until there's enough time to safely update.
//
// NOTE: This will cause the Info Screen to lag and controller buttons may become unresponsive.
// Enable ALWAYS_ALLOW_MENU to keep the controller responsive.
//
// 2. No block is allowed to take less time than MIN_BLOCK_TIME. That's the time it takes in the main
// loop to add a new block to the buffer, check temperatures, etc., including all blocked time due to
// interrupts (without LCD update). By enforcing a minimum time-per-move, the buffer is prevented from
// draining.
//
//#define ENSURE_SMOOTH_MOVES
#if ENABLED(ENSURE_SMOOTH_MOVES)
//#define ALWAYS_ALLOW_MENU // If enabled, the menu will always be responsive.
// WARNING: Menu navigation during short moves may cause stuttering!
#define LCD_UPDATE_THRESHOLD 170 // (ms) Minimum duration for the current segment to allow an LCD update.
// Default value is good for graphical LCDs (e.g., REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER).
#define MIN_BLOCK_TIME 6 // (ms) Minimum duration of a single block. You shouldn't need to modify this.
#endif
// @section extruder // @section extruder
// extruder advance constant (s2/mm3) // extruder advance constant (s2/mm3)

View File

@ -496,6 +496,35 @@
#define BABYSTEP_MULTIPLICATOR 1 //faster movements #define BABYSTEP_MULTIPLICATOR 1 //faster movements
#endif #endif
//
// Ensure Smooth Moves
//
// Enable this option to prevent the machine from stuttering when printing multiple short segments.
// This feature uses two strategies to eliminate stuttering:
//
// 1. During short segments a Graphical LCD update may take so much time that the planner buffer gets
// completely drained. When this happens pauses are introduced between short segments, and print moves
// will become jerky until a longer segment provides enough time for the buffer to be filled again.
// This jerkiness negatively affects print quality. The ENSURE_SMOOTH_MOVES option addresses the issue
// by pausing the LCD until there's enough time to safely update.
//
// NOTE: This will cause the Info Screen to lag and controller buttons may become unresponsive.
// Enable ALWAYS_ALLOW_MENU to keep the controller responsive.
//
// 2. No block is allowed to take less time than MIN_BLOCK_TIME. That's the time it takes in the main
// loop to add a new block to the buffer, check temperatures, etc., including all blocked time due to
// interrupts (without LCD update). By enforcing a minimum time-per-move, the buffer is prevented from
// draining.
//
//#define ENSURE_SMOOTH_MOVES
#if ENABLED(ENSURE_SMOOTH_MOVES)
//#define ALWAYS_ALLOW_MENU // If enabled, the menu will always be responsive.
// WARNING: Menu navigation during short moves may cause stuttering!
#define LCD_UPDATE_THRESHOLD 170 // (ms) Minimum duration for the current segment to allow an LCD update.
// Default value is good for graphical LCDs (e.g., REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER).
#define MIN_BLOCK_TIME 6 // (ms) Minimum duration of a single block. You shouldn't need to modify this.
#endif
// @section extruder // @section extruder
// extruder advance constant (s2/mm3) // extruder advance constant (s2/mm3)

View File

@ -496,6 +496,35 @@
#define BABYSTEP_MULTIPLICATOR 1 //faster movements #define BABYSTEP_MULTIPLICATOR 1 //faster movements
#endif #endif
//
// Ensure Smooth Moves
//
// Enable this option to prevent the machine from stuttering when printing multiple short segments.
// This feature uses two strategies to eliminate stuttering:
//
// 1. During short segments a Graphical LCD update may take so much time that the planner buffer gets
// completely drained. When this happens pauses are introduced between short segments, and print moves
// will become jerky until a longer segment provides enough time for the buffer to be filled again.
// This jerkiness negatively affects print quality. The ENSURE_SMOOTH_MOVES option addresses the issue
// by pausing the LCD until there's enough time to safely update.
//
// NOTE: This will cause the Info Screen to lag and controller buttons may become unresponsive.
// Enable ALWAYS_ALLOW_MENU to keep the controller responsive.
//
// 2. No block is allowed to take less time than MIN_BLOCK_TIME. That's the time it takes in the main
// loop to add a new block to the buffer, check temperatures, etc., including all blocked time due to
// interrupts (without LCD update). By enforcing a minimum time-per-move, the buffer is prevented from
// draining.
//
//#define ENSURE_SMOOTH_MOVES
#if ENABLED(ENSURE_SMOOTH_MOVES)
//#define ALWAYS_ALLOW_MENU // If enabled, the menu will always be responsive.
// WARNING: Menu navigation during short moves may cause stuttering!
#define LCD_UPDATE_THRESHOLD 170 // (ms) Minimum duration for the current segment to allow an LCD update.
// Default value is good for graphical LCDs (e.g., REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER).
#define MIN_BLOCK_TIME 6 // (ms) Minimum duration of a single block. You shouldn't need to modify this.
#endif
// @section extruder // @section extruder
// extruder advance constant (s2/mm3) // extruder advance constant (s2/mm3)

View File

@ -496,6 +496,35 @@
#define BABYSTEP_MULTIPLICATOR 1 //faster movements #define BABYSTEP_MULTIPLICATOR 1 //faster movements
#endif #endif
//
// Ensure Smooth Moves
//
// Enable this option to prevent the machine from stuttering when printing multiple short segments.
// This feature uses two strategies to eliminate stuttering:
//
// 1. During short segments a Graphical LCD update may take so much time that the planner buffer gets
// completely drained. When this happens pauses are introduced between short segments, and print moves
// will become jerky until a longer segment provides enough time for the buffer to be filled again.
// This jerkiness negatively affects print quality. The ENSURE_SMOOTH_MOVES option addresses the issue
// by pausing the LCD until there's enough time to safely update.
//
// NOTE: This will cause the Info Screen to lag and controller buttons may become unresponsive.
// Enable ALWAYS_ALLOW_MENU to keep the controller responsive.
//
// 2. No block is allowed to take less time than MIN_BLOCK_TIME. That's the time it takes in the main
// loop to add a new block to the buffer, check temperatures, etc., including all blocked time due to
// interrupts (without LCD update). By enforcing a minimum time-per-move, the buffer is prevented from
// draining.
//
//#define ENSURE_SMOOTH_MOVES
#if ENABLED(ENSURE_SMOOTH_MOVES)
//#define ALWAYS_ALLOW_MENU // If enabled, the menu will always be responsive.
// WARNING: Menu navigation during short moves may cause stuttering!
#define LCD_UPDATE_THRESHOLD 170 // (ms) Minimum duration for the current segment to allow an LCD update.
// Default value is good for graphical LCDs (e.g., REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER).
#define MIN_BLOCK_TIME 6 // (ms) Minimum duration of a single block. You shouldn't need to modify this.
#endif
// @section extruder // @section extruder
// extruder advance constant (s2/mm3) // extruder advance constant (s2/mm3)

View File

@ -496,6 +496,35 @@
#define BABYSTEP_MULTIPLICATOR 1 //faster movements #define BABYSTEP_MULTIPLICATOR 1 //faster movements
#endif #endif
//
// Ensure Smooth Moves
//
// Enable this option to prevent the machine from stuttering when printing multiple short segments.
// This feature uses two strategies to eliminate stuttering:
//
// 1. During short segments a Graphical LCD update may take so much time that the planner buffer gets
// completely drained. When this happens pauses are introduced between short segments, and print moves
// will become jerky until a longer segment provides enough time for the buffer to be filled again.
// This jerkiness negatively affects print quality. The ENSURE_SMOOTH_MOVES option addresses the issue
// by pausing the LCD until there's enough time to safely update.
//
// NOTE: This will cause the Info Screen to lag and controller buttons may become unresponsive.
// Enable ALWAYS_ALLOW_MENU to keep the controller responsive.
//
// 2. No block is allowed to take less time than MIN_BLOCK_TIME. That's the time it takes in the main
// loop to add a new block to the buffer, check temperatures, etc., including all blocked time due to
// interrupts (without LCD update). By enforcing a minimum time-per-move, the buffer is prevented from
// draining.
//
//#define ENSURE_SMOOTH_MOVES
#if ENABLED(ENSURE_SMOOTH_MOVES)
//#define ALWAYS_ALLOW_MENU // If enabled, the menu will always be responsive.
// WARNING: Menu navigation during short moves may cause stuttering!
#define LCD_UPDATE_THRESHOLD 170 // (ms) Minimum duration for the current segment to allow an LCD update.
// Default value is good for graphical LCDs (e.g., REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER).
#define MIN_BLOCK_TIME 6 // (ms) Minimum duration of a single block. You shouldn't need to modify this.
#endif
// @section extruder // @section extruder
// extruder advance constant (s2/mm3) // extruder advance constant (s2/mm3)

View File

@ -509,6 +509,35 @@
#define BABYSTEP_MULTIPLICATOR 1 //faster movements #define BABYSTEP_MULTIPLICATOR 1 //faster movements
#endif #endif
//
// Ensure Smooth Moves
//
// Enable this option to prevent the machine from stuttering when printing multiple short segments.
// This feature uses two strategies to eliminate stuttering:
//
// 1. During short segments a Graphical LCD update may take so much time that the planner buffer gets
// completely drained. When this happens pauses are introduced between short segments, and print moves
// will become jerky until a longer segment provides enough time for the buffer to be filled again.
// This jerkiness negatively affects print quality. The ENSURE_SMOOTH_MOVES option addresses the issue
// by pausing the LCD until there's enough time to safely update.
//
// NOTE: This will cause the Info Screen to lag and controller buttons may become unresponsive.
// Enable ALWAYS_ALLOW_MENU to keep the controller responsive.
//
// 2. No block is allowed to take less time than MIN_BLOCK_TIME. That's the time it takes in the main
// loop to add a new block to the buffer, check temperatures, etc., including all blocked time due to
// interrupts (without LCD update). By enforcing a minimum time-per-move, the buffer is prevented from
// draining.
//
//#define ENSURE_SMOOTH_MOVES
#if ENABLED(ENSURE_SMOOTH_MOVES)
//#define ALWAYS_ALLOW_MENU // If enabled, the menu will always be responsive.
// WARNING: Menu navigation during short moves may cause stuttering!
#define LCD_UPDATE_THRESHOLD 170 // (ms) Minimum duration for the current segment to allow an LCD update.
// Default value is good for graphical LCDs (e.g., REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER).
#define MIN_BLOCK_TIME 6 // (ms) Minimum duration of a single block. You shouldn't need to modify this.
#endif
// @section extruder // @section extruder
// extruder advance constant (s2/mm3) // extruder advance constant (s2/mm3)

View File

@ -496,6 +496,35 @@
#define BABYSTEP_MULTIPLICATOR 1 //faster movements #define BABYSTEP_MULTIPLICATOR 1 //faster movements
#endif #endif
//
// Ensure Smooth Moves
//
// Enable this option to prevent the machine from stuttering when printing multiple short segments.
// This feature uses two strategies to eliminate stuttering:
//
// 1. During short segments a Graphical LCD update may take so much time that the planner buffer gets
// completely drained. When this happens pauses are introduced between short segments, and print moves
// will become jerky until a longer segment provides enough time for the buffer to be filled again.
// This jerkiness negatively affects print quality. The ENSURE_SMOOTH_MOVES option addresses the issue
// by pausing the LCD until there's enough time to safely update.
//
// NOTE: This will cause the Info Screen to lag and controller buttons may become unresponsive.
// Enable ALWAYS_ALLOW_MENU to keep the controller responsive.
//
// 2. No block is allowed to take less time than MIN_BLOCK_TIME. That's the time it takes in the main
// loop to add a new block to the buffer, check temperatures, etc., including all blocked time due to
// interrupts (without LCD update). By enforcing a minimum time-per-move, the buffer is prevented from
// draining.
//
//#define ENSURE_SMOOTH_MOVES
#if ENABLED(ENSURE_SMOOTH_MOVES)
//#define ALWAYS_ALLOW_MENU // If enabled, the menu will always be responsive.
// WARNING: Menu navigation during short moves may cause stuttering!
#define LCD_UPDATE_THRESHOLD 170 // (ms) Minimum duration for the current segment to allow an LCD update.
// Default value is good for graphical LCDs (e.g., REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER).
#define MIN_BLOCK_TIME 6 // (ms) Minimum duration of a single block. You shouldn't need to modify this.
#endif
// @section extruder // @section extruder
// extruder advance constant (s2/mm3) // extruder advance constant (s2/mm3)

View File

@ -496,6 +496,35 @@
#define BABYSTEP_MULTIPLICATOR 1 //faster movements #define BABYSTEP_MULTIPLICATOR 1 //faster movements
#endif #endif
//
// Ensure Smooth Moves
//
// Enable this option to prevent the machine from stuttering when printing multiple short segments.
// This feature uses two strategies to eliminate stuttering:
//
// 1. During short segments a Graphical LCD update may take so much time that the planner buffer gets
// completely drained. When this happens pauses are introduced between short segments, and print moves
// will become jerky until a longer segment provides enough time for the buffer to be filled again.
// This jerkiness negatively affects print quality. The ENSURE_SMOOTH_MOVES option addresses the issue
// by pausing the LCD until there's enough time to safely update.
//
// NOTE: This will cause the Info Screen to lag and controller buttons may become unresponsive.
// Enable ALWAYS_ALLOW_MENU to keep the controller responsive.
//
// 2. No block is allowed to take less time than MIN_BLOCK_TIME. That's the time it takes in the main
// loop to add a new block to the buffer, check temperatures, etc., including all blocked time due to
// interrupts (without LCD update). By enforcing a minimum time-per-move, the buffer is prevented from
// draining.
//
//#define ENSURE_SMOOTH_MOVES
#if ENABLED(ENSURE_SMOOTH_MOVES)
//#define ALWAYS_ALLOW_MENU // If enabled, the menu will always be responsive.
// WARNING: Menu navigation during short moves may cause stuttering!
#define LCD_UPDATE_THRESHOLD 170 // (ms) Minimum duration for the current segment to allow an LCD update.
// Default value is good for graphical LCDs (e.g., REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER).
#define MIN_BLOCK_TIME 6 // (ms) Minimum duration of a single block. You shouldn't need to modify this.
#endif
// @section extruder // @section extruder
// extruder advance constant (s2/mm3) // extruder advance constant (s2/mm3)

View File

@ -496,6 +496,35 @@
#define BABYSTEP_MULTIPLICATOR 1 //faster movements #define BABYSTEP_MULTIPLICATOR 1 //faster movements
#endif #endif
//
// Ensure Smooth Moves
//
// Enable this option to prevent the machine from stuttering when printing multiple short segments.
// This feature uses two strategies to eliminate stuttering:
//
// 1. During short segments a Graphical LCD update may take so much time that the planner buffer gets
// completely drained. When this happens pauses are introduced between short segments, and print moves
// will become jerky until a longer segment provides enough time for the buffer to be filled again.
// This jerkiness negatively affects print quality. The ENSURE_SMOOTH_MOVES option addresses the issue
// by pausing the LCD until there's enough time to safely update.
//
// NOTE: This will cause the Info Screen to lag and controller buttons may become unresponsive.
// Enable ALWAYS_ALLOW_MENU to keep the controller responsive.
//
// 2. No block is allowed to take less time than MIN_BLOCK_TIME. That's the time it takes in the main
// loop to add a new block to the buffer, check temperatures, etc., including all blocked time due to
// interrupts (without LCD update). By enforcing a minimum time-per-move, the buffer is prevented from
// draining.
//
//#define ENSURE_SMOOTH_MOVES
#if ENABLED(ENSURE_SMOOTH_MOVES)
//#define ALWAYS_ALLOW_MENU // If enabled, the menu will always be responsive.
// WARNING: Menu navigation during short moves may cause stuttering!
#define LCD_UPDATE_THRESHOLD 170 // (ms) Minimum duration for the current segment to allow an LCD update.
// Default value is good for graphical LCDs (e.g., REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER).
#define MIN_BLOCK_TIME 6 // (ms) Minimum duration of a single block. You shouldn't need to modify this.
#endif
// @section extruder // @section extruder
// extruder advance constant (s2/mm3) // extruder advance constant (s2/mm3)

View File

@ -504,6 +504,35 @@
#define BABYSTEP_MULTIPLICATOR 1 //faster movements #define BABYSTEP_MULTIPLICATOR 1 //faster movements
#endif #endif
//
// Ensure Smooth Moves
//
// Enable this option to prevent the machine from stuttering when printing multiple short segments.
// This feature uses two strategies to eliminate stuttering:
//
// 1. During short segments a Graphical LCD update may take so much time that the planner buffer gets
// completely drained. When this happens pauses are introduced between short segments, and print moves
// will become jerky until a longer segment provides enough time for the buffer to be filled again.
// This jerkiness negatively affects print quality. The ENSURE_SMOOTH_MOVES option addresses the issue
// by pausing the LCD until there's enough time to safely update.
//
// NOTE: This will cause the Info Screen to lag and controller buttons may become unresponsive.
// Enable ALWAYS_ALLOW_MENU to keep the controller responsive.
//
// 2. No block is allowed to take less time than MIN_BLOCK_TIME. That's the time it takes in the main
// loop to add a new block to the buffer, check temperatures, etc., including all blocked time due to
// interrupts (without LCD update). By enforcing a minimum time-per-move, the buffer is prevented from
// draining.
//
//#define ENSURE_SMOOTH_MOVES
#if ENABLED(ENSURE_SMOOTH_MOVES)
//#define ALWAYS_ALLOW_MENU // If enabled, the menu will always be responsive.
// WARNING: Menu navigation during short moves may cause stuttering!
#define LCD_UPDATE_THRESHOLD 170 // (ms) Minimum duration for the current segment to allow an LCD update.
// Default value is good for graphical LCDs (e.g., REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER).
#define MIN_BLOCK_TIME 6 // (ms) Minimum duration of a single block. You shouldn't need to modify this.
#endif
// @section extruder // @section extruder
// extruder advance constant (s2/mm3) // extruder advance constant (s2/mm3)

View File

@ -496,6 +496,35 @@
#define BABYSTEP_MULTIPLICATOR 1 //faster movements #define BABYSTEP_MULTIPLICATOR 1 //faster movements
#endif #endif
//
// Ensure Smooth Moves
//
// Enable this option to prevent the machine from stuttering when printing multiple short segments.
// This feature uses two strategies to eliminate stuttering:
//
// 1. During short segments a Graphical LCD update may take so much time that the planner buffer gets
// completely drained. When this happens pauses are introduced between short segments, and print moves
// will become jerky until a longer segment provides enough time for the buffer to be filled again.
// This jerkiness negatively affects print quality. The ENSURE_SMOOTH_MOVES option addresses the issue
// by pausing the LCD until there's enough time to safely update.
//
// NOTE: This will cause the Info Screen to lag and controller buttons may become unresponsive.
// Enable ALWAYS_ALLOW_MENU to keep the controller responsive.
//
// 2. No block is allowed to take less time than MIN_BLOCK_TIME. That's the time it takes in the main
// loop to add a new block to the buffer, check temperatures, etc., including all blocked time due to
// interrupts (without LCD update). By enforcing a minimum time-per-move, the buffer is prevented from
// draining.
//
//#define ENSURE_SMOOTH_MOVES
#if ENABLED(ENSURE_SMOOTH_MOVES)
//#define ALWAYS_ALLOW_MENU // If enabled, the menu will always be responsive.
// WARNING: Menu navigation during short moves may cause stuttering!
#define LCD_UPDATE_THRESHOLD 170 // (ms) Minimum duration for the current segment to allow an LCD update.
// Default value is good for graphical LCDs (e.g., REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER).
#define MIN_BLOCK_TIME 6 // (ms) Minimum duration of a single block. You shouldn't need to modify this.
#endif
// @section extruder // @section extruder
// extruder advance constant (s2/mm3) // extruder advance constant (s2/mm3)

View File

@ -498,6 +498,35 @@
#define BABYSTEP_MULTIPLICATOR 1 //faster movements #define BABYSTEP_MULTIPLICATOR 1 //faster movements
#endif #endif
//
// Ensure Smooth Moves
//
// Enable this option to prevent the machine from stuttering when printing multiple short segments.
// This feature uses two strategies to eliminate stuttering:
//
// 1. During short segments a Graphical LCD update may take so much time that the planner buffer gets
// completely drained. When this happens pauses are introduced between short segments, and print moves
// will become jerky until a longer segment provides enough time for the buffer to be filled again.
// This jerkiness negatively affects print quality. The ENSURE_SMOOTH_MOVES option addresses the issue
// by pausing the LCD until there's enough time to safely update.
//
// NOTE: This will cause the Info Screen to lag and controller buttons may become unresponsive.
// Enable ALWAYS_ALLOW_MENU to keep the controller responsive.
//
// 2. No block is allowed to take less time than MIN_BLOCK_TIME. That's the time it takes in the main
// loop to add a new block to the buffer, check temperatures, etc., including all blocked time due to
// interrupts (without LCD update). By enforcing a minimum time-per-move, the buffer is prevented from
// draining.
//
//#define ENSURE_SMOOTH_MOVES
#if ENABLED(ENSURE_SMOOTH_MOVES)
//#define ALWAYS_ALLOW_MENU // If enabled, the menu will always be responsive.
// WARNING: Menu navigation during short moves may cause stuttering!
#define LCD_UPDATE_THRESHOLD 170 // (ms) Minimum duration for the current segment to allow an LCD update.
// Default value is good for graphical LCDs (e.g., REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER).
#define MIN_BLOCK_TIME 6 // (ms) Minimum duration of a single block. You shouldn't need to modify this.
#endif
// @section extruder // @section extruder
// extruder advance constant (s2/mm3) // extruder advance constant (s2/mm3)

View File

@ -498,6 +498,35 @@
#define BABYSTEP_MULTIPLICATOR 1 //faster movements #define BABYSTEP_MULTIPLICATOR 1 //faster movements
#endif #endif
//
// Ensure Smooth Moves
//
// Enable this option to prevent the machine from stuttering when printing multiple short segments.
// This feature uses two strategies to eliminate stuttering:
//
// 1. During short segments a Graphical LCD update may take so much time that the planner buffer gets
// completely drained. When this happens pauses are introduced between short segments, and print moves
// will become jerky until a longer segment provides enough time for the buffer to be filled again.
// This jerkiness negatively affects print quality. The ENSURE_SMOOTH_MOVES option addresses the issue
// by pausing the LCD until there's enough time to safely update.
//
// NOTE: This will cause the Info Screen to lag and controller buttons may become unresponsive.
// Enable ALWAYS_ALLOW_MENU to keep the controller responsive.
//
// 2. No block is allowed to take less time than MIN_BLOCK_TIME. That's the time it takes in the main
// loop to add a new block to the buffer, check temperatures, etc., including all blocked time due to
// interrupts (without LCD update). By enforcing a minimum time-per-move, the buffer is prevented from
// draining.
//
//#define ENSURE_SMOOTH_MOVES
#if ENABLED(ENSURE_SMOOTH_MOVES)
//#define ALWAYS_ALLOW_MENU // If enabled, the menu will always be responsive.
// WARNING: Menu navigation during short moves may cause stuttering!
#define LCD_UPDATE_THRESHOLD 170 // (ms) Minimum duration for the current segment to allow an LCD update.
// Default value is good for graphical LCDs (e.g., REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER).
#define MIN_BLOCK_TIME 6 // (ms) Minimum duration of a single block. You shouldn't need to modify this.
#endif
// @section extruder // @section extruder
// extruder advance constant (s2/mm3) // extruder advance constant (s2/mm3)

View File

@ -498,6 +498,35 @@
#define BABYSTEP_MULTIPLICATOR 1 //faster movements #define BABYSTEP_MULTIPLICATOR 1 //faster movements
#endif #endif
//
// Ensure Smooth Moves
//
// Enable this option to prevent the machine from stuttering when printing multiple short segments.
// This feature uses two strategies to eliminate stuttering:
//
// 1. During short segments a Graphical LCD update may take so much time that the planner buffer gets
// completely drained. When this happens pauses are introduced between short segments, and print moves
// will become jerky until a longer segment provides enough time for the buffer to be filled again.
// This jerkiness negatively affects print quality. The ENSURE_SMOOTH_MOVES option addresses the issue
// by pausing the LCD until there's enough time to safely update.
//
// NOTE: This will cause the Info Screen to lag and controller buttons may become unresponsive.
// Enable ALWAYS_ALLOW_MENU to keep the controller responsive.
//
// 2. No block is allowed to take less time than MIN_BLOCK_TIME. That's the time it takes in the main
// loop to add a new block to the buffer, check temperatures, etc., including all blocked time due to
// interrupts (without LCD update). By enforcing a minimum time-per-move, the buffer is prevented from
// draining.
//
//#define ENSURE_SMOOTH_MOVES
#if ENABLED(ENSURE_SMOOTH_MOVES)
//#define ALWAYS_ALLOW_MENU // If enabled, the menu will always be responsive.
// WARNING: Menu navigation during short moves may cause stuttering!
#define LCD_UPDATE_THRESHOLD 170 // (ms) Minimum duration for the current segment to allow an LCD update.
// Default value is good for graphical LCDs (e.g., REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER).
#define MIN_BLOCK_TIME 6 // (ms) Minimum duration of a single block. You shouldn't need to modify this.
#endif
// @section extruder // @section extruder
// extruder advance constant (s2/mm3) // extruder advance constant (s2/mm3)

View File

@ -503,6 +503,35 @@
#define BABYSTEP_MULTIPLICATOR 1 //faster movements #define BABYSTEP_MULTIPLICATOR 1 //faster movements
#endif #endif
//
// Ensure Smooth Moves
//
// Enable this option to prevent the machine from stuttering when printing multiple short segments.
// This feature uses two strategies to eliminate stuttering:
//
// 1. During short segments a Graphical LCD update may take so much time that the planner buffer gets
// completely drained. When this happens pauses are introduced between short segments, and print moves
// will become jerky until a longer segment provides enough time for the buffer to be filled again.
// This jerkiness negatively affects print quality. The ENSURE_SMOOTH_MOVES option addresses the issue
// by pausing the LCD until there's enough time to safely update.
//
// NOTE: This will cause the Info Screen to lag and controller buttons may become unresponsive.
// Enable ALWAYS_ALLOW_MENU to keep the controller responsive.
//
// 2. No block is allowed to take less time than MIN_BLOCK_TIME. That's the time it takes in the main
// loop to add a new block to the buffer, check temperatures, etc., including all blocked time due to
// interrupts (without LCD update). By enforcing a minimum time-per-move, the buffer is prevented from
// draining.
//
//#define ENSURE_SMOOTH_MOVES
#if ENABLED(ENSURE_SMOOTH_MOVES)
//#define ALWAYS_ALLOW_MENU // If enabled, the menu will always be responsive.
// WARNING: Menu navigation during short moves may cause stuttering!
#define LCD_UPDATE_THRESHOLD 170 // (ms) Minimum duration for the current segment to allow an LCD update.
// Default value is good for graphical LCDs (e.g., REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER).
#define MIN_BLOCK_TIME 6 // (ms) Minimum duration of a single block. You shouldn't need to modify this.
#endif
// @section extruder // @section extruder
// extruder advance constant (s2/mm3) // extruder advance constant (s2/mm3)

View File

@ -498,6 +498,35 @@
#define BABYSTEP_MULTIPLICATOR 1 //faster movements #define BABYSTEP_MULTIPLICATOR 1 //faster movements
#endif #endif
//
// Ensure Smooth Moves
//
// Enable this option to prevent the machine from stuttering when printing multiple short segments.
// This feature uses two strategies to eliminate stuttering:
//
// 1. During short segments a Graphical LCD update may take so much time that the planner buffer gets
// completely drained. When this happens pauses are introduced between short segments, and print moves
// will become jerky until a longer segment provides enough time for the buffer to be filled again.
// This jerkiness negatively affects print quality. The ENSURE_SMOOTH_MOVES option addresses the issue
// by pausing the LCD until there's enough time to safely update.
//
// NOTE: This will cause the Info Screen to lag and controller buttons may become unresponsive.
// Enable ALWAYS_ALLOW_MENU to keep the controller responsive.
//
// 2. No block is allowed to take less time than MIN_BLOCK_TIME. That's the time it takes in the main
// loop to add a new block to the buffer, check temperatures, etc., including all blocked time due to
// interrupts (without LCD update). By enforcing a minimum time-per-move, the buffer is prevented from
// draining.
//
//#define ENSURE_SMOOTH_MOVES
#if ENABLED(ENSURE_SMOOTH_MOVES)
//#define ALWAYS_ALLOW_MENU // If enabled, the menu will always be responsive.
// WARNING: Menu navigation during short moves may cause stuttering!
#define LCD_UPDATE_THRESHOLD 170 // (ms) Minimum duration for the current segment to allow an LCD update.
// Default value is good for graphical LCDs (e.g., REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER).
#define MIN_BLOCK_TIME 6 // (ms) Minimum duration of a single block. You shouldn't need to modify this.
#endif
// @section extruder // @section extruder
// extruder advance constant (s2/mm3) // extruder advance constant (s2/mm3)

View File

@ -496,6 +496,35 @@
#define BABYSTEP_MULTIPLICATOR 1 //faster movements #define BABYSTEP_MULTIPLICATOR 1 //faster movements
#endif #endif
//
// Ensure Smooth Moves
//
// Enable this option to prevent the machine from stuttering when printing multiple short segments.
// This feature uses two strategies to eliminate stuttering:
//
// 1. During short segments a Graphical LCD update may take so much time that the planner buffer gets
// completely drained. When this happens pauses are introduced between short segments, and print moves
// will become jerky until a longer segment provides enough time for the buffer to be filled again.
// This jerkiness negatively affects print quality. The ENSURE_SMOOTH_MOVES option addresses the issue
// by pausing the LCD until there's enough time to safely update.
//
// NOTE: This will cause the Info Screen to lag and controller buttons may become unresponsive.
// Enable ALWAYS_ALLOW_MENU to keep the controller responsive.
//
// 2. No block is allowed to take less time than MIN_BLOCK_TIME. That's the time it takes in the main
// loop to add a new block to the buffer, check temperatures, etc., including all blocked time due to
// interrupts (without LCD update). By enforcing a minimum time-per-move, the buffer is prevented from
// draining.
//
//#define ENSURE_SMOOTH_MOVES
#if ENABLED(ENSURE_SMOOTH_MOVES)
//#define ALWAYS_ALLOW_MENU // If enabled, the menu will always be responsive.
// WARNING: Menu navigation during short moves may cause stuttering!
#define LCD_UPDATE_THRESHOLD 170 // (ms) Minimum duration for the current segment to allow an LCD update.
// Default value is good for graphical LCDs (e.g., REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER).
#define MIN_BLOCK_TIME 6 // (ms) Minimum duration of a single block. You shouldn't need to modify this.
#endif
// @section extruder // @section extruder
// extruder advance constant (s2/mm3) // extruder advance constant (s2/mm3)

View File

@ -496,6 +496,35 @@
#define BABYSTEP_MULTIPLICATOR 1 //faster movements #define BABYSTEP_MULTIPLICATOR 1 //faster movements
#endif #endif
//
// Ensure Smooth Moves
//
// Enable this option to prevent the machine from stuttering when printing multiple short segments.
// This feature uses two strategies to eliminate stuttering:
//
// 1. During short segments a Graphical LCD update may take so much time that the planner buffer gets
// completely drained. When this happens pauses are introduced between short segments, and print moves
// will become jerky until a longer segment provides enough time for the buffer to be filled again.
// This jerkiness negatively affects print quality. The ENSURE_SMOOTH_MOVES option addresses the issue
// by pausing the LCD until there's enough time to safely update.
//
// NOTE: This will cause the Info Screen to lag and controller buttons may become unresponsive.
// Enable ALWAYS_ALLOW_MENU to keep the controller responsive.
//
// 2. No block is allowed to take less time than MIN_BLOCK_TIME. That's the time it takes in the main
// loop to add a new block to the buffer, check temperatures, etc., including all blocked time due to
// interrupts (without LCD update). By enforcing a minimum time-per-move, the buffer is prevented from
// draining.
//
//#define ENSURE_SMOOTH_MOVES
#if ENABLED(ENSURE_SMOOTH_MOVES)
//#define ALWAYS_ALLOW_MENU // If enabled, the menu will always be responsive.
// WARNING: Menu navigation during short moves may cause stuttering!
#define LCD_UPDATE_THRESHOLD 170 // (ms) Minimum duration for the current segment to allow an LCD update.
// Default value is good for graphical LCDs (e.g., REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER).
#define MIN_BLOCK_TIME 6 // (ms) Minimum duration of a single block. You shouldn't need to modify this.
#endif
// @section extruder // @section extruder
// extruder advance constant (s2/mm3) // extruder advance constant (s2/mm3)

View File

@ -937,12 +937,24 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
if (segment_time < min_segment_time) { if (segment_time < min_segment_time) {
// buffer is draining, add extra time. The amount of time added increases if the buffer is still emptied more. // buffer is draining, add extra time. The amount of time added increases if the buffer is still emptied more.
inverse_mm_s = 1000000.0 / (segment_time + lround(2 * (min_segment_time - segment_time) / moves_queued)); inverse_mm_s = 1000000.0 / (segment_time + lround(2 * (min_segment_time - segment_time) / moves_queued));
#ifdef XY_FREQUENCY_LIMIT #if defined(XY_FREQUENCY_LIMIT) || ENABLED(ENSURE_SMOOTH_MOVES)
segment_time = lround(1000000.0 / inverse_mm_s); segment_time = lround(1000000.0 / inverse_mm_s);
#endif #endif
} }
} }
#endif #endif
#if ENABLED(ENSURE_SMOOTH_MOVES)
#if DISABLED(SLOWDOWN)
unsigned long segment_time = lround(1000000.0 / inverse_mm_s);
#endif
if (segment_time < (MIN_BLOCK_TIME) * 1000UL) {
// buffer will be draining, set to MIN_BLOCK_TIME.
inverse_mm_s = 1000000.0 / (1000.0 * (MIN_BLOCK_TIME));
segment_time = (MIN_BLOCK_TIME) * 1000UL;
}
block->segment_time = segment_time;
#endif
block->nominal_speed = block->millimeters * inverse_mm_s; // (mm/sec) Always > 0 block->nominal_speed = block->millimeters * inverse_mm_s; // (mm/sec) Always > 0
block->nominal_rate = ceil(block->step_event_count * inverse_mm_s); // (step/sec) Always > 0 block->nominal_rate = ceil(block->step_event_count * inverse_mm_s); // (step/sec) Always > 0

View File

@ -123,6 +123,10 @@ typedef struct {
#if ENABLED(BARICUDA) #if ENABLED(BARICUDA)
uint32_t valve_pressure, e_to_p_pressure; uint32_t valve_pressure, e_to_p_pressure;
#endif #endif
#if ENABLED(ENSURE_SMOOTH_MOVES)
uint32_t segment_time;
#endif
} block_t; } block_t;
@ -366,6 +370,17 @@ class Planner {
return NULL; return NULL;
} }
#if ENABLED(ENSURE_SMOOTH_MOVES)
static bool long_move() {
if (blocks_queued()) {
block_t* block = &block_buffer[block_buffer_tail];
return block->segment_time > (LCD_UPDATE_THRESHOLD) * 1000UL;
}
else
return true;
}
#endif
#if ENABLED(AUTOTEMP) #if ENABLED(AUTOTEMP)
static float autotemp_max; static float autotemp_max;
static float autotemp_min; static float autotemp_min;

View File

@ -2707,77 +2707,93 @@ void lcd_update() {
} }
#endif // ULTIPANEL #endif // ULTIPANEL
#if ENABLED(ENSURE_SMOOTH_MOVES) && ENABLED(ALWAYS_ALLOW_MENU)
#define STATUS_UPDATE_CONDITION planner.long_move()
#else
#define STATUS_UPDATE_CONDITION true
#endif
#if ENABLED(ENSURE_SMOOTH_MOVES) && DISABLED(ALWAYS_ALLOW_MENU)
#define LCD_HANDLER_CONDITION planner.long_move()
#else
#define LCD_HANDLER_CONDITION true
#endif
// We arrive here every ~100ms when idling often enough. // We arrive here every ~100ms when idling often enough.
// Instead of tracking the changes simply redraw the Info Screen ~1 time a second. // Instead of tracking the changes simply redraw the Info Screen ~1 time a second.
static int8_t lcd_status_update_delay = 1; // first update one loop delayed static int8_t lcd_status_update_delay = 1; // first update one loop delayed
if ( if (STATUS_UPDATE_CONDITION &&
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
currentScreen == lcd_status_screen && currentScreen == lcd_status_screen &&
#endif #endif
!lcd_status_update_delay--) { !lcd_status_update_delay--
) {
lcd_status_update_delay = 9; lcd_status_update_delay = 9;
lcdDrawUpdate = LCDVIEW_REDRAW_NOW; lcdDrawUpdate = LCDVIEW_REDRAW_NOW;
} }
if (lcdDrawUpdate) { if (LCD_HANDLER_CONDITION) {
switch (lcdDrawUpdate) { if (lcdDrawUpdate) {
case LCDVIEW_CALL_NO_REDRAW:
lcdDrawUpdate = LCDVIEW_NONE; switch (lcdDrawUpdate) {
break; case LCDVIEW_CALL_NO_REDRAW:
case LCDVIEW_CLEAR_CALL_REDRAW: // set by handlers, then altered after (rarely occurs here) lcdDrawUpdate = LCDVIEW_NONE;
case LCDVIEW_CALL_REDRAW_NEXT: // set by handlers, then altered after (never occurs here?) break;
lcdDrawUpdate = LCDVIEW_REDRAW_NOW; case LCDVIEW_CLEAR_CALL_REDRAW: // set by handlers, then altered after (rarely occurs here)
case LCDVIEW_REDRAW_NOW: // set above, or by a handler through LCDVIEW_CALL_REDRAW_NEXT case LCDVIEW_CALL_REDRAW_NEXT: // set by handlers, then altered after (never occurs here?)
case LCDVIEW_NONE: lcdDrawUpdate = LCDVIEW_REDRAW_NOW;
break; case LCDVIEW_REDRAW_NOW: // set above, or by a handler through LCDVIEW_CALL_REDRAW_NEXT
case LCDVIEW_NONE:
break;
} // switch
#if ENABLED(ULTIPANEL)
#define CURRENTSCREEN() (*currentScreen)(), lcd_clicked = false
#else
#define CURRENTSCREEN() lcd_status_screen()
#endif
#if ENABLED(DOGLCD) // Changes due to different driver architecture of the DOGM display
static int8_t dot_color = 0;
dot_color = 1 - dot_color;
u8g.firstPage();
do {
lcd_setFont(FONT_MENU);
u8g.setPrintPos(125, 0);
u8g.setColorIndex(dot_color); // Set color for the alive dot
u8g.drawPixel(127, 63); // draw alive dot
u8g.setColorIndex(1); // black on white
CURRENTSCREEN();
} while (u8g.nextPage());
#else
CURRENTSCREEN();
#endif
} }
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
#define CURRENTSCREEN() (*currentScreen)(), lcd_clicked = false
#else
#define CURRENTSCREEN() lcd_status_screen()
#endif
#if ENABLED(DOGLCD) // Changes due to different driver architecture of the DOGM display // Return to Status Screen after a timeout
static int8_t dot_color = 0; if (currentScreen == lcd_status_screen || defer_return_to_status)
dot_color = 1 - dot_color; return_to_status_ms = ms + LCD_TIMEOUT_TO_STATUS;
u8g.firstPage(); else if (ELAPSED(ms, return_to_status_ms))
do { lcd_return_to_status();
lcd_setFont(FONT_MENU);
u8g.setPrintPos(125, 0);
u8g.setColorIndex(dot_color); // Set color for the alive dot
u8g.drawPixel(127, 63); // draw alive dot
u8g.setColorIndex(1); // black on white
CURRENTSCREEN();
} while (u8g.nextPage());
#else
CURRENTSCREEN();
#endif
}
#if ENABLED(ULTIPANEL) #endif // ULTIPANEL
// Return to Status Screen after a timeout switch (lcdDrawUpdate) {
if (currentScreen == lcd_status_screen || defer_return_to_status) case LCDVIEW_CLEAR_CALL_REDRAW:
return_to_status_ms = ms + LCD_TIMEOUT_TO_STATUS; lcd_implementation_clear();
else if (ELAPSED(ms, return_to_status_ms)) case LCDVIEW_CALL_REDRAW_NEXT:
lcd_return_to_status(); lcdDrawUpdate = LCDVIEW_REDRAW_NOW;
break;
case LCDVIEW_REDRAW_NOW:
lcdDrawUpdate = LCDVIEW_NONE;
break;
case LCDVIEW_NONE:
break;
} // switch
#endif // ULTIPANEL } // LCD_HANDLER_CONDITION
switch (lcdDrawUpdate) {
case LCDVIEW_CLEAR_CALL_REDRAW:
lcd_implementation_clear();
case LCDVIEW_CALL_REDRAW_NEXT:
lcdDrawUpdate = LCDVIEW_REDRAW_NOW;
break;
case LCDVIEW_REDRAW_NOW:
lcdDrawUpdate = LCDVIEW_NONE;
break;
case LCDVIEW_NONE:
break;
}
} }
} }