Fixed the Unused Values error, removed stray comma, removed settings.h conditional

This commit is contained in:
Dietz0r
2024-12-27 12:58:21 +01:00
committed by GitHub
parent c47e6a356e
commit 9d48143edf
3 changed files with 20 additions and 11 deletions
+19 -8
View File
@@ -2373,16 +2373,27 @@ status_code_t gc_execute_block (char *block)
#if ENABLE_ACCELERATION_PROFILES
case NonModal_SetAccelerationProfile:
if (gc_block.words.e)
if (gc_block.words.e) {
FAIL(Status_GcodeUnsupportedCommand);
else if (!gc_block.words.p)
gc_block.values.p = 1.0f;
else if (gc_block.values.p < 1.0f)
FAIL(Status_NegativeValue);
else if (gc_block.values.p > 5.0f)
FAIL(Status_GcodeValueOutOfRange);
else
break;
}
else if (!gc_block.words.p) {
gc_block.values.p = 1.0f;
gc_state.modal.acceleration_profile = gc_block.values.p;
gc_block.words.p = Off;
break;
}
else if (gc_block.values.p < 1.0f) {
FAIL(Status_NegativeValue);
break;
}
else if (gc_block.values.p > 5.0f) {
FAIL(Status_GcodeValueOutOfRange);
break;
}
else
gc_state.modal.acceleration_profile = gc_block.values.p;
gc_block.words.p = Off;
break;
#endif
default:
+1 -1
View File
@@ -339,7 +339,7 @@ inline static float plan_compute_profile_parameters (plan_block_t *block, float
return nominal_speed;
}
static inline float limit_acceleration_by_axis_maximum (float *unit_vec,)
static inline float limit_acceleration_by_axis_maximum (float *unit_vec)
{
uint_fast8_t idx = N_AXIS;
float limit_value = SOME_LARGE_VALUE;
-2
View File
@@ -712,9 +712,7 @@ typedef struct {
float dual_axis_offset;
float homing_seek_rate;
float homing_feed_rate;
#if ENABLE_JERK_ACCELERATION
float jerk;
#endif
#if ENABLE_BACKLASH_COMPENSATION
float backlash;
#endif