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.
Dependencies: C12832 FXOS8700Q LM75B MMA7660
Revision 4:50e2aefe516b, committed 2016-02-25
- Comitter:
- co838_app56
- Date:
- Thu Feb 25 15:12:32 2016 +0000
- Parent:
- 3:1ab88130bb9d
- Commit message:
- Fixing precision issue;
Changed in this revision
FrdmK64f_AppShield_Input.hpp | Show annotated file Show diff for this revision Revisions of this file |
FrdmK64f_Input.hpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/FrdmK64f_AppShield_Input.hpp Thu Feb 25 14:28:48 2016 +0000 +++ b/FrdmK64f_AppShield_Input.hpp Thu Feb 25 15:12:32 2016 +0000 @@ -102,8 +102,8 @@ void setEnable(FrdmK64f_AppShield_Input::IDVectorInput inp, bool act) { _vectorInputEnable[inp] = act; } using Parent::setPrecision; - void setPrecision(FrdmK64f_AppShield_Input::IDAnalogInput inp, float prec) { _analogInputPrec[inp] = prec; } - void setPrecision(FrdmK64f_AppShield_Input::IDVectorInput inp, float prec) { _vectorInputPrec[inp] = prec; } + void setPrecision(FrdmK64f_AppShield_Input::IDAnalogInput inp, float prec) { _analogInputPrec[inp] = pow(10.0f, prec); } + void setPrecision(FrdmK64f_AppShield_Input::IDVectorInput inp, float prec) { _vectorInputPrec[inp] = pow(10.0f, prec); } // Not interresting section (do not use those methods) // Callbacks for joystick
--- a/FrdmK64f_Input.hpp Thu Feb 25 14:28:48 2016 +0000 +++ b/FrdmK64f_Input.hpp Thu Feb 25 15:12:32 2016 +0000 @@ -64,7 +64,7 @@ void setEnable(FrdmK64f_Input::IDVectorInput inp, bool act) { _vectorInputEnable[inp] = act; } using Parent::setPrecision; - void setPrecision(FrdmK64f_Input::IDVectorInput inp, float prec) { _vectorInputPrec[inp] = prec; } + void setPrecision(FrdmK64f_Input::IDVectorInput inp, float prec) { _vectorInputPrec[inp] = pow(10.0f, prec); } // Not interresting section (do not use those methods) // Callbacks for joystick