mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
sensors app: Always set a valid rotation, even if sensor is unconfigured
This commit is contained in:
parent
b7a6f18ca6
commit
1c8e79cbf1
@ -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 */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user