Kallums Fork

Fork of SteeringServo by James Batchelar

Files at this revision

API Documentation at this revision

Comitter:
Kallum
Date:
Fri Sep 08 00:41:18 2017 +0000
Parent:
1:88fe796b4c2e
Commit message:
Fixed errors with the current pulse width

Changed in this revision

SteeringServo.cpp Show annotated file Show diff for this revision Revisions of this file
SteeringServo.h Show annotated file Show diff for this revision Revisions of this file
--- a/SteeringServo.cpp	Sat Sep 02 00:52:36 2017 +0000
+++ b/SteeringServo.cpp	Fri Sep 08 00:41:18 2017 +0000
@@ -16,7 +16,7 @@
     // -- Ensure that pulse width doesn't exceed limits
     if (pulseWidth < minimumPulseWidth_)
     {
-        pulseWidth = mimimumPulseWidth_;
+        pulseWidth = minimumPulseWidth_;
     }
     else if (pulseWidth > maximumPulseWidth_)
     {
@@ -35,6 +35,6 @@
 //-- return the current Pulse Width
 int SteeringServo::getPulseWidth(void)
 {
-    return(currentPulseWidth);
+    return(currentPulseWidth_);
 }
     
\ No newline at end of file
--- a/SteeringServo.h	Sat Sep 02 00:52:36 2017 +0000
+++ b/SteeringServo.h	Fri Sep 08 00:41:18 2017 +0000
@@ -85,7 +85,7 @@
         /** Get the currentPulseWidth
         *
         */
-        int getPulseWidth(void)    
+        int getPulseWidth(void);    
      
     private:
         PwmOut servo_;               // -- PWM Object