mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 17:03:33 +08:00
implemented mapping between desired thrust and applied pwm in
multirotor mixer. Signed-off-by: Roman <bapstroman@gmail.com>
This commit is contained in:
@@ -56,6 +56,7 @@
|
||||
static int registers_set_one(uint8_t page, uint8_t offset, uint16_t value);
|
||||
static void pwm_configure_rates(uint16_t map, uint16_t defaultrate, uint16_t altrate);
|
||||
|
||||
bool update_mc_thrust_param;
|
||||
/**
|
||||
* PAGE 0
|
||||
*
|
||||
@@ -182,6 +183,7 @@ volatile uint16_t r_page_setup[] = {
|
||||
[PX4IO_P_SETUP_SCALE_PITCH] = 10000,
|
||||
[PX4IO_P_SETUP_SCALE_YAW] = 10000,
|
||||
[PX4IO_P_SETUP_MOTOR_SLEW_MAX] = 0,
|
||||
[PX4IO_P_SETUP_THR_MDL_FAC] = 0,
|
||||
[PX4IO_P_SETUP_THERMAL] = PX4IO_THERMAL_IGNORE
|
||||
};
|
||||
|
||||
@@ -709,12 +711,14 @@ registers_set_one(uint8_t page, uint8_t offset, uint16_t value)
|
||||
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_MOTOR_SLEW_MAX:
|
||||
case PX4IO_P_SETUP_THR_MDL_FAC:
|
||||
update_mc_thrust_param = true;
|
||||
r_page_setup[offset] = value;
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user