mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-22 06:14:14 +08:00
px4iofirmware: moved the simple register updates down to the fall-through block, moved the sbus rate update up so it doesn't get called on each of the other updates which would set the wrong value
This commit is contained in:
committed by
Lorenz Meier
parent
4db149f6e7
commit
5500dfc550
@@ -688,33 +688,27 @@ registers_set_one(uint8_t page, uint8_t offset, uint16_t value)
|
||||
|
||||
break;
|
||||
|
||||
case PX4IO_P_SETUP_PWM_REVERSE:
|
||||
r_page_setup[PX4IO_P_SETUP_PWM_REVERSE] = value;
|
||||
break;
|
||||
|
||||
case PX4IO_P_SETUP_TRIM_ROLL:
|
||||
case PX4IO_P_SETUP_TRIM_PITCH:
|
||||
case PX4IO_P_SETUP_TRIM_YAW:
|
||||
case PX4IO_P_SETUP_SCALE_ROLL:
|
||||
case PX4IO_P_SETUP_SCALE_PITCH:
|
||||
case PX4IO_P_SETUP_SCALE_YAW:
|
||||
case PX4IO_P_SETUP_MOTOR_SLEW_MAX:
|
||||
case PX4IO_P_SETUP_SBUS_RATE:
|
||||
r_page_setup[offset] = value;
|
||||
sbus1_set_output_rate_hz(value);
|
||||
break;
|
||||
|
||||
case PX4IO_P_SETUP_AIRMODE:
|
||||
r_page_setup[PX4IO_P_SETUP_AIRMODE] = value;
|
||||
break;
|
||||
|
||||
case PX4IO_P_SETUP_THR_MDL_FAC:
|
||||
update_mc_thrust_param = true;
|
||||
r_page_setup[offset] = value;
|
||||
break;
|
||||
|
||||
case PX4IO_P_SETUP_PWM_REVERSE:
|
||||
case PX4IO_P_SETUP_TRIM_ROLL:
|
||||
case PX4IO_P_SETUP_TRIM_PITCH:
|
||||
case PX4IO_P_SETUP_TRIM_YAW:
|
||||
case PX4IO_P_SETUP_SCALE_ROLL:
|
||||
case PX4IO_P_SETUP_SCALE_PITCH:
|
||||
case PX4IO_P_SETUP_SCALE_YAW:
|
||||
case PX4IO_P_SETUP_MOTOR_SLEW_MAX:
|
||||
case PX4IO_P_SETUP_AIRMODE:
|
||||
case PX4IO_P_SETUP_THERMAL:
|
||||
r_page_setup[PX4IO_P_SETUP_THERMAL] = value;
|
||||
r_page_setup[offset] = value;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user