diff --git a/js/fc.js b/js/fc.js index 26a638d2..a614ffeb 100644 --- a/js/fc.js +++ b/js/fc.js @@ -1408,5 +1408,163 @@ var FC = { default: 0 } } + }, + getBatteryProfileParameters: function () { + return [ + 'bat_cells', + 'vbat_cell_detect_voltage', + 'vbat_max_cell_voltage', + 'vbat_min_cell_voltage', + 'vbat_warning_cell_voltage', + 'battery_capacity', + 'battery_capacity_warning', + 'battery_capacity_critical', + 'battery_capacity_unit', + 'controlrate_profile', + 'throttle_scale', + 'throttle_idle', + 'turtle_mode_power_factor', + 'failsafe_throttle', + 'fw_min_throttle_down_pitch', + 'nav_mc_hover_thr', + 'nav_fw_cruise_thr', + 'nav_fw_min_thr', + 'nav_fw_max_thr', + 'nav_fw_pitch2thr', + 'nav_fw_launch_thr', + 'nav_fw_launch_idle_thr', + 'limit_cont_current', + 'limit_burst_current', + 'limit_burst_current_time', + 'limit_burst_current_falldown_time', + 'limit_cont_power', + 'limit_burst_power', + 'limit_burst_power_time', + 'limit_burst_power_falldown_time' + ]; + }, + isBatteryProfileParameter: function(paramName) { + return ($.inArray(paramName,this.getBatteryProfileParameters()) != -1); + //return true; + }, + getControlProfileParameters: function () { + return [ + 'mc_p_pitch', + 'mc_i_pitch', + 'mc_d_pitch', + 'mc_cd_pitch', + 'mc_p_roll', + 'mc_i_roll', + 'mc_d_roll', + 'mc_cd_roll', + 'mc_p_yaw', + 'mc_i_yaw', + 'mc_d_yaw', + 'mc_cd_yaw', + 'mc_p_level', + 'mc_i_level', + 'mc_d_level', + 'fw_p_pitch', + 'fw_i_pitch', + 'fw_d_pitch', + 'fw_ff_pitch', + 'fw_p_roll', + 'fw_i_roll', + 'fw_d_roll', + 'fw_ff_roll', + 'fw_p_yaw', + 'fw_i_yaw', + 'fw_d_yaw', + 'fw_ff_yaw', + 'fw_p_level', + 'fw_i_level', + 'fw_d_level', + 'max_angle_inclination_rll', + 'max_angle_inclination_pit', + 'dterm_lpf_hz', + 'dterm_lpf_type', + 'dterm_lpf2_hz', + 'dterm_lpf2_type', + 'yaw_lpf_hz', + 'fw_iterm_throw_limit', + 'fw_loiter_direction', + 'fw_reference_airspeed', + 'fw_turn_assist_yaw_gain', + 'fw_turn_assist_pitch_gain', + 'fw_iterm_limit_stick_position', + 'fw_yaw_iterm_freeze_bank_angle', + 'pidsum_limit', + 'pidsum_limit_yaw', + 'iterm_windup', + 'rate_accel_limit_roll_pitch', + 'rate_accel_limit_yaw', + 'heading_hold_rate_limit', + 'nav_mc_pos_z_p', + 'nav_mc_vel_z_p', + 'nav_mc_vel_z_i', + 'nav_mc_vel_z_d', + 'nav_mc_pos_xy_p', + 'nav_mc_vel_xy_p', + 'nav_mc_vel_xy_i', + 'nav_mc_vel_xy_d', + 'nav_mc_vel_xy_ff', + 'nav_mc_heading_p', + 'nav_mc_vel_xy_dterm_lpf_hz', + 'nav_mc_vel_xy_dterm_attenuation', + 'nav_mc_vel_xy_dterm_attenuation_start', + 'nav_mc_vel_xy_dterm_attenuation_end', + 'nav_fw_pos_z_p', + 'nav_fw_pos_z_i', + 'nav_fw_pos_z_d', + 'nav_fw_pos_xy_p', + 'nav_fw_pos_xy_i', + 'nav_fw_pos_xy_d', + 'nav_fw_heading_p', + 'nav_fw_pos_hdg_p', + 'nav_fw_pos_hdg_i', + 'nav_fw_pos_hdg_d', + 'nav_fw_pos_hdg_pidsum_limit', + 'mc_iterm_relax', + 'mc_iterm_relax_cutoff', + 'd_boost_min', + 'd_boost_max', + 'd_boost_max_at_acceleration', + 'd_boost_gyro_delta_lpf_hz', + 'antigravity_gain', + 'antigravity_accelerator', + 'antigravity_cutoff_lpf_hz', + 'pid_type', + 'mc_cd_lpf_hz', + 'fw_level_pitch_trim', + 'smith_predictor_strength', + 'smith_predictor_delay', + 'smith_predictor_lpf_hz', + 'fw_level_pitch_gain', + 'thr_mid', + 'thr_expo', + 'tpa_rate', + 'tpa_breakpoint', + 'fw_tpa_time_constant', + 'rc_expo', + 'rc_yaw_expo', + 'roll_rate', + 'pitch_rate', + 'yaw_rate', + 'manual_rc_expo', + 'manual_rc_yaw_expo', + 'manual_roll_rate', + 'manual_pitch_rate', + 'manual_yaw_rate', + 'fpv_mix_degrees', + 'rate_dynamics_center_sensitivity', + 'rate_dynamics_end_sensitivity', + 'rate_dynamics_center_correction', + 'rate_dynamics_end_correction', + 'rate_dynamics_center_weight', + 'rate_dynamics_end_weight' + ]; + }, + isControlProfileParameter: function(paramName) { + return ($.inArray(paramName, this.getControlProfileParameters()) != -1); } }; diff --git a/js/settings.js b/js/settings.js index be82dfa9..d7da43f8 100644 --- a/js/settings.js +++ b/js/settings.js @@ -12,6 +12,14 @@ var Settings = (function () { var settingName = input.data('setting'); var inputUnit = input.data('unit'); + if (FC.isBatteryProfileParameter(settingName)) { + input.css("background-color","#fef2d5"); + } + + if (FC.isControlProfileParameter(settingName)) { + input.css("background-color","#d5ebfe"); + } + return mspHelper.getSetting(settingName).then(function (s) { // Check if the input declares a parent // to be hidden in case of the setting not being available. diff --git a/src/css/dropdown-lists/css/style_lists.css b/src/css/dropdown-lists/css/style_lists.css index 772b808e..9df4c9ef 100644 --- a/src/css/dropdown-lists/css/style_lists.css +++ b/src/css/dropdown-lists/css/style_lists.css @@ -112,7 +112,7 @@ } .dropdown-dark { - background: #636363; /* NEW2 */ + background: #636363; /* NEW2 */ background: #3e403f; /* NEW */ border-color: #111 #0a0a0a black; @@ -123,11 +123,7 @@ -webkit-box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 1px 1px rgba(0, 0, 0, 0.2); box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 1px 1px rgba(0, 0, 0, 0.2); color:#a6a6a6; - text-shadow:0px 1px rgba(0, 0, 0, 0.25); - - - - + text-shadow:0px 1px rgba(0, 0, 0, 0.25); } .dropdown-dark:before { border-bottom-color: #aaa; @@ -143,9 +139,17 @@ } .dropdown-dark .dropdown-select:focus { - color: #fff; + color: #fff !important; } .dropdown-dark .dropdown-select > option { background: #56ab1a; text-shadow: 0 1px rgba(0, 0, 0, 0.4); } + +.dropdown-dark #profilechange { + color: #d5ebfe; +} + +.dropdown-dark #batteryprofilechange { + color: #fef2d5; +} \ No newline at end of file diff --git a/tabs/pid_tuning.html b/tabs/pid_tuning.html index 96a411d3..e251886b 100755 --- a/tabs/pid_tuning.html +++ b/tabs/pid_tuning.html @@ -178,24 +178,21 @@ - + + degrees per second - degrees per second + degrees per second - - degrees per second + degrees per second @@ -213,46 +210,40 @@ - degrees + degrees
- degrees + degrees
- degrees per second + degrees per second
- % + % - % + % - % + %