FSG / Controller_

Dependents:   7_20_17_FSG_ 7_21_17_FSG 7_26_17_FSG

Fork of Controller by Melissa Davis

Files at this revision

API Documentation at this revision

Comitter:
mdavis30
Date:
Fri Jul 28 18:49:24 2017 +0000
Parent:
5:55085534a378
Commit message:

Changed in this revision

controller.cpp Show annotated file Show diff for this revision Revisions of this file
controller.hpp Show annotated file Show diff for this revision Revisions of this file
--- a/controller.cpp	Fri Jul 21 15:25:04 2017 +0000
+++ b/controller.cpp	Fri Jul 28 18:49:24 2017 +0000
@@ -35,7 +35,15 @@
 void PositionController::writeSetPoint(float cmd)
 {
     //33mm and 400mm are the safe allowable limits that the piston can go to
-    _setPoint = clamp<float>(cmd, -10.0, 380.0); //changed 400 to 500 on 6/5/17 //33 to 50
+    _setPoint = clamp<float>(cmd, 10.0, 380.0); //changed 400 to 500 on 6/5/17 //33 to 50
+}
+
+
+///////////////////Add the new bounds here!!!!!!!!!for the linear actuator!!!!////////////////////
+void PositionController::writeSetPoint_la(float cmd)
+{
+    //33mm and 400mm are the safe allowable limits that the piston can go to
+    _setPoint = clamp<float>(cmd, 1.0, 100.0); //changed 400 to 500 on 6/5/17 //33 to 50
 }
 
 float PositionController::getOutput()
--- a/controller.hpp	Fri Jul 21 15:25:04 2017 +0000
+++ b/controller.hpp	Fri Jul 28 18:49:24 2017 +0000
@@ -17,6 +17,7 @@
     void setDgain(float gain);
     
     void writeSetPoint(float cmd);
+    void writeSetPoint_la(float cmd);
     
 //    void setConfigFlag();