sensors app: Always set a valid rotation, even if sensor is unconfigured

This commit is contained in:
Lorenz Meier 2015-04-18 20:34:18 +02:00
parent b7a6f18ca6
commit 1c8e79cbf1

View File

@ -1480,9 +1480,16 @@ Sensors::parameter_update_poll(bool forced)
int fd = open(str, 0);
if (fd < 0) {
/* the driver is not running, abort */
continue;
}
/* set a valid default rotation (same as board).
* if the mag is configured, this might be replaced
* in the section below.
*/
_mag_rotation[s] = _board_rotation;
bool config_ok = false;
/* run through all stored calibrations */