mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 11:23:34 +08:00
sensors app: Always set a valid rotation, even if sensor is unconfigured
This commit is contained in:
@@ -1480,9 +1480,16 @@ Sensors::parameter_update_poll(bool forced)
|
|||||||
int fd = open(str, 0);
|
int fd = open(str, 0);
|
||||||
|
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
|
/* the driver is not running, abort */
|
||||||
continue;
|
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;
|
bool config_ok = false;
|
||||||
|
|
||||||
/* run through all stored calibrations */
|
/* run through all stored calibrations */
|
||||||
|
|||||||
Reference in New Issue
Block a user