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: mbed DCM_AHRS_GY80 PID MMA8451Q
Fork of quadCommand by
quadCommand/sensorS/sensors.cpp@4:ce6ad16337c5, 2013-06-09 (annotated)
- Committer:
- gabdo
- Date:
- Sun Jun 09 22:59:11 2013 +0000
- Revision:
- 4:ce6ad16337c5
- Parent:
- 1:9b90e7de6e09
- Child:
- 9:9e0d0ba5b6b1
None
;
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| gabdo | 0:8681037b9a18 | 1 | /************************ quadCommand.cpp ********************************/ |
| gabdo | 0:8681037b9a18 | 2 | /* */ |
| gabdo | 0:8681037b9a18 | 3 | /*************************************************************************/ |
| gabdo | 0:8681037b9a18 | 4 | |
| gabdo | 0:8681037b9a18 | 5 | #include "sensors.h" |
| gabdo | 0:8681037b9a18 | 6 | |
| gabdo | 0:8681037b9a18 | 7 | sensors::sensors() |
| gabdo | 0:8681037b9a18 | 8 | { |
| gabdo | 0:8681037b9a18 | 9 | acc = new MMA8451Q( ACCSDA, ACCSCL, MMA8451_I2C_ADDRESS); |
| gabdo | 0:8681037b9a18 | 10 | } |
| gabdo | 0:8681037b9a18 | 11 | |
| gabdo | 4:ce6ad16337c5 | 12 | float sensors::getAbsoluteX() |
| gabdo | 0:8681037b9a18 | 13 | { |
| gabdo | 4:ce6ad16337c5 | 14 | return (acc->getAccX(); |
| gabdo | 0:8681037b9a18 | 15 | } |
| gabdo | 0:8681037b9a18 | 16 | |
| gabdo | 4:ce6ad16337c5 | 17 | float sensors::getAbsoluteY() |
| gabdo | 0:8681037b9a18 | 18 | { |
| gabdo | 4:ce6ad16337c5 | 19 | return (acc->getAccY(); |
| gabdo | 0:8681037b9a18 | 20 | } |
