File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ int BLDCMotor::alignSensor() {
183183 for (int i = 0 ; i <=500 ; i++ ) {
184184 float angle = _3PI_2 + _2PI * i / 500 .0f ;
185185 setPhaseVoltage (voltage_sensor_align, 0 , angle);
186- sensor->update ();
186+ sensor->update ();
187187 _delay (2 );
188188 }
189189 // take and angle in the middle
@@ -193,7 +193,7 @@ int BLDCMotor::alignSensor() {
193193 for (int i = 500 ; i >=0 ; i-- ) {
194194 float angle = _3PI_2 + _2PI * i / 500 .0f ;
195195 setPhaseVoltage (voltage_sensor_align, 0 , angle);
196- sensor->update ();
196+ sensor->update ();
197197 _delay (2 );
198198 }
199199 sensor->update ();
Original file line number Diff line number Diff line change @@ -141,6 +141,7 @@ int StepperMotor::alignSensor() {
141141 for (int i = 0 ; i <=500 ; i++ ) {
142142 float angle = _3PI_2 + _2PI * i / 500 .0f ;
143143 setPhaseVoltage (voltage_sensor_align, 0 , angle);
144+ sensor->update ();
144145 _delay (2 );
145146 }
146147 // take and angle in the middle
@@ -150,6 +151,7 @@ int StepperMotor::alignSensor() {
150151 for (int i = 500 ; i >=0 ; i-- ) {
151152 float angle = _3PI_2 + _2PI * i / 500 .0f ;
152153 setPhaseVoltage (voltage_sensor_align, 0 , angle);
154+ sensor->update ();
153155 _delay (2 );
154156 }
155157 sensor->update ();
You can’t perform that action at this time.
0 commit comments