Implemented first Hangar-Service
Dependencies: CalibrateMagneto QuaternionMath
Fork of SML2 by
Accelerometer.h@32:d37447aec6b4, 2015-05-04 (annotated)
- Committer:
- pvaibhav
- Date:
- Mon May 04 15:16:57 2015 +0000
- Revision:
- 32:d37447aec6b4
- Parent:
- 8:cba37530d480
- Child:
- 46:fd5a62296b12
Interrupt lines added to all sensors and motor driver, power aware I2C subclass added (currently doesn't do anything)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
pvaibhav | 1:c279bc3af90c | 1 | #ifndef _H_ACCELEROMETER_H |
pvaibhav | 1:c279bc3af90c | 2 | #define _H_ACCELEROMETER_H |
pvaibhav | 1:c279bc3af90c | 3 | |
pvaibhav | 1:c279bc3af90c | 4 | #include "I2CPeripheral.h" |
pvaibhav | 7:604a8369b801 | 5 | #include "Sensor.h" |
pvaibhav | 5:b9f2f62a8f90 | 6 | |
pvaibhav | 7:604a8369b801 | 7 | class Accelerometer : public I2CPeripheral, public Sensor |
pvaibhav | 7:604a8369b801 | 8 | { |
pvaibhav | 1:c279bc3af90c | 9 | public: |
pvaibhav | 1:c279bc3af90c | 10 | Accelerometer(I2C &i2c); |
pvaibhav | 7:604a8369b801 | 11 | |
pvaibhav | 7:604a8369b801 | 12 | virtual bool powerOn(); |
pvaibhav | 7:604a8369b801 | 13 | virtual void powerOff(); |
pvaibhav | 7:604a8369b801 | 14 | virtual void start(); |
pvaibhav | 7:604a8369b801 | 15 | virtual void stop(); |
pvaibhav | 7:604a8369b801 | 16 | |
pvaibhav | 8:cba37530d480 | 17 | virtual Vector3 read(); |
pvaibhav | 32:d37447aec6b4 | 18 | |
pvaibhav | 32:d37447aec6b4 | 19 | private: |
pvaibhav | 32:d37447aec6b4 | 20 | InterruptIn int1; |
pvaibhav | 32:d37447aec6b4 | 21 | InterruptIn int2; |
pvaibhav | 1:c279bc3af90c | 22 | }; |
pvaibhav | 1:c279bc3af90c | 23 | |
pvaibhav | 1:c279bc3af90c | 24 | #endif |