From 084609e41d983b2c09de8fb2d328b5aa3f6e3ede Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Mon, 24 Jun 2019 11:40:02 -0400 Subject: [PATCH] Revert "VTOL: add parameter to prevent flight if roll direction was not checked" This reverts commit 5f06c6a1aa1f29f37f373c679a1a02c07412f811. --- .../init.d-posix/1040_standard_vtol | 3 -- .../init.d-posix/1041_tailsitter | 3 -- .../px4fmu_common/init.d-posix/1042_tiltrotor | 3 -- .../init.d/airframes/1002_standard_vtol.hil | 3 -- .../airframes/13000_generic_vtol_standard | 3 -- .../init.d/airframes/13001_caipirinha_vtol | 3 -- .../init.d/airframes/13002_firefly6 | 3 -- .../init.d/airframes/13003_quad_tailsitter | 3 -- .../init.d/airframes/13004_quad+_tailsitter | 3 -- .../init.d/airframes/13005_vtol_AAERT_quad | 3 -- .../airframes/13006_vtol_standard_delta | 3 -- .../init.d/airframes/13007_vtol_AAVVT_quad | 3 -- .../init.d/airframes/13008_QuadRanger | 3 -- .../init.d/airframes/13009_vtol_spt_ranger | 2 - .../init.d/airframes/13010_claire | 3 -- .../init.d/airframes/13012_convergence | 3 -- .../init.d/airframes/13013_deltaquad | 2 - .../init.d/airframes/13014_vtol_babyshark | 2 - .../init.d/airframes/13050_generic_vtol_octo | 3 -- .../vtol_att_control_main.cpp | 39 +------------------ .../vtol_att_control/vtol_att_control_main.h | 1 - .../vtol_att_control_params.c | 24 ------------ src/modules/vtol_att_control/vtol_type.h | 1 - 23 files changed, 1 insertion(+), 118 deletions(-) diff --git a/ROMFS/px4fmu_common/init.d-posix/1040_standard_vtol b/ROMFS/px4fmu_common/init.d-posix/1040_standard_vtol index a9a451381e66..24a5eff04e25 100644 --- a/ROMFS/px4fmu_common/init.d-posix/1040_standard_vtol +++ b/ROMFS/px4fmu_common/init.d-posix/1040_standard_vtol @@ -39,9 +39,6 @@ then param set VT_TYPE 2 param set WEST_EN 1 - - # Indicate that FW roll direction was fixed in mixer, to be removed in v1.10 - param set V19_VT_ROLLDIR 0 fi set MAV_TYPE 22 diff --git a/ROMFS/px4fmu_common/init.d-posix/1041_tailsitter b/ROMFS/px4fmu_common/init.d-posix/1041_tailsitter index fd4362c4604a..dbcccec7035f 100644 --- a/ROMFS/px4fmu_common/init.d-posix/1041_tailsitter +++ b/ROMFS/px4fmu_common/init.d-posix/1041_tailsitter @@ -39,9 +39,6 @@ then param set VT_TYPE 0 param set WEST_EN 1 - - # Indicate that FW roll direction was fixed in mixer, to be removed in v1.10 - param set V19_VT_ROLLDIR 0 fi set MAV_TYPE 20 diff --git a/ROMFS/px4fmu_common/init.d-posix/1042_tiltrotor b/ROMFS/px4fmu_common/init.d-posix/1042_tiltrotor index d0b5d3587950..2dc2c7271b82 100644 --- a/ROMFS/px4fmu_common/init.d-posix/1042_tiltrotor +++ b/ROMFS/px4fmu_common/init.d-posix/1042_tiltrotor @@ -42,9 +42,6 @@ then param set VT_TYPE 1 param set WEST_EN 1 - - # Indicate that FW roll direction was fixed in mixer, to be removed in v1.10 - param set V19_VT_ROLLDIR 0 fi set MAV_TYPE 21 diff --git a/ROMFS/px4fmu_common/init.d/airframes/1002_standard_vtol.hil b/ROMFS/px4fmu_common/init.d/airframes/1002_standard_vtol.hil index 745f0519f907..91b8fecd65a0 100644 --- a/ROMFS/px4fmu_common/init.d/airframes/1002_standard_vtol.hil +++ b/ROMFS/px4fmu_common/init.d/airframes/1002_standard_vtol.hil @@ -61,9 +61,6 @@ then param set VT_F_TRANS_THR 0.75 param set VT_MOT_COUNT 4 param set VT_TYPE 2 - - # Indicate that FW roll direction was fixed in mixer, to be removed in v1.10 - param set V19_VT_ROLLDIR 0 fi param set SYS_HITL 1 diff --git a/ROMFS/px4fmu_common/init.d/airframes/13000_generic_vtol_standard b/ROMFS/px4fmu_common/init.d/airframes/13000_generic_vtol_standard index 18284ad9333a..52e1f5d7400b 100644 --- a/ROMFS/px4fmu_common/init.d/airframes/13000_generic_vtol_standard +++ b/ROMFS/px4fmu_common/init.d/airframes/13000_generic_vtol_standard @@ -27,9 +27,6 @@ then param set VT_TYPE 2 param set VT_MOT_COUNT 4 - - # Indicate that FW roll direction was fixed in mixer, to be removed in v1.10 - param set V19_VT_ROLLDIR 0 fi set MAV_TYPE 22 diff --git a/ROMFS/px4fmu_common/init.d/airframes/13001_caipirinha_vtol b/ROMFS/px4fmu_common/init.d/airframes/13001_caipirinha_vtol index 416062ffcc6a..ec63ac215119 100644 --- a/ROMFS/px4fmu_common/init.d/airframes/13001_caipirinha_vtol +++ b/ROMFS/px4fmu_common/init.d/airframes/13001_caipirinha_vtol @@ -37,9 +37,6 @@ then param set VT_ELEV_MC_LOCK 0 param set VT_MOT_COUNT 2 param set VT_TYPE 0 - - # Indicate that FW roll direction was fixed in mixer, to be removed in v1.10 - param set V19_VT_ROLLDIR 0 fi set MAV_TYPE 19 diff --git a/ROMFS/px4fmu_common/init.d/airframes/13002_firefly6 b/ROMFS/px4fmu_common/init.d/airframes/13002_firefly6 index 0a4e4fbd0583..7f2acf3156cf 100644 --- a/ROMFS/px4fmu_common/init.d/airframes/13002_firefly6 +++ b/ROMFS/px4fmu_common/init.d/airframes/13002_firefly6 @@ -48,9 +48,6 @@ then param set VT_TILT_FW 0.9 param set VT_ELEV_MC_LOCK 0 param set VT_TYPE 1 - - # Indicate that FW roll direction was fixed in mixer, to be removed in v1.10 - param set V19_VT_ROLLDIR 0 fi set MAV_TYPE 21 diff --git a/ROMFS/px4fmu_common/init.d/airframes/13003_quad_tailsitter b/ROMFS/px4fmu_common/init.d/airframes/13003_quad_tailsitter index 5c3499c436bb..dd91d353b53e 100644 --- a/ROMFS/px4fmu_common/init.d/airframes/13003_quad_tailsitter +++ b/ROMFS/px4fmu_common/init.d/airframes/13003_quad_tailsitter @@ -19,9 +19,6 @@ then param set VT_IDLE_PWM_MC 1080 param set VT_TYPE 0 param set VT_ELEV_MC_LOCK 1 - - # Indicate that FW roll direction was fixed in mixer, to be removed in v1.10 - param set V19_VT_ROLLDIR 0 fi set MAV_TYPE 20 diff --git a/ROMFS/px4fmu_common/init.d/airframes/13004_quad+_tailsitter b/ROMFS/px4fmu_common/init.d/airframes/13004_quad+_tailsitter index 551622f43471..3f3bab06b774 100644 --- a/ROMFS/px4fmu_common/init.d/airframes/13004_quad+_tailsitter +++ b/ROMFS/px4fmu_common/init.d/airframes/13004_quad+_tailsitter @@ -30,9 +30,6 @@ then param set VT_IDLE_PWM_MC 1080 param set VT_TYPE 0 param set VT_ELEV_MC_LOCK 1 - - # Indicate that FW roll direction was fixed in mixer, to be removed in v1.10 - param set V19_VT_ROLLDIR 0 fi set MAV_TYPE 20 diff --git a/ROMFS/px4fmu_common/init.d/airframes/13005_vtol_AAERT_quad b/ROMFS/px4fmu_common/init.d/airframes/13005_vtol_AAERT_quad index 0d4c2b5984f4..ca4288b76d04 100644 --- a/ROMFS/px4fmu_common/init.d/airframes/13005_vtol_AAERT_quad +++ b/ROMFS/px4fmu_common/init.d/airframes/13005_vtol_AAERT_quad @@ -61,9 +61,6 @@ then param set VT_MOT_COUNT 4 param set VT_IDLE_PWM_MC 1080 param set VT_TYPE 2 - - # Indicate that FW roll direction was fixed in mixer, to be removed in v1.10 - param set V19_VT_ROLLDIR 0 fi set MAV_TYPE 22 diff --git a/ROMFS/px4fmu_common/init.d/airframes/13006_vtol_standard_delta b/ROMFS/px4fmu_common/init.d/airframes/13006_vtol_standard_delta index cd9329f35d85..209290557d8e 100644 --- a/ROMFS/px4fmu_common/init.d/airframes/13006_vtol_standard_delta +++ b/ROMFS/px4fmu_common/init.d/airframes/13006_vtol_standard_delta @@ -49,9 +49,6 @@ then param set VT_F_TRANS_THR 0.75 param set VT_IDLE_PWM_MC 1080 param set VT_TYPE 2 - - # Indicate that FW roll direction was fixed in mixer, to be removed in v1.10 - param set V19_VT_ROLLDIR 0 fi set MAV_TYPE 22 diff --git a/ROMFS/px4fmu_common/init.d/airframes/13007_vtol_AAVVT_quad b/ROMFS/px4fmu_common/init.d/airframes/13007_vtol_AAVVT_quad index d63467ab2771..647d6aeb5708 100644 --- a/ROMFS/px4fmu_common/init.d/airframes/13007_vtol_AAVVT_quad +++ b/ROMFS/px4fmu_common/init.d/airframes/13007_vtol_AAVVT_quad @@ -38,9 +38,6 @@ then param set VT_MOT_COUNT 4 param set VT_IDLE_PWM_MC 1080 param set VT_TYPE 2 - - # Indicate that FW roll direction was fixed in mixer, to be removed in v1.10 - param set V19_VT_ROLLDIR 0 fi set MAV_TYPE 22 diff --git a/ROMFS/px4fmu_common/init.d/airframes/13008_QuadRanger b/ROMFS/px4fmu_common/init.d/airframes/13008_QuadRanger index 61f9ab46784f..4a8b0c93b9cc 100644 --- a/ROMFS/px4fmu_common/init.d/airframes/13008_QuadRanger +++ b/ROMFS/px4fmu_common/init.d/airframes/13008_QuadRanger @@ -55,9 +55,6 @@ then param set VT_IDLE_PWM_MC 1080 param set VT_MOT_COUNT 4 param set VT_TYPE 2 - - # Indicate that FW roll direction was fixed in mixer, to be removed in v1.10 - param set V19_VT_ROLLDIR 0 fi set MAV_TYPE 22 diff --git a/ROMFS/px4fmu_common/init.d/airframes/13009_vtol_spt_ranger b/ROMFS/px4fmu_common/init.d/airframes/13009_vtol_spt_ranger index 376837da5c0b..5d3ebcf5bfcf 100644 --- a/ROMFS/px4fmu_common/init.d/airframes/13009_vtol_spt_ranger +++ b/ROMFS/px4fmu_common/init.d/airframes/13009_vtol_spt_ranger @@ -77,8 +77,6 @@ then param set VT_TRANS_TIMEOUT 30 param set VT_TYPE 2 - # Indicate that FW roll direction was fixed in mixer, to be removed in v1.10 - param set V19_VT_ROLLDIR 0 fi set MAV_TYPE 22 diff --git a/ROMFS/px4fmu_common/init.d/airframes/13010_claire b/ROMFS/px4fmu_common/init.d/airframes/13010_claire index 1a060ea80ee0..022bf5885334 100644 --- a/ROMFS/px4fmu_common/init.d/airframes/13010_claire +++ b/ROMFS/px4fmu_common/init.d/airframes/13010_claire @@ -30,9 +30,6 @@ then param set VT_TILT_TRANS 0.5 param set VT_ELEV_MC_LOCK 0 param set VT_TYPE 1 - - # Indicate that FW roll direction was fixed in mixer, to be removed in v1.10 - param set V19_VT_ROLLDIR 0 fi set MAV_TYPE 21 diff --git a/ROMFS/px4fmu_common/init.d/airframes/13012_convergence b/ROMFS/px4fmu_common/init.d/airframes/13012_convergence index b7eea14a6349..d7410eda0da7 100644 --- a/ROMFS/px4fmu_common/init.d/airframes/13012_convergence +++ b/ROMFS/px4fmu_common/init.d/airframes/13012_convergence @@ -77,9 +77,6 @@ then param set VT_TRANS_P2_DUR 1.3 param set VT_ELEV_MC_LOCK 0 param set VT_TYPE 1 - - # Indicate that FW roll direction was fixed in mixer, to be removed in v1.10 - param set V19_VT_ROLLDIR 0 fi set MAV_TYPE 21 diff --git a/ROMFS/px4fmu_common/init.d/airframes/13013_deltaquad b/ROMFS/px4fmu_common/init.d/airframes/13013_deltaquad index e391bdc693e0..3671d55eaa8d 100644 --- a/ROMFS/px4fmu_common/init.d/airframes/13013_deltaquad +++ b/ROMFS/px4fmu_common/init.d/airframes/13013_deltaquad @@ -151,8 +151,6 @@ then param set VT_TRANS_TIMEOUT 22 param set VT_F_TRANS_RAMP 4 - # Indicate that FW roll direction was fixed in mixer, to be removed in v1.10 - param set V19_VT_ROLLDIR 0 fi set MAV_TYPE 22 diff --git a/ROMFS/px4fmu_common/init.d/airframes/13014_vtol_babyshark b/ROMFS/px4fmu_common/init.d/airframes/13014_vtol_babyshark index 68e07b068927..5cb1b4abb277 100644 --- a/ROMFS/px4fmu_common/init.d/airframes/13014_vtol_babyshark +++ b/ROMFS/px4fmu_common/init.d/airframes/13014_vtol_babyshark @@ -58,8 +58,6 @@ then param set PWM_MAIN_MIN3 1120 param set PWM_MIN 950 - param set V19_VT_ROLLDIR 0 - param set VT_ARSP_TRANS 19 param set VT_B_TRANS_DUR 9 param set VT_ELEV_MC_LOCK 0 diff --git a/ROMFS/px4fmu_common/init.d/airframes/13050_generic_vtol_octo b/ROMFS/px4fmu_common/init.d/airframes/13050_generic_vtol_octo index 07a43c2f1d31..7da4a205c84f 100644 --- a/ROMFS/px4fmu_common/init.d/airframes/13050_generic_vtol_octo +++ b/ROMFS/px4fmu_common/init.d/airframes/13050_generic_vtol_octo @@ -31,9 +31,6 @@ then param set VT_TYPE 2 param set VT_MOT_COUNT 8 - - # Indicate that FW roll direction was fixed in mixer, to be removed in v1.10 - param set V19_VT_ROLLDIR 0 fi set MAV_TYPE 22 diff --git a/src/modules/vtol_att_control/vtol_att_control_main.cpp b/src/modules/vtol_att_control/vtol_att_control_main.cpp index 618b6ebb535c..80810b2e0cfb 100644 --- a/src/modules/vtol_att_control/vtol_att_control_main.cpp +++ b/src/modules/vtol_att_control/vtol_att_control_main.cpp @@ -92,8 +92,6 @@ VtolAttitudeControl::VtolAttitudeControl() _params_handles.diff_thrust = param_find("VT_FW_DIFTHR_EN"); _params_handles.diff_thrust_scale = param_find("VT_FW_DIFTHR_SC"); - _params_handles.v19_vt_rolldir = param_find("V19_VT_ROLLDIR"); - /* fetch initial parameter values */ parameters_update(); @@ -339,9 +337,6 @@ VtolAttitudeControl::parameters_update() // make sure parameters are feasible, require at least 1 m/s difference between transition and blend airspeed _params.airspeed_blend = math::min(_params.airspeed_blend, _params.transition_airspeed - 1.0f); - // Bugfix for v1.9, should be removed in 1.10 - param_get(_params_handles.v19_vt_rolldir, &_params.v19_vt_rolldir); - // update the parameters of the instances of base VtolType if (_vtol_type != nullptr) { _vtol_type->parameters_update(); @@ -481,39 +476,7 @@ void VtolAttitudeControl::task_main() _vtol_type->update_transition_state(); } - // Fill actuator output - if (_params.v19_vt_rolldir) { - - // The mixer may not have been adapted to the roll inversion in v1.9 - // Display error message and do not fill actuator outputs - // TODO: remove the parameter and this error message in v1.10 - const int v19_rolldir_warning_throttling = 5000; - static int v19_rolldir_warning_counter = 0; - v19_rolldir_warning_counter += 1; - - if ((v19_rolldir_warning_counter % v19_rolldir_warning_throttling) == 0) { - mavlink_log_critical(&_mavlink_log_pub, - "The VTOL roll commands were inverted in v1.9!"); - mavlink_log_critical(&_mavlink_log_pub, - "Check roll mixing, then set V19_VT_ROLLDIR to 0"); - } - - // Do not fill actuator output - _actuators_out_0.timestamp = hrt_absolute_time(); - _actuators_out_0.timestamp_sample = _actuators_mc_in.timestamp_sample; - _actuators_out_1.timestamp = hrt_absolute_time(); - _actuators_out_1.timestamp_sample = _actuators_fw_in.timestamp_sample; - - for (size_t i = 0; i < actuator_controls_s::NUM_ACTUATOR_CONTROLS; i++) { - _actuators_out_0.control[i] = 0.0f; - _actuators_out_1.control[i] = 0.0f; - } - - } else { - - // normal operation - _vtol_type->fill_actuator_outputs(); - } + _vtol_type->fill_actuator_outputs(); // reinitialize the setpoint while not armed to make sure no value from the last mode or flight is still kept if (!_v_control_mode.flag_armed) { diff --git a/src/modules/vtol_att_control/vtol_att_control_main.h b/src/modules/vtol_att_control/vtol_att_control_main.h index f7ee0b47b00c..9fa425e3eadd 100644 --- a/src/modules/vtol_att_control/vtol_att_control_main.h +++ b/src/modules/vtol_att_control/vtol_att_control_main.h @@ -197,7 +197,6 @@ class VtolAttitudeControl param_t fw_motors_off; param_t diff_thrust; param_t diff_thrust_scale; - param_t v19_vt_rolldir; } _params_handles{}; /* for multicopters it is usual to have a non-zero idle speed of the engines diff --git a/src/modules/vtol_att_control/vtol_att_control_params.c b/src/modules/vtol_att_control/vtol_att_control_params.c index 2b870e212151..c6684f5977da 100644 --- a/src/modules/vtol_att_control/vtol_att_control_params.c +++ b/src/modules/vtol_att_control/vtol_att_control_params.c @@ -315,27 +315,3 @@ PARAM_DEFINE_INT32(VT_FW_DIFTHR_EN, 0); * @group VTOL Attitude Control */ PARAM_DEFINE_FLOAT(VT_FW_DIFTHR_SC, 0.1f); - -/** - * Temporary parameter for the upgrade to v1.9, this is reminder to check the direction of - * fixed-wing roll control surfaces on custom VTOLs platforms. - * - * This parameter is present in v1.9 to enable smooth transition, it will be removed in v1.10. - * - * In firmware versions before v1.9, the VTOL attitude controller generated reversed fixed - * wing roll commands. As a consequence, all VTOL mixers had to reverse roll mixing. The - * VTOL roll commands in fixed wing mode were fixed in v1.9! - * - Standard VTOL platforms should be unaffected and this parameter can be ignored. - * - Custom VTOL platforms may crash if no action is taken, please check the direction of - * deflection of roll control surfaces before flight. Fix the roll mixer if necessary. - * - * Set to 1 to disable VTOL actuator outputs and display an info message (default). - * Set to 0 AFTER CAREFULLY CHECKING the direction of deflection of roll control surfaces. - * - * @min 0 - * @max 1 - * @decimal 0 - * @category system - * @group VTOL Attitude Control - */ -PARAM_DEFINE_INT32(V19_VT_ROLLDIR, 1); diff --git a/src/modules/vtol_att_control/vtol_type.h b/src/modules/vtol_att_control/vtol_type.h index bcae0faf7d82..ee4a62dcc42b 100644 --- a/src/modules/vtol_att_control/vtol_type.h +++ b/src/modules/vtol_att_control/vtol_type.h @@ -70,7 +70,6 @@ struct Params { int32_t fw_motors_off; /**< bitmask of all motors that should be off in fixed wing mode */ int32_t diff_thrust; float diff_thrust_scale; - int32_t v19_vt_rolldir; }; // Has to match 1:1 msg/vtol_vehicle_status.msg