mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 03:11:35 +08:00
px4io driver: fix reporting of mixer limits (#4922)
mixer limit topic was not filled correctly Signed-off-by: tumbili <roman@px4.io>
This commit is contained in:
committed by
Lorenz Meier
parent
050eedc4f8
commit
ec35e77175
@@ -1950,7 +1950,9 @@ PX4IO::io_publish_pwm_outputs()
|
|||||||
/* get mixer status flags from IO */
|
/* get mixer status flags from IO */
|
||||||
uint16_t mixer_status;
|
uint16_t mixer_status;
|
||||||
ret = io_reg_get(PX4IO_PAGE_STATUS, PX4IO_P_STATUS_MIXER, &mixer_status, sizeof(mixer_status) / sizeof(uint16_t));
|
ret = io_reg_get(PX4IO_PAGE_STATUS, PX4IO_P_STATUS_MIXER, &mixer_status, sizeof(mixer_status) / sizeof(uint16_t));
|
||||||
memcpy(&motor_limits, &mixer_status, sizeof(motor_limits));
|
motor_limits.lower_limit = mixer_status & PX4IO_P_STATUS_MIXER_LOWER_LIMIT;
|
||||||
|
motor_limits.upper_limit = mixer_status & PX4IO_P_STATUS_MIXER_UPPER_LIMIT;
|
||||||
|
motor_limits.yaw = mixer_status & PX4IO_P_STATUS_MIXER_YAW_LIMIT;
|
||||||
|
|
||||||
if (ret != OK) {
|
if (ret != OK) {
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user