Browse Source

Init matrix in planner.init

Scott Lahteine 9 years ago
parent
commit
e974ac63ef
1 changed files with 4 additions and 6 deletions
  1. 4
    6
      Marlin/planner.cpp

+ 4
- 6
Marlin/planner.cpp View File

129
  * Class and Instance Methods
129
  * Class and Instance Methods
130
  */
130
  */
131
 
131
 
132
-Planner::Planner() {
133
-  #if ENABLED(AUTO_BED_LEVELING_FEATURE)
134
-    bed_level_matrix.set_to_identity();
135
-  #endif
136
-  init();
137
-}
132
+Planner::Planner() { init(); }
138
 
133
 
139
 void Planner::init() {
134
 void Planner::init() {
140
   block_buffer_head = block_buffer_tail = 0;
135
   block_buffer_head = block_buffer_tail = 0;
141
   memset(position, 0, sizeof(position)); // clear position
136
   memset(position, 0, sizeof(position)); // clear position
142
   for (int i = 0; i < NUM_AXIS; i++) previous_speed[i] = 0.0;
137
   for (int i = 0; i < NUM_AXIS; i++) previous_speed[i] = 0.0;
143
   previous_nominal_speed = 0.0;
138
   previous_nominal_speed = 0.0;
139
+  #if ENABLED(AUTO_BED_LEVELING_FEATURE)
140
+    bed_level_matrix.set_to_identity();
141
+  #endif
144
 }
142
 }
145
 
143
 
146
 /**
144
 /**

Loading…
Cancel
Save