Generates reference based on analog input
Dependents: locomotion_pid_action_refactor_EMG
Revision 6:a8a82cee2705, committed 2017-10-27
- Comitter:
- tvlogman
- Date:
- Fri Oct 27 10:37:24 2017 +0000
- Parent:
- 5:7186da6f562f
- Commit message:
- Nothing changed
Changed in this revision
refGen.cpp | Show annotated file Show diff for this revision Revisions of this file |
refGen.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 7186da6f562f -r a8a82cee2705 refGen.cpp --- a/refGen.cpp Sun Oct 22 08:06:37 2017 +0000 +++ b/refGen.cpp Fri Oct 27 10:37:24 2017 +0000 @@ -6,8 +6,8 @@ } -float refGen :: getReference(){ - float r; +double refGen :: getReference(){ + double r; if(r_direction == false){ // Clockwise rotation yields positive reference r = maxAngle*refPin.read();
diff -r 7186da6f562f -r a8a82cee2705 refGen.h --- a/refGen.h Sun Oct 22 08:06:37 2017 +0000 +++ b/refGen.h Fri Oct 27 10:37:24 2017 +0000 @@ -7,7 +7,7 @@ class refGen { public: refGen(PinName, float); // Constructor sets up the pin to read the reference from - float getReference(); // Gets reference position on specified pin + double getReference(); // Gets reference position on specified pin float maxAngle; bool r_direction;