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.
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 |
--- 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();
--- 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;