PM2_Lib

Dependencies:   LSM9DS1 RangeFinder FastPWM

Revision:
21:45d903d986f6
Parent:
20:ea222b81350e
Child:
22:13db7047054c
--- a/Servo.cpp	Tue Mar 22 09:43:13 2022 +0000
+++ b/Servo.cpp	Wed Mar 23 09:30:21 2022 +0000
@@ -50,6 +50,15 @@
 }
 
 /**
+ * Re enables the servo with last set angle and period.
+ */
+void Servo::ReEnable()
+{
+    servoEnabled = true;
+    Pulse.attach(callback(this, &Servo::StartPulse), std::chrono::microseconds{static_cast<long int>(Period)});
+}
+
+/**
  * Disables the servo.
  */
 void Servo::Disable()