Update sensory.cpp readAccelerometer (#60)

Changed the readings for SensorController::readAccelerometer. I also noticed `if (accelGyro->getXAxes(axes) != 0) {` uses getXAxes, does this not include data for Y and Z?
This commit is contained in:
Greg Degruy 2019-03-11 17:09:38 -07:00 коммит произвёл Oguz Bastemur
Родитель f36fded7dc
Коммит aba879da4e
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -132,9 +132,9 @@ void SensorController::readAccelerometer(int *axes) {
LOG_VERBOSE("SensorController::readAccelerometer");
bool hasFailed = false;
assert(magnetometer != NULL);
if (magnetometer == NULL) {
LOG_ERROR("Trying to do readMagnetometer while the sensor wasn't initialized.");
assert(accelGyro != NULL);
if (accelGyro == NULL) {
LOG_ERROR("Trying to do readAccelerometer while the sensor wasn't initialized.");
hasFailed = true;
}