Skip to content

Commit f4687c6

Browse files
committed
spacing issues + stepper sensor align update
1 parent 6d93dca commit f4687c6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/BLDCMotor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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();

src/StepperMotor.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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();

0 commit comments

Comments
 (0)