diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2015-04-18 20:34:18 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2015-04-18 20:34:18 +0200 |
commit | 1c8e79cbf18cd2c41024ec1d91fb8a16b1900c9f (patch) | |
tree | 5c6147e993f24d0a9c5e6ae57400583c4615d64a /src/modules/sensors | |
parent | b7a6f18ca6b72529021e6fe3d5bf741673756f70 (diff) | |
download | px4-firmware-1c8e79cbf18cd2c41024ec1d91fb8a16b1900c9f.tar.gz px4-firmware-1c8e79cbf18cd2c41024ec1d91fb8a16b1900c9f.tar.bz2 px4-firmware-1c8e79cbf18cd2c41024ec1d91fb8a16b1900c9f.zip |
sensors app: Always set a valid rotation, even if sensor is unconfigured
Diffstat (limited to 'src/modules/sensors')
-rw-r--r-- | src/modules/sensors/sensors.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/modules/sensors/sensors.cpp b/src/modules/sensors/sensors.cpp index d4692ea7d..09d717c16 100644 --- a/src/modules/sensors/sensors.cpp +++ b/src/modules/sensors/sensors.cpp @@ -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 */ |