diff --git a/js/defaults_dialog.js b/js/defaults_dialog.js index 64009317..bcbdd8ad 100644 --- a/js/defaults_dialog.js +++ b/js/defaults_dialog.js @@ -43,46 +43,60 @@ helper.defaultsDialog = (function (data) { privateScope.wizard(selectedDefaultPreset, wizardStep + 1); }; - privateScope.wizard = function (selectedDefaultPreset, wizardStep) { + privateScope.handleTabLoadReceiver = function ($content) { + console.log('ready to handle receiver'); - const steps = selectedDefaultPreset.wizardPages; - const stepsCount = selectedDefaultPreset.wizardPages.length; - const stepName = steps[wizardStep]; - - console.log(steps[wizardStep], wizardStep, stepsCount); - if (wizardStep >= stepsCount - 1) { - //This is the last step, time to finalize - $container.hide(); - privateScope.saveAndReboot(); - } else { - const $content = $container.find('.defaults-dialog__wizard'); + }, - $.get("./wizard/" + stepName + ".html", function(data) { - $content.html(data); - }); + privateScope.wizard = function (selectedDefaultPreset, wizardStep) { - $.get("./wizard/buttons.html", function(data) { - $(data).appendTo($content); - }); + const steps = selectedDefaultPreset.wizardPages; + const stepsCount = selectedDefaultPreset.wizardPages.length; + const stepName = steps[wizardStep]; - $container.on('click', '#wizard-next', function () { - privateScope.saveWizardStep(selectedDefaultPreset, wizardStep); - }); + console.log(steps[wizardStep], wizardStep, stepsCount); - $container.on('click', '#wizard-skip', function () { - privateScope.wizard(selectedDefaultPreset, wizardStep + 1); - }); + if (wizardStep >= stepsCount - 1) { + //This is the last step, time to finalize + $container.hide(); + privateScope.saveAndReboot(); + } else { + const $content = $container.find('.defaults-dialog__wizard'); - $container.find('.defaults-dialog__content').hide(); - $container.find('.defaults-dialog__wizard').show(); - - savingDefaultsModal.close(); - $container.show(); + $.get("./wizard/" + stepName + ".html", function (data) { + $(data).appendTo($content); - } + $.get("./wizard/buttons.html", function (data) { + $(data).appendTo($content); - }; + $container.on('click', '#wizard-next', function () { + privateScope.saveWizardStep(selectedDefaultPreset, wizardStep); + }); + + $container.on('click', '#wizard-skip', function () { + privateScope.wizard(selectedDefaultPreset, wizardStep + 1); + }); + + if (stepName == "receiver") { + privateScope.handleTabLoadReceiver($container); + } + + Settings.configureInputs().then( + function () { + console.log('configure done'); + $container.find('.defaults-dialog__content').hide(); + $container.find('.defaults-dialog__wizard').show(); + + savingDefaultsModal.close(); + $container.show(); + } + ); + }); + }); + } + + }; privateScope.saveAndReboot = function () { GUI.tab_switch_cleanup(function () { @@ -166,14 +180,14 @@ helper.defaultsDialog = (function (data) { if (selectedDefaultPreset.id == 0) { // Close applying preset dialog if keeping current settings. - savingDefaultsModal.close(); + savingDefaultsModal.close(); } mspHelper.loadFeatures(function () { privateScope.setFeaturesBits(selectedDefaultPreset) }); } else { - savingDefaultsModal.close(); + savingDefaultsModal.close(); } }; diff --git a/js/defaults_dialog_entries.js b/js/defaults_dialog_entries.js index 78ae7ce4..8269c79d 100644 --- a/js/defaults_dialog_entries.js +++ b/js/defaults_dialog_entries.js @@ -1,674 +1,708 @@ var helper = helper || {}; -helper.defaultsDialogData = [{ - "title": 'Mini Quad with 3"-7" propellers', - "id": 2, - "notRecommended": false, - "reboot": true, - "mixerToApply": 3, - "wizardPages": ['receiver', 'outputs', 'gps', 'filters', 'pids'], - "settings": [ - { - key: "model_preview_type", - value: 3 - }, - /* - System - */ - { - key: "gyro_hardware_lpf", - value: "256HZ" - }, - { - key: "looptime", - value: 500 - }, - { - key: "motor_pwm_protocol", - value: "DSHOT300" - }, - /* - Filtering - */ - { - key: "gyro_main_lpf_hz", - value: 110 - }, - { - key: "gyro_main_lpf_type", - value: "PT1" - }, - { - key: "dterm_lpf_hz", - value: 110 - }, - { - key: "dterm_lpf_type", - value: "PT3" - }, - { - key: "dterm_lpf2_hz", - value: 0 - }, - { - key: "dterm_lpf2_type", - value: "PT1" - }, - { - key: "dynamic_gyro_notch_enabled", - value: "ON" - }, - { - key: "dynamic_gyro_notch_q", - value: 250 - }, - { - key: "dynamic_gyro_notch_min_hz", - value: 120 - }, - { - key: "setpoint_kalman_enabled", - value: "ON" - }, - { - key: "setpoint_kalman_q", - value: 200 - }, - { - key: "smith_predictor_delay", // Enable Smith Predictor - value: 1.5 - }, - /* - Mechanics - */ - { - key: "airmode_type", - value: "THROTTLE_THRESHOLD" - }, - { - key: "airmode_throttle_threshold", - value: 1150 - }, - { - key: "mc_iterm_relax", - value: "RP" - }, - { - key: "d_boost_min", - value: 0.8 - }, - { - key: "d_boost_max", - value: 1.2 - }, - { - key: "antigravity_gain", - value: 2 - }, - { - key: "antigravity_accelerator", - value: 5 - }, - /* - Rates - */ - { - key: "rc_yaw_expo", - value: 75 - }, - { - key: "rc_expo", - value: 75 - }, - { - key: "roll_rate", - value: 70 - }, - { - key: "pitch_rate", - value: 70 - }, - { - key: "yaw_rate", - value: 60 - }, - /* - PIDs - */ - { - key: "mc_p_pitch", - value: 44 - }, - { - key: "mc_i_pitch", - value: 75 - }, - { - key: "mc_d_pitch", - value: 25 - }, - { - key: "mc_p_roll", - value: 40 - }, - { - key: "mc_i_roll", - value: 60 - }, - { - key: "mc_d_roll", - value: 23 - }, - { - key: "mc_p_yaw", - value: 35 - }, - { - key: "mc_i_yaw", - value: 80 - }, - /* - * TPA - */ - { - key: "tpa_rate", - value: 20 - }, - { - key: "tpa_breakpoint", - value: 1200 - }, - { - key: "platform_type", - value: "MULTIROTOR" - }, - { - key: "applied_defaults", - value: 2 - }, - { - key: "failsafe_procedure", - value: "DROP" - } - ] -}, -{ - "title": 'Airplane with a Tail', - "notRecommended": false, - "id": 3, - "reboot": true, - "mixerToApply": 14, - "settings": [ - { - key: "model_preview_type", - value: 14 - }, - { - key: "platform_type", - value: "AIRPLANE" - }, - { - key: "applied_defaults", - value: 3 - }, - { - key: "gyro_hardware_lpf", - value: "256HZ" - }, - { - key: "gyro_main_lpf_hz", - value: 25 - }, - { - key: "dterm_lpf_hz", - value: 10 - }, - { - key: "d_boost_min", - value: 1 - }, - { - key: "d_boost_max", - value: 1 - }, - { - key: "gyro_main_lpf_type", - value: "BIQUAD" - }, - { - key: "dynamic_gyro_notch_enabled", - value: "ON" - }, - { - key: "dynamic_gyro_notch_q", - value: 250 - }, - { - key: "dynamic_gyro_notch_min_hz", - value: 30 - }, - { - key: "motor_pwm_protocol", - value: "STANDARD" - }, - { - key: "throttle_idle", - value: 5.0 - }, - { - key: "rc_yaw_expo", - value: 30 - }, - { - key: "rc_expo", - value: 30 - }, - { - key: "roll_rate", - value: 18 - }, - { - key: "pitch_rate", - value: 9 - }, - { - key: "yaw_rate", - value: 3 - }, - { - key: "nav_fw_pos_z_p", - value: 15 - }, - { - key: "nav_fw_pos_z_d", - value: 5 - }, - { - key: "nav_fw_pos_xy_p", - value: 60 - }, - { - key: "fw_turn_assist_pitch_gain", - value: 0.5 - }, - { - key: "max_angle_inclination_rll", - value: 450 - }, - { - key: "nav_fw_bank_angle", - value: 35 - }, - { - key: "fw_p_pitch", - value: 15 - }, - { - key: "fw_i_pitch", - value: 5 - }, - { - key: "fw_d_pitch", - value: 5 - }, - { - key: "fw_ff_pitch", - value: 80 - }, - { - key: "fw_p_roll", - value: 15 - }, - { - key: "fw_i_roll", - value: 3 - }, - { - key: "fw_d_roll", - value: 7 - }, - { - key: "fw_ff_roll", - value: 50 - }, - { - key: "fw_p_yaw", - value: 20 - }, - { - key: "fw_i_yaw", - value: 0 - }, - { - key: "fw_d_yaw", - value: 0 - }, - { - key: "fw_ff_yaw", - value: 100 - }, - { - key: "imu_acc_ignore_rate", - value: 9 - }, - { - key: "imu_acc_ignore_slope", - value: 5 - }, - { - key: "airmode_type", - value: "STICK_CENTER_ONCE" - }, - { - key: "small_angle", - value: 180 - }, - { - key: "nav_fw_control_smoothness", - value: 2 - }, - { - key: "nav_rth_allow_landing", - value: "FS_ONLY" - }, - { - key: "nav_rth_altitude", - value: 5000 - }, - { - key: "failsafe_mission", - value: "ON" - }, - { - key: "nav_wp_radius", - value: 5000 - }, - ], - "features": [ - { - bit: 4, // Enable MOTOR_STOP - state: true - } - ] -}, -{ - "title": 'Airplane without a Tail (Wing, Delta, etc)', - "notRecommended": false, - "id": 3, - "reboot": true, - "mixerToApply": 8, - "settings": [ - { - key: "model_preview_type", - value: 8 - }, - { - key: "platform_type", - value: "AIRPLANE" - }, - { - key: "applied_defaults", - value: 3 - }, - { - key: "gyro_hardware_lpf", - value: "256HZ" - }, - { - key: "gyro_main_lpf_hz", - value: 25 - }, - { - key: "dterm_lpf_hz", - value: 10 - }, - { - key: "d_boost_min", - value: 1 - }, - { - key: "d_boost_max", - value: 1 - }, - { - key: "gyro_main_lpf_type", - value: "BIQUAD" - }, - { - key: "dynamic_gyro_notch_enabled", - value: "ON" - }, - { - key: "dynamic_gyro_notch_q", - value: 250 - }, - { - key: "dynamic_gyro_notch_min_hz", - value: 30 - }, - { - key: "motor_pwm_protocol", - value: "STANDARD" - }, - { - key: "throttle_idle", - value: 5.0 - }, - { - key: "rc_yaw_expo", - value: 30 - }, - { - key: "rc_expo", - value: 30 - }, - { - key: "roll_rate", - value: 18 - }, - { - key: "pitch_rate", - value: 9 - }, - { - key: "yaw_rate", - value: 3 - }, - { - key: "nav_fw_pos_z_p", - value: 15 - }, - { - key: "nav_fw_pos_z_d", - value: 5 - }, - { - key: "nav_fw_pos_xy_p", - value: 60 - }, - { - key: "fw_turn_assist_pitch_gain", - value: 0.2 - }, - { - key: "max_angle_inclination_rll", - value: 550 - }, - { - key: "nav_fw_bank_angle", - value: 45 - }, - { - key: "fw_p_pitch", - value: 15 - }, - { - key: "fw_i_pitch", - value: 5 - }, - { - key: "fw_d_pitch", - value: 5 - }, - { - key: "fw_ff_pitch", - value: 70 - }, - { - key: "fw_p_roll", - value: 15 - }, - { - key: "fw_i_roll", - value: 3 - }, - { - key: "fw_d_roll", - value: 7 - }, - { - key: "fw_ff_roll", - value: 50 - }, - { - key: "fw_p_yaw", - value: 20 - }, - { - key: "fw_i_yaw", - value: 0 - }, - { - key: "fw_d_yaw", - value: 0 - }, - { - key: "fw_ff_yaw", - value: 100 - }, - { - key: "imu_acc_ignore_rate", - value: 9 - }, - { - key: "imu_acc_ignore_slope", - value: 5 - }, - { - key: "airmode_type", - value: "STICK_CENTER_ONCE" - }, - { - key: "small_angle", - value: 180 - }, - { - key: "nav_fw_control_smoothness", - value: 2 - }, - { - key: "nav_rth_allow_landing", - value: "FS_ONLY" - }, - { - key: "nav_rth_altitude", - value: 5000 - }, - { - key: "failsafe_mission", - value: "ON" - }, - { - key: "nav_wp_radius", - value: 5000 - }, - ], - "features": [ - { - bit: 4, // Enable MOTOR_STOP - state: true - } - ] -}, -{ - "title": 'Rovers & Boats', - "id": 1, - "notRecommended": false, - "reboot": true, - "mixerToApply": 31, - "settings": [ - { - key: "model_preview_type", - value: 31 - }, - { - key: "gyro_hardware_lpf", - value: "256HZ" - }, - { - key: "gyro_main_lpf_hz", - value: 10 - }, - { - key: "gyro_main_lpf_type", - value: "BIQUAD" - }, - { - key: "motor_pwm_protocol", - value: "STANDARD" - }, - { - key: "applied_defaults", - value: 1 - }, - { - key: "failsafe_procedure", - value: "DROP" - }, - { - key: "platform_type", - value: "ROVER" - }, - { - key: "nav_wp_safe_distance", - value: 50000 - }, - { - key: "nav_fw_loiter_radius", - value: 100 - }, - { - key: "nav_fw_yaw_deadband", - value: 5 - }, - { - key: "pidsum_limit_yaw", - value: 500 - }, - { - key: "nav_fw_pos_hdg_p", - value: 60 - }, - { - key: "nav_fw_pos_hdg_i", - value: 2 - }, - { - key: "nav_fw_pos_hdg_d", - value: 0 - } - ] -}, -{ - "title": 'Keep current settings (Not recommended)', - "id": 0, - "notRecommended": true, - "reboot": false, - "settings": [ - { - key: "applied_defaults", - value: 1 - } - ] +helper.defaultsDialogReceivers = { + 0: "SPEK1024", + 1: "SPEK2048", + 2: "SBUS", + 3: "SUMD", + 4: "SUMH", + 5: "XB-B", + 6: "XB-B-RJ01", + 7: "IBUS", + 8: "JETIEXBUS", + 9: "CRSF", + 10: "FPORT", + 11: "SBUS_FAST", + 12: "FPORT2", + 13: "SRXL2", + 14: "GHST", + 15: "MAVLINK" } + +helper.defaultsDialogData = [ + { + "title": 'Test', + "id": 17, + "notRecommended": false, + "reboot": true, + "mixerToApply": 3, + "wizardPages": ['receiver', 'outputs', 'gps', 'filters', 'pids'], + "settings": [ + { + key: "model_preview_type", + value: 3 + } + ] + }, + { + "title": 'Mini Quad with 3"-7" propellers', + "id": 2, + "notRecommended": false, + "reboot": true, + "mixerToApply": 3, + "wizardPages": ['receiver', 'outputs', 'gps', 'filters', 'pids'], + "settings": [ + { + key: "model_preview_type", + value: 3 + }, + /* + System + */ + { + key: "gyro_hardware_lpf", + value: "256HZ" + }, + { + key: "looptime", + value: 500 + }, + { + key: "motor_pwm_protocol", + value: "DSHOT300" + }, + /* + Filtering + */ + { + key: "gyro_main_lpf_hz", + value: 110 + }, + { + key: "gyro_main_lpf_type", + value: "PT1" + }, + { + key: "dterm_lpf_hz", + value: 110 + }, + { + key: "dterm_lpf_type", + value: "PT3" + }, + { + key: "dterm_lpf2_hz", + value: 0 + }, + { + key: "dterm_lpf2_type", + value: "PT1" + }, + { + key: "dynamic_gyro_notch_enabled", + value: "ON" + }, + { + key: "dynamic_gyro_notch_q", + value: 250 + }, + { + key: "dynamic_gyro_notch_min_hz", + value: 120 + }, + { + key: "setpoint_kalman_enabled", + value: "ON" + }, + { + key: "setpoint_kalman_q", + value: 200 + }, + { + key: "smith_predictor_delay", // Enable Smith Predictor + value: 1.5 + }, + /* + Mechanics + */ + { + key: "airmode_type", + value: "THROTTLE_THRESHOLD" + }, + { + key: "airmode_throttle_threshold", + value: 1150 + }, + { + key: "mc_iterm_relax", + value: "RP" + }, + { + key: "d_boost_min", + value: 0.8 + }, + { + key: "d_boost_max", + value: 1.2 + }, + { + key: "antigravity_gain", + value: 2 + }, + { + key: "antigravity_accelerator", + value: 5 + }, + /* + Rates + */ + { + key: "rc_yaw_expo", + value: 75 + }, + { + key: "rc_expo", + value: 75 + }, + { + key: "roll_rate", + value: 70 + }, + { + key: "pitch_rate", + value: 70 + }, + { + key: "yaw_rate", + value: 60 + }, + /* + PIDs + */ + { + key: "mc_p_pitch", + value: 44 + }, + { + key: "mc_i_pitch", + value: 75 + }, + { + key: "mc_d_pitch", + value: 25 + }, + { + key: "mc_p_roll", + value: 40 + }, + { + key: "mc_i_roll", + value: 60 + }, + { + key: "mc_d_roll", + value: 23 + }, + { + key: "mc_p_yaw", + value: 35 + }, + { + key: "mc_i_yaw", + value: 80 + }, + /* + * TPA + */ + { + key: "tpa_rate", + value: 20 + }, + { + key: "tpa_breakpoint", + value: 1200 + }, + { + key: "platform_type", + value: "MULTIROTOR" + }, + { + key: "applied_defaults", + value: 2 + }, + { + key: "failsafe_procedure", + value: "DROP" + } + ] + }, + { + "title": 'Airplane with a Tail', + "notRecommended": false, + "id": 3, + "reboot": true, + "mixerToApply": 14, + "settings": [ + { + key: "model_preview_type", + value: 14 + }, + { + key: "platform_type", + value: "AIRPLANE" + }, + { + key: "applied_defaults", + value: 3 + }, + { + key: "gyro_hardware_lpf", + value: "256HZ" + }, + { + key: "gyro_main_lpf_hz", + value: 25 + }, + { + key: "dterm_lpf_hz", + value: 10 + }, + { + key: "d_boost_min", + value: 1 + }, + { + key: "d_boost_max", + value: 1 + }, + { + key: "gyro_main_lpf_type", + value: "BIQUAD" + }, + { + key: "dynamic_gyro_notch_enabled", + value: "ON" + }, + { + key: "dynamic_gyro_notch_q", + value: 250 + }, + { + key: "dynamic_gyro_notch_min_hz", + value: 30 + }, + { + key: "motor_pwm_protocol", + value: "STANDARD" + }, + { + key: "throttle_idle", + value: 5.0 + }, + { + key: "rc_yaw_expo", + value: 30 + }, + { + key: "rc_expo", + value: 30 + }, + { + key: "roll_rate", + value: 18 + }, + { + key: "pitch_rate", + value: 9 + }, + { + key: "yaw_rate", + value: 3 + }, + { + key: "nav_fw_pos_z_p", + value: 15 + }, + { + key: "nav_fw_pos_z_d", + value: 5 + }, + { + key: "nav_fw_pos_xy_p", + value: 60 + }, + { + key: "fw_turn_assist_pitch_gain", + value: 0.5 + }, + { + key: "max_angle_inclination_rll", + value: 450 + }, + { + key: "nav_fw_bank_angle", + value: 35 + }, + { + key: "fw_p_pitch", + value: 15 + }, + { + key: "fw_i_pitch", + value: 5 + }, + { + key: "fw_d_pitch", + value: 5 + }, + { + key: "fw_ff_pitch", + value: 80 + }, + { + key: "fw_p_roll", + value: 15 + }, + { + key: "fw_i_roll", + value: 3 + }, + { + key: "fw_d_roll", + value: 7 + }, + { + key: "fw_ff_roll", + value: 50 + }, + { + key: "fw_p_yaw", + value: 20 + }, + { + key: "fw_i_yaw", + value: 0 + }, + { + key: "fw_d_yaw", + value: 0 + }, + { + key: "fw_ff_yaw", + value: 100 + }, + { + key: "imu_acc_ignore_rate", + value: 9 + }, + { + key: "imu_acc_ignore_slope", + value: 5 + }, + { + key: "airmode_type", + value: "STICK_CENTER_ONCE" + }, + { + key: "small_angle", + value: 180 + }, + { + key: "nav_fw_control_smoothness", + value: 2 + }, + { + key: "nav_rth_allow_landing", + value: "FS_ONLY" + }, + { + key: "nav_rth_altitude", + value: 5000 + }, + { + key: "failsafe_mission", + value: "ON" + }, + { + key: "nav_wp_radius", + value: 5000 + }, + ], + "features": [ + { + bit: 4, // Enable MOTOR_STOP + state: true + } + ] + }, + { + "title": 'Airplane without a Tail (Wing, Delta, etc)', + "notRecommended": false, + "id": 3, + "reboot": true, + "mixerToApply": 8, + "settings": [ + { + key: "model_preview_type", + value: 8 + }, + { + key: "platform_type", + value: "AIRPLANE" + }, + { + key: "applied_defaults", + value: 3 + }, + { + key: "gyro_hardware_lpf", + value: "256HZ" + }, + { + key: "gyro_main_lpf_hz", + value: 25 + }, + { + key: "dterm_lpf_hz", + value: 10 + }, + { + key: "d_boost_min", + value: 1 + }, + { + key: "d_boost_max", + value: 1 + }, + { + key: "gyro_main_lpf_type", + value: "BIQUAD" + }, + { + key: "dynamic_gyro_notch_enabled", + value: "ON" + }, + { + key: "dynamic_gyro_notch_q", + value: 250 + }, + { + key: "dynamic_gyro_notch_min_hz", + value: 30 + }, + { + key: "motor_pwm_protocol", + value: "STANDARD" + }, + { + key: "throttle_idle", + value: 5.0 + }, + { + key: "rc_yaw_expo", + value: 30 + }, + { + key: "rc_expo", + value: 30 + }, + { + key: "roll_rate", + value: 18 + }, + { + key: "pitch_rate", + value: 9 + }, + { + key: "yaw_rate", + value: 3 + }, + { + key: "nav_fw_pos_z_p", + value: 15 + }, + { + key: "nav_fw_pos_z_d", + value: 5 + }, + { + key: "nav_fw_pos_xy_p", + value: 60 + }, + { + key: "fw_turn_assist_pitch_gain", + value: 0.2 + }, + { + key: "max_angle_inclination_rll", + value: 550 + }, + { + key: "nav_fw_bank_angle", + value: 45 + }, + { + key: "fw_p_pitch", + value: 15 + }, + { + key: "fw_i_pitch", + value: 5 + }, + { + key: "fw_d_pitch", + value: 5 + }, + { + key: "fw_ff_pitch", + value: 70 + }, + { + key: "fw_p_roll", + value: 15 + }, + { + key: "fw_i_roll", + value: 3 + }, + { + key: "fw_d_roll", + value: 7 + }, + { + key: "fw_ff_roll", + value: 50 + }, + { + key: "fw_p_yaw", + value: 20 + }, + { + key: "fw_i_yaw", + value: 0 + }, + { + key: "fw_d_yaw", + value: 0 + }, + { + key: "fw_ff_yaw", + value: 100 + }, + { + key: "imu_acc_ignore_rate", + value: 9 + }, + { + key: "imu_acc_ignore_slope", + value: 5 + }, + { + key: "airmode_type", + value: "STICK_CENTER_ONCE" + }, + { + key: "small_angle", + value: 180 + }, + { + key: "nav_fw_control_smoothness", + value: 2 + }, + { + key: "nav_rth_allow_landing", + value: "FS_ONLY" + }, + { + key: "nav_rth_altitude", + value: 5000 + }, + { + key: "failsafe_mission", + value: "ON" + }, + { + key: "nav_wp_radius", + value: 5000 + }, + ], + "features": [ + { + bit: 4, // Enable MOTOR_STOP + state: true + } + ] + }, + { + "title": 'Rovers & Boats', + "id": 1, + "notRecommended": false, + "reboot": true, + "mixerToApply": 31, + "settings": [ + { + key: "model_preview_type", + value: 31 + }, + { + key: "gyro_hardware_lpf", + value: "256HZ" + }, + { + key: "gyro_main_lpf_hz", + value: 10 + }, + { + key: "gyro_main_lpf_type", + value: "BIQUAD" + }, + { + key: "motor_pwm_protocol", + value: "STANDARD" + }, + { + key: "applied_defaults", + value: 1 + }, + { + key: "failsafe_procedure", + value: "DROP" + }, + { + key: "platform_type", + value: "ROVER" + }, + { + key: "nav_wp_safe_distance", + value: 50000 + }, + { + key: "nav_fw_loiter_radius", + value: 100 + }, + { + key: "nav_fw_yaw_deadband", + value: 5 + }, + { + key: "pidsum_limit_yaw", + value: 500 + }, + { + key: "nav_fw_pos_hdg_p", + value: 60 + }, + { + key: "nav_fw_pos_hdg_i", + value: 2 + }, + { + key: "nav_fw_pos_hdg_d", + value: 0 + } + ] + }, + { + "title": 'Keep current settings (Not recommended)', + "id": 0, + "notRecommended": true, + "reboot": false, + "settings": [ + { + key: "applied_defaults", + value: 1 + } + ] + } ]; \ No newline at end of file diff --git a/js/msp/MSPHelper.js b/js/msp/MSPHelper.js index ef448dda..249e8626 100644 --- a/js/msp/MSPHelper.js +++ b/js/msp/MSPHelper.js @@ -3263,6 +3263,9 @@ var mspHelper = (function (gui) { MSP.send_message(MSPCodes.MSP2_INAV_PROGRAMMING_PID_STATUS, false, false, callback); }; + self.loadSerialPorts = function (callback) { + MSP.send_message(MSPCodes.MSP2_CF_SERIAL_CONFIG, false, false, callback); + } return self; })(GUI); diff --git a/tabs/setup.js b/tabs/setup.js index e4cd7177..58d36164 100755 --- a/tabs/setup.js +++ b/tabs/setup.js @@ -25,7 +25,8 @@ TABS.setup.initialize = function (callback) { mspHelper.loadFeatures, mspHelper.queryFcStatus, mspHelper.loadMixerConfig, - mspHelper.loadMiscV2 + mspHelper.loadMiscV2, + mspHelper.loadSerialPorts ]; loadChainer.setChain(loadChain); diff --git a/wizard/receiver.html b/wizard/receiver.html index 4638458a..67c51935 100644 --- a/wizard/receiver.html +++ b/wizard/receiver.html @@ -1 +1,7 @@ -

Receiver wizard

\ No newline at end of file +

Receiver wizard

+
+ +
\ No newline at end of file