From b534689a62acc6826635aa9efe104044da36bbf3 Mon Sep 17 00:00:00 2001
From: Malaurie Bernard <mbernard@kinouby>
Date: Tue, 27 Jun 2023 12:07:04 +0200
Subject: [PATCH] =?UTF-8?q?Ajout=20d'une=20fonction=20bool=C3=A9enne=20pou?=
 =?UTF-8?q?r=20savoir=20si=20le=20moteur=20tourne=20(dans=20l'objectif=20d?=
 =?UTF-8?q?e=20noter=20l'=C3=A9tat=20du=20moteur=20sur=20l'interface=20gra?=
 =?UTF-8?q?phique).?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 motor.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/motor.h b/motor.h
index ef0e8c2..caa4718 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)
-- 
GitLab