mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00: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);
|
||||
|
||||
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 */
|
||||
|
||||
Reference in New Issue
Block a user