Generates reference based on analog input
Dependents: locomotion_pid_action_refactor_EMG
Diff: refGen.cpp
- Revision:
- 3:43d9f8db93b7
- Parent:
- 2:35c05e7698f5
- Child:
- 4:38af2aa14a3f
diff -r 35c05e7698f5 -r 43d9f8db93b7 refGen.cpp --- a/refGen.cpp Fri Oct 20 12:23:03 2017 +0000 +++ b/refGen.cpp Fri Oct 20 16:28:30 2017 +0000 @@ -6,11 +6,11 @@ } -float refGen :: getReferencePosition(float maxAngle, bool r_direction){ +float refGen :: getReferencePosition(){ float r; if(r_direction == false){ // Clockwise rotation yields positive reference - r = maxAngle*frefPin.read(); + r = maxAngle*refPin.read(); } if(r_direction == true){ // Counterclockwise rotation yields negative reference