mirror of
https://github.com/bdring/Grbl_Esp32.git
synced 2025-09-03 19:32:39 +02:00
Moved SEC_PER_MIN_SQ
This commit is contained in:
@@ -140,11 +140,6 @@
|
|||||||
# define DEFAULT_USER_FLOAT_94 0.0 // $94 User integer setting
|
# define DEFAULT_USER_FLOAT_94 0.0 // $94 User integer setting
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// =========== AXIS RESOLUTION ======
|
|
||||||
|
|
||||||
// ============== Axis Acceleration =========
|
|
||||||
#define SEC_PER_MIN_SQ (60.0 * 60.0) // Seconds Per Minute Squared, for acceleration conversion
|
|
||||||
|
|
||||||
// ================== pin defaults ========================
|
// ================== pin defaults ========================
|
||||||
|
|
||||||
// Here is a place to default pins to UNDEFINED_PIN.
|
// Here is a place to default pins to UNDEFINED_PIN.
|
||||||
|
@@ -160,7 +160,8 @@ float convert_delta_vector_to_unit_vector(float* vector) {
|
|||||||
return magnitude;
|
return magnitude;
|
||||||
}
|
}
|
||||||
|
|
||||||
float limit_acceleration_by_axis_maximum(float* unit_vec) {
|
const float secPerMinSq = 60.0 * 60.0; // Seconds Per Minute Squared, for acceleration conversion
|
||||||
|
float limit_acceleration_by_axis_maximum(float* unit_vec) {
|
||||||
uint8_t idx;
|
uint8_t idx;
|
||||||
float limit_value = SOME_LARGE_VALUE;
|
float limit_value = SOME_LARGE_VALUE;
|
||||||
auto n_axis = config->_axes->_numberAxis;
|
auto n_axis = config->_axes->_numberAxis;
|
||||||
@@ -174,7 +175,7 @@ float limit_acceleration_by_axis_maximum(float* unit_vec) {
|
|||||||
// but used in units of mm/min^2. It suffices to perform the conversion once on
|
// but used in units of mm/min^2. It suffices to perform the conversion once on
|
||||||
// exit, since the limit computation above is independent of units - it simply
|
// exit, since the limit computation above is independent of units - it simply
|
||||||
// finds the smallest value.
|
// finds the smallest value.
|
||||||
return limit_value * SEC_PER_MIN_SQ;
|
return limit_value * secPerMinSq;
|
||||||
}
|
}
|
||||||
|
|
||||||
float limit_rate_by_axis_maximum(float* unit_vec) {
|
float limit_rate_by_axis_maximum(float* unit_vec) {
|
||||||
|
Reference in New Issue
Block a user