mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-29 23:54:07 +08:00
fix param_translation: set address to 0 only on NuttX
On Linux it can be non-zero.
This commit is contained in:
parent
338dd45022
commit
0c5fbf5954
@ -101,10 +101,14 @@ bool param_modify_on_import(bson_node_t node)
|
||||
device_id.devid = (uint32_t) * ivalue;
|
||||
|
||||
// SPI board config translation
|
||||
#ifdef __PX4_NUTTX // only on NuttX the address is 0
|
||||
|
||||
if (device_id.devid_s.bus_type == device::Device::DeviceBusType_SPI) {
|
||||
device_id.devid_s.address = 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// deprecated ACC -> IMU translations
|
||||
if (device_id.devid_s.devtype == DRV_ACC_DEVTYPE_MPU6000_LEGACY) {
|
||||
device_id.devid_s.devtype = DRV_IMU_DEVTYPE_MPU6000;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user