diff --git a/src/AccelStepper.cpp b/src/AccelStepper.cpp index 54535cc..aae6186 100644 --- a/src/AccelStepper.cpp +++ b/src/AccelStepper.cpp @@ -38,7 +38,7 @@ void AccelStepper::move(long relative) // Implements steps according to the current step interval // You must call this at least once per step // returns true if a step occurred -boolean AccelStepper::runSpeed() +bool AccelStepper::runSpeed() { // Dont do anything unless we actually have a step interval if (!_stepInterval) @@ -182,7 +182,7 @@ unsigned long AccelStepper::computeNewSpeed() // You must call this at least once per step, preferably in your main loop // If the motor is in the desired position, the cost is very small // returns true if the motor is still running to the target position. -boolean AccelStepper::run() +bool AccelStepper::run() { if (runSpeed()) computeNewSpeed(); @@ -643,7 +643,7 @@ void AccelStepper::runToPosition() YIELD; // Let system housekeeping occur } -boolean AccelStepper::runSpeedToPosition() +bool AccelStepper::runSpeedToPosition() { if (_targetPos == _currentPos) return false; diff --git a/src/AccelStepper.h b/src/AccelStepper.h index 42ee37d..a45dc7c 100644 --- a/src/AccelStepper.h +++ b/src/AccelStepper.h @@ -414,13 +414,13 @@ class AccelStepper /// preferably in your main loop. Note that each call to run() will make at most one step, and then only when a step is due, /// based on the current speed and the time since the last step. /// \return true if the motor is still running to the target position. - boolean run(); + bool run(); /// Poll the motor and step it if a step is due, implementing a constant /// speed as set by the most recent call to setSpeed(). You must call this as /// frequently as possible, but at least once per step interval, /// \return true if the motor was stepped. - boolean runSpeed(); + bool runSpeed(); /// Sets the maximum permitted speed. The run() function will accelerate /// up to the speed set by this function. @@ -495,7 +495,7 @@ class AccelStepper /// speed unless the target position has been reached. /// Does not implement accelerations. /// \return true if it stepped - boolean runSpeedToPosition(); + bool runSpeedToPosition(); /// Moves the motor (with acceleration/deceleration) /// to the new target position and blocks until it is at @@ -650,7 +650,7 @@ class AccelStepper /// Current direction motor is spinning in /// Protected because some peoples subclasses need it to be so - boolean _direction; // 1 == CW + bool _direction; // 1 == CW /// The current interval between steps in microseconds. /// 0 means the motor is currently stopped with _speed == 0 diff --git a/src/MultiStepper.cpp b/src/MultiStepper.cpp index 6a22e11..ae33bcb 100644 --- a/src/MultiStepper.cpp +++ b/src/MultiStepper.cpp @@ -11,7 +11,7 @@ MultiStepper::MultiStepper() { } -boolean MultiStepper::addStepper(AccelStepper& stepper) +bool MultiStepper::addStepper(AccelStepper& stepper) { if (_num_steppers >= MULTISTEPPER_MAX_STEPPERS) return false; // No room for more @@ -49,10 +49,10 @@ void MultiStepper::moveTo(long absolute[]) } // Returns true if any motor is still running to the target position. -boolean MultiStepper::run() +bool MultiStepper::run() { uint8_t i; - boolean ret = false; + bool ret = false; for (i = 0; i < _num_steppers; i++) { if ( _steppers[i]->distanceToGo() != 0) diff --git a/src/MultiStepper.h b/src/MultiStepper.h index d801bb0..c408648 100644 --- a/src/MultiStepper.h +++ b/src/MultiStepper.h @@ -40,7 +40,7 @@ class MultiStepper /// There is an upper limit of MULTISTEPPER_MAX_STEPPERS = 10 to the number of steppers that can be managed /// \param[in] stepper Reference to a stepper to add to the managed list /// \return true if successful. false if the number of managed steppers would exceed MULTISTEPPER_MAX_STEPPERS - boolean addStepper(AccelStepper& stepper); + bool addStepper(AccelStepper& stepper); /// Set the target positions of all managed steppers /// according to a coordinate array. @@ -54,7 +54,7 @@ class MultiStepper /// Calls runSpeed() on all the managed steppers /// that have not acheived their target position. /// \return true if any stepper is still in the process of running to its target position. - boolean run(); + bool run(); /// Runs all managed steppers until they acheived their target position. /// Blocks until all that position is acheived. If you dont