diff --git a/motor.h b/motor.h index ef0e8c24f801c2071cdeedb0da9a370126e74579..caa4718ee912db52e648f154dfe31a8291ffc9c7 100644 --- a/motor.h +++ b/motor.h @@ -76,6 +76,11 @@ public: #endif } + bool motorIsRunning () //return true if the motor is currently running + { + return (stepper.speed() != 0); + } + void setAccelMmPerSecPerSec (float mmPerSecPerSec) { if (mmPerSecPerSec == 0)