1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-19 14:25:14 +03:00

Added setting of FPV cam angle.

This commit is contained in:
mikeller 2017-02-20 17:10:20 +13:00
parent 57de73b41e
commit 2187e6d2ae
5 changed files with 82 additions and 25 deletions

View file

@ -638,13 +638,13 @@
"message": "Magnetometer Declination [deg]" "message": "Magnetometer Declination [deg]"
}, },
"configurationAutoDisarmDelay": { "configurationAutoDisarmDelay": {
"message": "Disarm motors after set delay(Seconds) (Requires MOTOR_STOP feature)" "message": "Disarm motors after set delay [seconds] (Requires MOTOR_STOP feature)"
}, },
"configurationDisarmKillSwitch": { "configurationDisarmKillSwitch": {
"message": "Disarm motors regardless of throttle value (When arming via AUX channel)" "message": "Disarm motors regardless of throttle value (When arming via AUX channel)"
}, },
"configurationDigitalIdlePercent": { "configurationDigitalIdlePercent": {
"message": "Motor Idle Throttle Value (percent)" "message": "Motor Idle Throttle Value [percent]"
}, },
"configurationDigitalIdlePercentHelp": { "configurationDigitalIdlePercentHelp": {
"message": "This is the 'idle' value in percent of maximum throttle that is sent to the ESCs when the craft is armed and the trottle stick is at minimum position. Increase the percent value to gain more idle speed." "message": "This is the 'idle' value in percent of maximum throttle that is sent to the ESCs when the craft is armed and the trottle stick is at minimum position. Increase the percent value to gain more idle speed."
@ -722,7 +722,7 @@
"message": "Flight Controller Loop Time" "message": "Flight Controller Loop Time"
}, },
"configurationCalculatedCyclesSec": { "configurationCalculatedCyclesSec": {
"message": "Cycles/Sec (Hz)" "message": "Cycles/Sec [Hz]"
}, },
"configurationLoopTimeHelp": { "configurationLoopTimeHelp": {
"message": "<strong>Note:</strong> Make sure your FC is capable to operate on these speeds! Check CPU and cycletime stability. Changing this may require PID re-tuning. TIP: Disable Accelerometer and other sensors to gain more performance." "message": "<strong>Note:</strong> Make sure your FC is capable to operate on these speeds! Check CPU and cycletime stability. Changing this may require PID re-tuning. TIP: Disable Accelerometer and other sensors to gain more performance."
@ -873,7 +873,7 @@
"message": "Manual" "message": "Manual"
}, },
"receiverRcInterpolationInterval": { "receiverRcInterpolationInterval": {
"message": "RC Interpolating Interval (ms)" "message": "RC Interpolation Interval [ms]"
}, },
"pidTuningPtermSetpoint": { "pidTuningPtermSetpoint": {
"message": "D Setpoint transition" "message": "D Setpoint transition"
@ -900,7 +900,7 @@
"message": "RC Rate" "message": "RC Rate"
}, },
"pidTuningMaxVel": { "pidTuningMaxVel": {
"message": "Max Vel (deg/s)" "message": "Max Vel [deg/s]"
}, },
"pidTuningRate": { "pidTuningRate": {
"message": "Rate" "message": "Rate"
@ -1707,25 +1707,25 @@
"message": "Profile independent Filter Settings" "message": "Profile independent Filter Settings"
}, },
"pidTuningGyroLowpassFrequency": { "pidTuningGyroLowpassFrequency": {
"message": "Gyro Soft Lowpass Frequency (Hz)" "message": "Gyro Soft Lowpass Frequency [Hz]"
}, },
"pidTuningGyroLowpassFrequencyHelp": { "pidTuningGyroLowpassFrequencyHelp": {
"message": "Gyro Soft Lowpass Frequency (Hz)" "message": "Gyro Soft Lowpass Frequency [Hz]"
}, },
"pidTuningGyroNotch1Frequency": { "pidTuningGyroNotch1Frequency": {
"message": "Gyro Notch Filter 1 Frequency (Hz)" "message": "Gyro Notch Filter 1 Frequency [Hz]"
}, },
"pidTuningGyroNotch2Frequency": { "pidTuningGyroNotch2Frequency": {
"message": "Gyro Notch Filter 2 Frequency (Hz)" "message": "Gyro Notch Filter 2 Frequency [Hz]"
}, },
"pidTuningGyroNotchFrequencyHelp": { "pidTuningGyroNotchFrequencyHelp": {
"message": "Gyro Notch Filter Frequency in Hz (0 means disabled)" "message": "Gyro Notch Filter Frequency in Hz (0 means disabled)"
}, },
"pidTuningGyroNotch1Cutoff": { "pidTuningGyroNotch1Cutoff": {
"message": "Gyro Notch Filter Cutoff 1 Frequency (Hz)" "message": "Gyro Notch Filter Cutoff 1 Frequency [Hz]"
}, },
"pidTuningGyroNotch2Cutoff": { "pidTuningGyroNotch2Cutoff": {
"message": "Gyro Notch Filter Cutoff 2 Frequency (Hz)" "message": "Gyro Notch Filter Cutoff 2 Frequency [Hz]"
}, },
"pidTuningGyroNotchCutoffHelp": { "pidTuningGyroNotchCutoffHelp": {
"message": "Gyro Notch Filter Cutoff Frequency in Hz (This is where notch filter starts. For example with notch filter 160 and notch hz of 260 it means the range is 160-360hz with most attenuation around center)" "message": "Gyro Notch Filter Cutoff Frequency in Hz (This is where notch filter starts. For example with notch filter 160 and notch hz of 260 it means the range is 160-360hz with most attenuation around center)"
@ -1734,28 +1734,28 @@
"message": "Filter Settings" "message": "Filter Settings"
}, },
"pidTuningDTermLowpassFrequency": { "pidTuningDTermLowpassFrequency": {
"message": "D Term Lowpass Frequency (Hz)" "message": "D Term Lowpass Frequency [Hz]"
}, },
"pidTuningDTermLowpassFrequencyHelp": { "pidTuningDTermLowpassFrequencyHelp": {
"message": "D Term Lowpass Frequency in Hz (0 means disabled)" "message": "D Term Lowpass Frequency [Hz] (0 means disabled)"
}, },
"pidTuningDTermNotchFrequency": { "pidTuningDTermNotchFrequency": {
"message": "D Term Notch Filter Frequency (Hz)" "message": "D Term Notch Filter Frequency [Hz]"
}, },
"pidTuningDTermNotchFrequencyHelp": { "pidTuningDTermNotchFrequencyHelp": {
"message": "D Term Notch Filter Frequency in Hz (0 means disabled)" "message": "D Term Notch Filter Frequency [Hz] (0 means disabled)"
}, },
"pidTuningDTermNotchCutoff": { "pidTuningDTermNotchCutoff": {
"message": "D Term Notch Filter Cutoff (Hz)" "message": "D Term Notch Filter Cutoff [Hz]"
}, },
"pidTuningDTermNotchCutoffHelp": { "pidTuningDTermNotchCutoffHelp": {
"message": "D Term Notch Filter Cutoff in Hz (This is where notch filter starts. For example with notch filter 160 and notch hz of 260 it means the range is 160-360hz with most attenuation around center)" "message": "D Term Notch Filter Cutoff in Hz (This is where notch filter starts. For example with notch filter 160 and notch hz of 260 it means the range is 160-360hz with most attenuation around center)"
}, },
"pidTuningYawLowpassFrequency": { "pidTuningYawLowpassFrequency": {
"message": "Yaw Lowpass Frequency (Hz)" "message": "Yaw Lowpass Frequency [Hz]"
}, },
"pidTuningYawLowpassFrequencyHelp": { "pidTuningYawLowpassFrequencyHelp": {
"message": "Yaw Lowpass Frequency in Hz (Yaw axis can sometimes be noiser than the rest. This filter only affects the P of yaw)" "message": "Yaw Lowpass Frequency [Hz] (Yaw axis can sometimes be noiser than the rest. This filter only affects the P of yaw)"
}, },
"pidTuningVbatPidCompensation": { "pidTuningVbatPidCompensation": {
"message": "Vbat PID Compensation" "message": "Vbat PID Compensation"
@ -1916,16 +1916,19 @@
"pidTuningPidTuningTip": { "pidTuningPidTuningTip": {
"message": "<b>Proportional:</b> You will notice a very strong resistant force to any attempts to move the MultiRotor<br><b>Integral:</b> Increase the ability to hold overall initial position and reduce drift, but also increase the delay in returning to initial position.<br><b>Derivative:</b> Improves the speed at which deviations are recovered, but increases noise<br><b>Rates and Expo</b>: Determine your stick feel based on these parameters. Use the graph and live 3D model to find your favourite rate setting" "message": "<b>Proportional:</b> You will notice a very strong resistant force to any attempts to move the MultiRotor<br><b>Integral:</b> Increase the ability to hold overall initial position and reduce drift, but also increase the delay in returning to initial position.<br><b>Derivative:</b> Improves the speed at which deviations are recovered, but increases noise<br><b>Rates and Expo</b>: Determine your stick feel based on these parameters. Use the graph and live 3D model to find your favourite rate setting"
}, },
"pidTuningRatesTip": { "pidTuningRatesTip": {
"message": "Play with the rates and see how those affect the stick curve" "message": "Play with the rates and see how those affect the stick curve"
}, },
"configurationMisc": { "configurationMisc": {
"message": "Misc" "message": "Misc"
}, },
"configurationVesselName": { "configurationVesselName": {
"message": "Craft name" "message": "Craft name"
}, },
"onboardLoggingBlackbox": { "configurationFpvCamAngleDegrees": {
"message": "FPV Camera Angle [degrees]"
},
"onboardLoggingBlackbox": {
"message": "Blackbox logging device" "message": "Blackbox logging device"
}, },
"onboardLoggingRateOfLogging": { "onboardLoggingRateOfLogging": {

View file

@ -305,7 +305,11 @@ var FC = {
rx_max_usec: 0, rx_max_usec: 0,
rcInterpolation: 0, rcInterpolation: 0,
rcInterpolationInterval:0, rcInterpolationInterval:0,
airModeActivateThreshold: 0 airModeActivateThreshold: 0,
rxSpiProtocol: 0,
rxSpiId: 0,
rxSpiRfChannelCount: 0,
fpvCamAngleDegrees: 0
}; };
FAILSAFE_CONFIG = { FAILSAFE_CONFIG = {

View file

@ -605,6 +605,17 @@ MspHelper.prototype.process_data = function(dataHandler) {
RX_CONFIG.rcInterpolation = data.readU8(); RX_CONFIG.rcInterpolation = data.readU8();
RX_CONFIG.rcInterpolationInterval = data.readU8(); RX_CONFIG.rcInterpolationInterval = data.readU8();
RX_CONFIG.airModeActivateThreshold = data.readU16(); RX_CONFIG.airModeActivateThreshold = data.readU16();
if (semver.gte(CONFIG.apiVersion, "1.31.0")) {
RX_CONFIG.rxSpiProtocol = data.readU8();
RX_CONFIG.rxSpiId = data.readU32();
RX_CONFIG.rxSpiRfChannelCount = data.readU8();
RX_CONFIG.fpvCamAngleDegrees = data.readU8();
} else {
RX_CONFIG.rxSpiProtocol = 0;
RX_CONFIG.rxSpiId = 0;
RX_CONFIG.rxSpiRfChannelCount = 0;
RX_CONFIG.fpvCamAngleDegrees = 0;
}
} else { } else {
RX_CONFIG.rcInterpolation = 0; RX_CONFIG.rcInterpolation = 0;
RX_CONFIG.rcInterpolationInterval = 0; RX_CONFIG.rcInterpolationInterval = 0;
@ -1083,6 +1094,12 @@ MspHelper.prototype.crunch = function(code) {
buffer.push8(RX_CONFIG.rcInterpolation) buffer.push8(RX_CONFIG.rcInterpolation)
.push8(RX_CONFIG.rcInterpolationInterval) .push8(RX_CONFIG.rcInterpolationInterval)
.push16(RX_CONFIG.airModeActivateThreshold); .push16(RX_CONFIG.airModeActivateThreshold);
if (semver.gte(CONFIG.apiVersion, "1.31.0")) {
buffer.push8(RX_CONFIG.rxSpiProtocol)
.push32(RX_CONFIG.rxSpiId)
.push8(RX_CONFIG.rxSpiRfChannelCount)
.push8(RX_CONFIG.fpvCamAngleDegrees);
}
} }
break; break;

View file

@ -532,6 +532,11 @@
i18n="configurationVesselName"></span> i18n="configurationVesselName"></span>
</label> </label>
</div> </div>
<div class="number fpvCamAngleDegrees">
<label> <input type="number" name="fpvCamAngleDegrees" step="1" min="0" max="50" /> <span
i18n="configurationFpvCamAngleDegrees"></span>
</label>
</div>
</div> </div>
</div> </div>
</div> </div>

View file

@ -118,7 +118,7 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
} }
function load_current() { function load_current() {
var next_callback = load_html; var next_callback = load_rx_config;
if (semver.gte(CONFIG.flightControllerVersion, "3.1.0")) { if (semver.gte(CONFIG.flightControllerVersion, "3.1.0")) {
MSP.send_message(MSPCodes.MSP_CURRENT_METER_CONFIG, false, false, next_callback); MSP.send_message(MSPCodes.MSP_CURRENT_METER_CONFIG, false, false, next_callback);
} else { } else {
@ -126,6 +126,14 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
} }
} }
function load_rx_config() {
var next_callback = load_html;
if (semver.gte(CONFIG.apiVersion, "1.31.0")) {
MSP.send_message(MSPCodes.MSP_RX_CONFIG, false, false, next_callback);
} else {
next_callback();
}
}
//Update Analog/Battery Data //Update Analog/Battery Data
function load_analog() { function load_analog() {
@ -354,6 +362,13 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
$('input[name="vesselName"]').val(CONFIG.name); $('input[name="vesselName"]').val(CONFIG.name);
if (semver.gte(CONFIG.apiVersion, "1.31.0")) {
$('input[name="fpvCamAngleDegrees"]').val(RX_CONFIG.fpvCamAngleDegrees);
} else {
$('div.fpvCamAngleDegrees').hide();
}
if (semver.lt(CONFIG.flightControllerVersion, "3.0.0")) { if (semver.lt(CONFIG.flightControllerVersion, "3.0.0")) {
$('.miscSettings').hide(); $('.miscSettings').hide();
} }
@ -739,6 +754,10 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
PID_ADVANCED_CONFIG.gyroUse32kHz = $('input[id="gyroUse32kHz"]').is(':checked') ? 1 : 0; PID_ADVANCED_CONFIG.gyroUse32kHz = $('input[id="gyroUse32kHz"]').is(':checked') ? 1 : 0;
} }
if (semver.gte(CONFIG.apiVersion, "1.31.0")) {
RX_CONFIG.fpvCamAngleDegrees = parseInt($('input[name="fpvCamAngleDegrees"]').val());
}
function save_serial_config() { function save_serial_config() {
if (semver.lt(CONFIG.apiVersion, "1.6.0")) { if (semver.lt(CONFIG.apiVersion, "1.6.0")) {
MSP.send_message(MSPCodes.MSP_SET_CF_SERIAL_CONFIG, mspHelper.crunch(MSPCodes.MSP_SET_CF_SERIAL_CONFIG), false, save_misc); MSP.send_message(MSPCodes.MSP_SET_CF_SERIAL_CONFIG, mspHelper.crunch(MSPCodes.MSP_SET_CF_SERIAL_CONFIG), false, save_misc);
@ -838,7 +857,7 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
} }
function save_current() { function save_current() {
var next_callback = save_to_eeprom; var next_callback = save_rx_config;
if (semver.gte(CONFIG.flightControllerVersion, "3.1.0")) { if (semver.gte(CONFIG.flightControllerVersion, "3.1.0")) {
MSP.send_message(MSPCodes.MSP_SET_CURRENT_METER_CONFIG, mspHelper.crunch(MSPCodes.MSP_SET_CURRENT_METER_CONFIG), false, next_callback); MSP.send_message(MSPCodes.MSP_SET_CURRENT_METER_CONFIG, mspHelper.crunch(MSPCodes.MSP_SET_CURRENT_METER_CONFIG), false, next_callback);
} else { } else {
@ -846,6 +865,15 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
} }
} }
function save_rx_config() {
var next_callback = save_to_eeprom;
if (semver.gte(CONFIG.apiVersion, "1.31.0")) {
MSP.send_message(MSPCodes.MSP_SET_RX_CONFIG, mspHelper.crunch(MSPCodes.MSP_SET_RX_CONFIG), false, next_callback);
} else {
next_callback();
}
}
function save_to_eeprom() { function save_to_eeprom() {
MSP.send_message(MSPCodes.MSP_EEPROM_WRITE, false, false, reboot); MSP.send_message(MSPCodes.MSP_EEPROM_WRITE, false, false, reboot);
} }