Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: LSM9DS1 RangeFinder FastPWM
Revision 23:1926540ebbec, committed 2022-03-23
- Comitter:
- pmic
- Date:
- Wed Mar 23 09:46:07 2022 +0000
- Parent:
- 22:13db7047054c
- Commit message:
- Renamed ReEnalbe function to Enable in Servo class
Changed in this revision
| Servo.cpp | Show annotated file Show diff for this revision Revisions of this file |
| Servo.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/Servo.cpp Wed Mar 23 09:36:59 2022 +0000
+++ b/Servo.cpp Wed Mar 23 09:46:07 2022 +0000
@@ -59,9 +59,9 @@
}
/**
- * Re enables the servo with last set angle and period.
+ * Enables the servo with last set angle and period.
*/
-void Servo::ReEnable()
+void Servo::Enable()
{
servoEnabled = true;
Pulse.attach(callback(this, &Servo::StartPulse), std::chrono::microseconds{static_cast<long int>(Period)});
--- a/Servo.h Wed Mar 23 09:36:59 2022 +0000
+++ b/Servo.h Wed Mar 23 09:46:07 2022 +0000
@@ -31,10 +31,10 @@
public:
Servo(PinName Pin);
- void Servo::SetPeriod(float _Period);
+ void SetPeriod(float _Period);
void SetPosition(float _Input);
void Enable(float _StartInput, int _Period);
- void ReEnable();
+ void Enable();
void Disable();
bool isEnabled();