Dependencies: MPU6050 Grove_temperature
Diff: sensor/gyroscope/Gyroscope.cpp
- Revision:
- 5:fa36c3288be8
- Parent:
- 3:f67352c85fd7
- Child:
- 6:806043bf1a2c
--- a/sensor/gyroscope/Gyroscope.cpp Thu Jun 20 15:35:53 2019 +0000 +++ b/sensor/gyroscope/Gyroscope.cpp Sat Jun 22 12:00:33 2019 -0300 @@ -1,5 +1,6 @@ #include "sgam_mdw.h" #include "mbed.h" + #include "MPU6050.h" #include "Gyroscope.h" @@ -19,6 +20,9 @@ value->~GyroscopeData(); } +int Gyroscope::initialize() { return 1; } +int Gyroscope::finalize() { return 1; } + void Gyroscope::getMotion(GyroscopeData* data) { mpu.getMotion6( &data->ax, &data->ay, &data->az, @@ -31,6 +35,6 @@ return value; } -char* Gyroscope::getName() { - return (char*)"Gyroscope"; +const char* Gyroscope::getName() { + return "Gyroscope"; }