Fixed bug related to very very low feed rates.
- A very very low feed rate command like `G1 X100 F0.01` would cause some floating-point round-off error and freeze Grbl into an infinite loop. To fix it, introduced a MINIMUM_FEED_RATE parameter in config.h to ensure motions always complete. - MINIMUM_FEED_RATE is set at 1.0 mm/min by default. It’s recommended that no rates are below this value, but 0.1mm/min may be ok in some situations.
This commit is contained in:
@ -309,6 +309,7 @@ uint8_t plan_check_full_buffer()
|
||||
// TODO: Need to distinguish a rapids vs feed move for overrides. Some flag of some sort.
|
||||
if (feed_rate < 0) { feed_rate = SOME_LARGE_VALUE; } // Scaled down to absolute max/rapids rate later
|
||||
else if (invert_feed_rate) { feed_rate = block->millimeters/feed_rate; }
|
||||
if (feed_rate < MINIMUM_FEED_RATE) { feed_rate = MINIMUM_FEED_RATE; } // Prevents step generation round-off condition.
|
||||
|
||||
// Calculate the unit vector of the line move and the block maximum feed rate and acceleration scaled
|
||||
// down such that no individual axes maximum values are exceeded with respect to the line direction.
|
||||
|
Reference in New Issue
Block a user