aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/sensors/sensors.cpp7
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 */