@@ -189,26 +189,30 @@ void Stepper::step(int steps_to_move)
189189 int steps_left = abs (steps_to_move); // how many steps to take
190190
191191 // determine direction based on whether steps_to_mode is + or -:
192- if (steps_to_move > 0 ) {this ->direction = 1 ;}
193- if (steps_to_move < 0 ) {this ->direction = 0 ;}
192+ if (steps_to_move > 0 ) { this ->direction = 1 ; }
193+ if (steps_to_move < 0 ) { this ->direction = 0 ; }
194194
195195
196196 // decrement the number of steps, moving one step each time:
197- while (steps_left > 0 ) {
198- unsigned long now = micros ();
199- // move only if the appropriate delay has passed:
200- if (now - this ->last_step_time >= this ->step_delay ) {
197+ while (steps_left > 0 )
198+ {
199+ unsigned long now = micros ();
200+ // move only if the appropriate delay has passed:
201+ if (now - this ->last_step_time >= this ->step_delay )
202+ {
201203 // get the timeStamp of when you stepped:
202204 this ->last_step_time = now;
203205 // increment or decrement the step number,
204206 // depending on direction:
205- if (this ->direction == 1 ) {
207+ if (this ->direction == 1 )
208+ {
206209 this ->step_number ++;
207210 if (this ->step_number == this ->number_of_steps ) {
208211 this ->step_number = 0 ;
209212 }
210213 }
211- else {
214+ else
215+ {
212216 if (this ->step_number == 0 ) {
213217 this ->step_number = this ->number_of_steps ;
214218 }
0 commit comments