mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 03:01:36 +08:00
fmu + px4io: fixes for MC_AIRMODE parameter
- fmu: in case of _mot_t_max==0 _airmode was not set in the mixer - px4io: param_val is a float
This commit is contained in:
@@ -1226,8 +1226,9 @@ PX4IO::task_main()
|
||||
parm_handle = param_find("MC_AIRMODE");
|
||||
|
||||
if (parm_handle != PARAM_INVALID) {
|
||||
param_get(parm_handle, ¶m_val);
|
||||
(void)io_reg_set(PX4IO_PAGE_SETUP, PX4IO_P_SETUP_AIRMODE, SIGNED_TO_REG(param_val));
|
||||
int32_t param_val_int;
|
||||
param_get(parm_handle, ¶m_val_int);
|
||||
(void)io_reg_set(PX4IO_PAGE_SETUP, PX4IO_P_SETUP_AIRMODE, SIGNED_TO_REG(param_val_int));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user