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:
Родитель
f36fded7dc
Коммит
aba879da4e
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче