diff --git a/ROMFS/px4fmu_common/mixers-sitl/tiltrotor_sitl.main.mix b/ROMFS/px4fmu_common/mixers-sitl/tiltrotor_sitl.main.mix index f57230b4a8..54fd3c51f2 100644 --- a/ROMFS/px4fmu_common/mixers-sitl/tiltrotor_sitl.main.mix +++ b/ROMFS/px4fmu_common/mixers-sitl/tiltrotor_sitl.main.mix @@ -8,22 +8,22 @@ R: 4x # tilt servo motor 1 M: 1 O: 10000 10000 0 -10000 10000 -S: 1 4 0 20000 -10000 -10000 10000 +S: 1 8 0 20000 -10000 -10000 10000 # tilt servo motor 2 M: 1 O: 10000 10000 0 -10000 10000 -S: 1 4 0 20000 -10000 -10000 10000 +S: 1 8 0 20000 -10000 -10000 10000 # tilt servo motor 3 M: 1 O: 10000 10000 0 -10000 10000 -S: 1 4 0 20000 -10000 -10000 10000 +S: 1 8 0 20000 -10000 -10000 10000 # tilt servo motor 4 M: 1 O: 10000 10000 0 -10000 10000 -S: 1 4 0 20000 -10000 -10000 10000 +S: 1 8 0 20000 -10000 -10000 10000 # mixer for the left aileron M: 1 diff --git a/ROMFS/px4fmu_common/mixers/claire.aux.mix b/ROMFS/px4fmu_common/mixers/claire.aux.mix index 7213daf2a2..014e94cf8a 100644 --- a/ROMFS/px4fmu_common/mixers/claire.aux.mix +++ b/ROMFS/px4fmu_common/mixers/claire.aux.mix @@ -10,7 +10,7 @@ Tilt mechanism servo mixer M: 1 -S: 1 4 10000 10000 0 -10000 10000 +S: 1 8 10000 10000 0 -10000 10000 diff --git a/ROMFS/px4fmu_common/mixers/firefly6.aux.mix b/ROMFS/px4fmu_common/mixers/firefly6.aux.mix index 9a2d3c7747..9007a23b96 100644 --- a/ROMFS/px4fmu_common/mixers/firefly6.aux.mix +++ b/ROMFS/px4fmu_common/mixers/firefly6.aux.mix @@ -6,7 +6,7 @@ Tilt mechanism servo mixer --------------------------- M: 1 -S: 1 4 0 20000 -10000 -10000 10000 +S: 1 8 0 20000 -10000 -10000 10000 Elevon mixers ------------- diff --git a/ROMFS/px4fmu_common/mixers/vtol_TTTTAAER.aux.mix b/ROMFS/px4fmu_common/mixers/vtol_TTTTAAER.aux.mix index 5294180a91..fe684c70bc 100644 --- a/ROMFS/px4fmu_common/mixers/vtol_TTTTAAER.aux.mix +++ b/ROMFS/px4fmu_common/mixers/vtol_TTTTAAER.aux.mix @@ -6,19 +6,19 @@ --------------------------- # front left up:2000 down:1000 M: 1 -S: 1 4 0 -20000 10000 -10000 10000 +S: 1 8 0 -20000 10000 -10000 10000 # front right up:1000 down:2000 M: 1 -S: 1 4 0 20000 -10000 -10000 10000 +S: 1 8 0 20000 -10000 -10000 10000 # rear left up:2000 down:1000 M: 1 -S: 1 4 0 -20000 10000 -10000 10000 +S: 1 8 0 -20000 10000 -10000 10000 # rear right up:1000 down:2000 M: 1 -S: 1 4 0 20000 -10000 -10000 10000 +S: 1 8 0 20000 -10000 -10000 10000 # Aileron mixer diff --git a/ROMFS/px4fmu_common/mixers/vtol_convergence.main.mix b/ROMFS/px4fmu_common/mixers/vtol_convergence.main.mix index eaf4236034..086150c257 100644 --- a/ROMFS/px4fmu_common/mixers/vtol_convergence.main.mix +++ b/ROMFS/px4fmu_common/mixers/vtol_convergence.main.mix @@ -10,12 +10,12 @@ Tilt mechanism servo mixer --------------------------- #RIGHT up:2000 down:1000 M: 2 -S: 1 4 0 -20000 10000 -10000 10000 +S: 1 8 0 -20000 10000 -10000 10000 S: 0 2 8000 8000 0 -10000 10000 #LEFT up:1000 down:2000 M: 2 -S: 1 4 0 20000 -10000 -10000 10000 +S: 1 8 0 20000 -10000 -10000 10000 S: 0 2 8000 8000 0 -10000 10000 Elevon mixers diff --git a/ROMFS/px4fmu_test/mixers/vtol2_test.mix b/ROMFS/px4fmu_test/mixers/vtol2_test.mix index d49070f5b9..f9ed50e6c9 100644 --- a/ROMFS/px4fmu_test/mixers/vtol2_test.mix +++ b/ROMFS/px4fmu_test/mixers/vtol2_test.mix @@ -10,13 +10,13 @@ Tilt mechanism servo mixer #RIGHT up:2000 down:1000 M: 2 O: 10000 10000 0 -10000 10000 -S: 1 4 0 -20000 9000 -10000 10000 +S: 1 8 0 -20000 9000 -10000 10000 S: 0 2 4000 4000 0 -10000 10000 #LEFT up:1000 down:2000 M: 2 O: 10000 10000 0 -10000 10000 -S: 1 4 0 20000 -10000 -10000 10000 +S: 1 8 0 20000 -10000 -10000 10000 S: 0 2 4000 4000 0 -10000 10000 Elevon mixers diff --git a/ROMFS/px4fmu_test/mixers/vtol_convergence.main.mix b/ROMFS/px4fmu_test/mixers/vtol_convergence.main.mix index a2d8a90621..ed9b69360b 100644 --- a/ROMFS/px4fmu_test/mixers/vtol_convergence.main.mix +++ b/ROMFS/px4fmu_test/mixers/vtol_convergence.main.mix @@ -10,13 +10,13 @@ Tilt mechanism servo mixer #RIGHT up:2000 down:1000 M: 2 O: 10000 10000 0 -10000 10000 -S: 1 4 0 -20000 10000 -10000 10000 +S: 1 8 0 -20000 10000 -10000 10000 S: 0 2 8000 8000 0 -10000 10000 #LEFT up:1000 down:2000 M: 2 O: 10000 10000 0 -10000 10000 -S: 1 4 0 20000 -10000 -10000 10000 +S: 1 8 0 20000 -10000 -10000 10000 S: 0 2 8000 8000 0 -10000 10000 Elevon mixers diff --git a/msg/actuator_controls.msg b/msg/actuator_controls.msg index 25ff45f432..ec8203c9ab 100644 --- a/msg/actuator_controls.msg +++ b/msg/actuator_controls.msg @@ -11,6 +11,7 @@ uint8 INDEX_AIRBRAKES = 6 uint8 INDEX_LANDING_GEAR = 7 uint8 INDEX_GIMBAL_SHUTTER = 3 uint8 INDEX_CAMERA_ZOOM = 4 +uint8 INDEX_COLLECTIVE_TILT = 8 uint8 GROUP_INDEX_ATTITUDE = 0 uint8 GROUP_INDEX_ATTITUDE_ALTERNATE = 1 @@ -19,7 +20,7 @@ uint8 GROUP_INDEX_MANUAL_PASSTHROUGH = 3 uint8 GROUP_INDEX_PAYLOAD = 6 uint64 timestamp_sample # the timestamp the data this control response is based on was sampled -float32[8] control +float32[9] control # TOPICS actuator_controls actuator_controls_0 actuator_controls_1 actuator_controls_2 actuator_controls_3 # TOPICS actuator_controls_virtual_fw actuator_controls_virtual_mc diff --git a/msg/vehicle_attitude_setpoint.msg b/msg/vehicle_attitude_setpoint.msg index 065fa12314..aeb0f2aedd 100644 --- a/msg/vehicle_attitude_setpoint.msg +++ b/msg/vehicle_attitude_setpoint.msg @@ -24,4 +24,9 @@ uint8 FLAPS_OFF = 0 # no flaps uint8 FLAPS_LAND = 1 # landing config flaps uint8 FLAPS_TAKEOFF = 2 # take-off config flaps +uint8 apply_spoilers # spoiler config specifier +uint8 SPOILERS_OFF = 0 # no spoilers +uint8 SPOILERS_LAND = 1 # landing config spoiler +uint8 SPOILERS_DESCEND = 2 # descend config spoiler + # TOPICS vehicle_attitude_setpoint mc_virtual_attitude_setpoint fw_virtual_attitude_setpoint diff --git a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.cpp b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.cpp index c92ccedaf6..df9fa7162b 100644 --- a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.cpp +++ b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.cpp @@ -109,7 +109,7 @@ void ActuatorEffectivenessTiltrotorVTOL::updateSetpoint(const matrix::Vectorelevons_mc_lock && _vtol_schedule.flight_mode == vtol_mode::MC_MODE) { fw_out[actuator_controls_s::INDEX_ROLL] = 0;