working commands. singleton deleted
Diff: ReadCommand.cpp
- Revision:
- 2:c9e47ac47edb
- Parent:
- 1:fd4c0e2decb8
- Child:
- 3:32afe87d4b62
--- a/ReadCommand.cpp Sun Jun 07 14:11:14 2015 +0000 +++ b/ReadCommand.cpp Sun Jun 07 17:49:23 2015 +0000 @@ -1,10 +1,9 @@ #include "ReadCommand.h" #include "OfflineCommand.h" -ReadCommand::ReadCommand() +ReadCommand::ReadCommand(Storage* storage) { - Storage* storage = Storage::getInstance(); - Sensors* sensors = Sensors::getInstance(); + this->storage = storage; this->running = 0; this->addr = 0x00; } @@ -44,10 +43,11 @@ for(int i = 0; i <= OfflineCommand::getLastAddress(); i = i + 4 ) { this->storage->read(i); - angle_H= this->storage->readData(); - angle_L = this->storage->readData(); - imu_H = this->storage->readData(); - imu_L = this->storage->readData(); +/* + this->storage->readData(); + this->storage->readData(); + this->storage->readData(); + this->storage->readData(); this->storage->endAction(); @@ -59,6 +59,7 @@ printf("Memory: angle = %.2f, gyroX = %.4f\n", angle, gyro); + */ }