Changed initialization to work better with 9 axis configs

This commit is contained in:
Alden Hart
2018-03-26 16:10:31 -04:00
parent 5385fe0185
commit 809174d802
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -177,8 +177,8 @@ static stat_t _jogging_axis_ramp_jog(int8_t axis) // run the jog ramp
}
static stat_t _jogging_axis_move(int8_t axis, float target, float velocity) {
float vect[] = {0, 0, 0, 0, 0, 0};
bool flags[] = {false, false, false, false, false, false};
float vect[] = { 0,0,0,0,0,0 };
bool flags[] = { false,false,false,false,false,false };
vect[axis] = target;
flags[axis] = true;
+2 -2
View File
@@ -143,8 +143,8 @@ bool mp_runtime_is_idle() { return (!st_runtime_isbusy()); }
stat_t mp_aline(GCodeState_t* _gm)
{
float target_rotated[AXES] = { 0,0,0,0,0,0,0,0,0 };
float axis_square[AXES] = { 0,0,0,0,0,0,0,0,0 };
float target_rotated[AXES]; // all these arrays initialize to all zeroes by compiler settings
float axis_square[AXES];
float axis_length[AXES];
bool flags[AXES];
float length_square = 0;