Browse Source

Init matrix in planner.init

Scott Lahteine 8 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,18 +129,16 @@ float Planner::previous_nominal_speed;
129 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 134
 void Planner::init() {
140 135
   block_buffer_head = block_buffer_tail = 0;
141 136
   memset(position, 0, sizeof(position)); // clear position
142 137
   for (int i = 0; i < NUM_AXIS; i++) previous_speed[i] = 0.0;
143 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