Init matrix in planner.init

This commit is contained in:
Scott Lahteine 2016-07-12 15:55:27 -07:00
parent 0ccc5d1dd9
commit e974ac63ef

View File

@ -129,18 +129,16 @@ float Planner::previous_nominal_speed;
* Class and Instance Methods * Class and Instance Methods
*/ */
Planner::Planner() { Planner::Planner() { init(); }
#if ENABLED(AUTO_BED_LEVELING_FEATURE)
bed_level_matrix.set_to_identity();
#endif
init();
}
void Planner::init() { void Planner::init() {
block_buffer_head = block_buffer_tail = 0; block_buffer_head = block_buffer_tail = 0;
memset(position, 0, sizeof(position)); // clear position memset(position, 0, sizeof(position)); // clear position
for (int i = 0; i < NUM_AXIS; i++) previous_speed[i] = 0.0; for (int i = 0; i < NUM_AXIS; i++) previous_speed[i] = 0.0;
previous_nominal_speed = 0.0; previous_nominal_speed = 0.0;
#if ENABLED(AUTO_BED_LEVELING_FEATURE)
bed_level_matrix.set_to_identity();
#endif
} }
/** /**