1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-09-01 02:21:46 +02:00

Moved SEC_PER_MIN_SQ

This commit is contained in:
Mitch Bradley
2021-05-24 11:22:47 -10:00
parent 32e0c3dc39
commit 7b3f9e43da
2 changed files with 3 additions and 7 deletions

View File

@@ -140,11 +140,6 @@
# define DEFAULT_USER_FLOAT_94 0.0 // $94 User integer setting
#endif
// =========== AXIS RESOLUTION ======
// ============== Axis Acceleration =========
#define SEC_PER_MIN_SQ (60.0 * 60.0) // Seconds Per Minute Squared, for acceleration conversion
// ================== pin defaults ========================
// Here is a place to default pins to UNDEFINED_PIN.

View File

@@ -160,7 +160,8 @@ float convert_delta_vector_to_unit_vector(float* vector) {
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;
float limit_value = SOME_LARGE_VALUE;
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
// exit, since the limit computation above is independent of units - it simply
// finds the smallest value.
return limit_value * SEC_PER_MIN_SQ;
return limit_value * secPerMinSq;
}
float limit_rate_by_axis_maximum(float* unit_vec) {