mirror of
https://github.com/bdring/Grbl_Esp32.git
synced 2025-08-30 17:49:56 +02:00
Handled BLOCK_BUFFER_SIZE, SEGMENT_BUFFER_SIZE
This commit is contained in:
@@ -277,21 +277,6 @@ const double ARC_ANGULAR_TRAVEL_EPSILON = 5E-7; // Float (radians)
|
||||
// time step. Also, keep in mind that the Arduino delay timer is not very accurate for long delays.
|
||||
const int DWELL_TIME_STEP = 50; // Integer (1-255) (milliseconds)
|
||||
|
||||
// The number of linear motions in the planner buffer to be planned at any give time. The vast
|
||||
// majority of RAM that Grbl uses is based on this buffer size. Only increase if there is extra
|
||||
// available RAM, like when re-compiling for a Mega2560. Or decrease if the Arduino begins to
|
||||
// crash due to the lack of available RAM or if the CPU is having trouble keeping up with planning
|
||||
// new incoming motions as they are executed.
|
||||
// #define BLOCK_BUFFER_SIZE 16 // Uncomment to override default in planner.h.
|
||||
|
||||
// Governs the size of the intermediary step segment buffer between the step execution algorithm
|
||||
// and the planner blocks. Each segment is set of steps executed at a constant velocity over a
|
||||
// fixed time defined by ACCELERATION_TICKS_PER_SECOND. They are computed such that the planner
|
||||
// block velocity profile is traced exactly. The size of this buffer governs how much step
|
||||
// execution lead time there is for other Grbl processes have to compute and do their thing
|
||||
// before having to come back and refill this buffer, currently at ~50msec of step moves.
|
||||
// #define SEGMENT_BUFFER_SIZE 6 // Uncomment to override default in stepper.h.
|
||||
|
||||
// Line buffer size from the serial input stream to be executed. Also, governs the size of
|
||||
// each of the startup blocks, as they are each stored as a string of this size.
|
||||
// NOTE: 80 characters is not a problem except for extreme cases, but the line buffer size
|
||||
|
@@ -24,14 +24,12 @@
|
||||
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// The number of linear motions that can be in the plan at any give time
|
||||
#ifndef BLOCK_BUFFER_SIZE
|
||||
# ifdef USE_LINE_NUMBERS
|
||||
# define BLOCK_BUFFER_SIZE 15
|
||||
# else
|
||||
# define BLOCK_BUFFER_SIZE 16
|
||||
# endif
|
||||
#endif
|
||||
// The number of linear motions in the planner buffer to be planned at any give time. The vast
|
||||
// majority of RAM that Grbl uses is based on this buffer size. Only increase if there is extra
|
||||
// available RAM, like when re-compiling for a Mega2560. Or decrease if the Arduino begins to
|
||||
// crash due to the lack of available RAM or if the CPU is having trouble keeping up with planning
|
||||
// new incoming motions as they are executed.
|
||||
const int BLOCK_BUFFER_SIZE = 16;
|
||||
|
||||
// Returned status message from planner.
|
||||
const int PLAN_OK = true;
|
||||
|
@@ -1,11 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
// The definitions herein are used only in Stepper.cpp
|
||||
// They are not part of the public interface to the Stepper code.
|
||||
|
||||
#ifndef SEGMENT_BUFFER_SIZE
|
||||
# define SEGMENT_BUFFER_SIZE 6
|
||||
#endif
|
||||
// Governs the size of the intermediary step segment buffer between the step execution algorithm
|
||||
// and the planner blocks. Each segment is set of steps executed at a constant velocity over a
|
||||
// fixed time defined by ACCELERATION_TICKS_PER_SECOND. They are computed such that the planner
|
||||
// block velocity profile is traced exactly. The size of this buffer governs how much step
|
||||
// execution lead time there is for other Grbl processes have to compute and do their thing
|
||||
// before having to come back and refill this buffer, currently at ~50msec of step moves.
|
||||
const int SEGMENT_BUFFER_SIZE = 6;
|
||||
|
||||
// Some useful constants.
|
||||
const double DT_SEGMENT = (1.0 / (ACCELERATION_TICKS_PER_SECOND * 60.0)); // min/segment
|
||||
|
Reference in New Issue
Block a user