mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-24 16:55:24 +03:00
Add Race Transponder configuration support.
Also cleans up i18n support for 'features' and adds tooltip support for them on the configuration tab.
This commit is contained in:
parent
5c2273bd65
commit
1a58bfcf82
13 changed files with 490 additions and 37 deletions
6
js/fc.js
6
js/fc.js
|
@ -29,6 +29,7 @@ var _3D;
|
|||
var DATAFLASH;
|
||||
var SDCARD;
|
||||
var BLACKBOX;
|
||||
var TRANSPONDER;
|
||||
var RC_deadband;
|
||||
var SENSOR_ALIGNMENT;
|
||||
var RX_CONFIG;
|
||||
|
@ -217,6 +218,11 @@ var FC = {
|
|||
blackboxRateDenom: 1
|
||||
};
|
||||
|
||||
TRANSPONDER = {
|
||||
supported: false,
|
||||
data: []
|
||||
};
|
||||
|
||||
RC_deadband = {
|
||||
deadband: 0,
|
||||
yaw_deadband: 0,
|
||||
|
|
11
js/gui.js
11
js/gui.js
|
@ -19,6 +19,7 @@ var GUI_control = function () {
|
|||
];
|
||||
this.defaultAllowedTabsWhenConnected = [
|
||||
'failsafe',
|
||||
'transponder',
|
||||
'adjustments',
|
||||
'auxiliary',
|
||||
'cli',
|
||||
|
@ -275,10 +276,12 @@ GUI_control.prototype.content_ready = function (callback) {
|
|||
$(elem).removeClass('togglemedium');
|
||||
});
|
||||
|
||||
// Build link to in-use CF version documentation
|
||||
var documentationButton = $('div#content #button-documentation');
|
||||
documentationButton.html("Documentation for "+CONFIG.flightControllerVersion);
|
||||
documentationButton.attr("href","https://github.com/cleanflight/cleanflight/tree/v{0}/docs".format(CONFIG.flightControllerVersion));
|
||||
if (CONFIGURATOR.connectionValid) {
|
||||
// Build link to in-use CF version documentation
|
||||
var documentationButton = $('div#content #button-documentation');
|
||||
documentationButton.html("Documentation for " + CONFIG.flightControllerVersion);
|
||||
documentationButton.attr("href","https://github.com/cleanflight/cleanflight/tree/v{0}/docs".format(CONFIG.flightControllerVersion));
|
||||
}
|
||||
|
||||
// loading tooltip
|
||||
jQuery(document).ready(function($) {
|
||||
|
|
20
js/msp.js
20
js/msp.js
|
@ -38,6 +38,8 @@ var MSP_codes = {
|
|||
MSP_SDCARD_SUMMARY: 79,
|
||||
MSP_BLACKBOX_CONFIG: 80,
|
||||
MSP_SET_BLACKBOX_CONFIG: 81,
|
||||
MSP_TRANSPONDER_CONFIG: 82,
|
||||
MSP_SET_TRANSPONDER_CONFIG: 83,
|
||||
|
||||
// Multiwii MSP commands
|
||||
MSP_IDENT: 100,
|
||||
|
@ -932,6 +934,18 @@ var MSP = {
|
|||
case MSP_codes.MSP_SET_BLACKBOX_CONFIG:
|
||||
console.log("Blackbox config saved");
|
||||
break;
|
||||
case MSP_codes.MSP_TRANSPONDER_CONFIG:
|
||||
var offset = 0;
|
||||
TRANSPONDER.supported = (data.getUint8(offset++) & 1) != 0;
|
||||
TRANSPONDER.data = [];
|
||||
var bytesRemaining = data.byteLength - offset;
|
||||
for (var i = 0; i < bytesRemaining; i++) {
|
||||
TRANSPONDER.data.push(data.getUint8(offset++));
|
||||
}
|
||||
break;
|
||||
case MSP_codes.MSP_SET_TRANSPONDER_CONFIG:
|
||||
console.log("Transponder config saved");
|
||||
break;
|
||||
case MSP_codes.MSP_SET_MODE_RANGE:
|
||||
console.log('Mode range saved');
|
||||
break;
|
||||
|
@ -1242,6 +1256,12 @@ MSP.crunch = function (code) {
|
|||
}
|
||||
break;
|
||||
|
||||
case MSP_codes.MSP_SET_TRANSPONDER_CONFIG:
|
||||
for (var i = 0; i < TRANSPONDER.data.length; i++) {
|
||||
buffer.push(TRANSPONDER.data[i]);
|
||||
}
|
||||
break;
|
||||
|
||||
case MSP_codes.MSP_SET_CHANNEL_FORWARDING:
|
||||
for (var i = 0; i < SERVO_CONFIG.length; i++) {
|
||||
var out = SERVO_CONFIG[i].indexOfChannelToForward;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue