mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-18 13:55:18 +03:00
Update configuration for Cleanflight settings.
This commit is contained in:
parent
e398e52d9d
commit
7692b7354a
6 changed files with 88 additions and 35 deletions
|
@ -334,6 +334,17 @@
|
||||||
"message": "EEPROM <span style=\"color: green\">saved</span>"
|
"message": "EEPROM <span style=\"color: green\">saved</span>"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"configurationFeatureEnabled": {
|
||||||
|
"message": "Enabled"
|
||||||
|
},
|
||||||
|
"configurationFeatureName": {
|
||||||
|
"message": "Name"
|
||||||
|
},
|
||||||
|
"configurationFeatureDescription": {
|
||||||
|
"message": "Description"
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
"configurationMixer": {
|
"configurationMixer": {
|
||||||
"message": "Mixer"
|
"message": "Mixer"
|
||||||
},
|
},
|
||||||
|
|
|
@ -489,6 +489,9 @@ var MSP = {
|
||||||
//
|
//
|
||||||
// Cleanflight specific
|
// Cleanflight specific
|
||||||
//
|
//
|
||||||
|
case MSP_codes.MSP_SET_CHANNEL_FORWARDING:
|
||||||
|
console.log('Channel forwarding saved');
|
||||||
|
break;
|
||||||
|
|
||||||
case MSP_codes.MSP_API_VERSION:
|
case MSP_codes.MSP_API_VERSION:
|
||||||
CONFIG.apiVersion = data.getUint8(1) + '.' + data.getUint8(2);
|
CONFIG.apiVersion = data.getUint8(1) + '.' + data.getUint8(2);
|
||||||
|
|
|
@ -1,3 +1,26 @@
|
||||||
|
.tab-configuration table {
|
||||||
|
float: left;
|
||||||
|
|
||||||
|
margin-bottom: 10px;
|
||||||
|
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
.tab-configuration table,
|
||||||
|
.tab-configuration table th,
|
||||||
|
.tab-configuration table td {
|
||||||
|
padding: 4px;
|
||||||
|
border: 1px solid #8b8b8b;
|
||||||
|
}
|
||||||
|
.tab-configuration table tr td:first-child {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.tab-configuration table td {
|
||||||
|
padding: 2px 10px;
|
||||||
|
}
|
||||||
|
.tab-configuration table tr:nth-child(odd) {
|
||||||
|
background-color: #ececec;
|
||||||
|
}
|
||||||
|
|
||||||
.tab-configuration {
|
.tab-configuration {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
@ -111,12 +134,14 @@
|
||||||
.tab-configuration .current .checkbox span {
|
.tab-configuration .current .checkbox span {
|
||||||
margin-left: 15px;
|
margin-left: 15px;
|
||||||
}
|
}
|
||||||
.tab-configuration .buttons {
|
|
||||||
position: fixed;
|
|
||||||
|
|
||||||
|
.tab-auxiliary > .buttons {
|
||||||
width: calc(100% - 20px);
|
width: calc(100% - 20px);
|
||||||
|
|
||||||
|
margin-top: 10px;
|
||||||
bottom: 10px;
|
bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-configuration .save {
|
.tab-configuration .save {
|
||||||
display: block;
|
display: block;
|
||||||
float: right;
|
float: right;
|
||||||
|
|
|
@ -10,9 +10,18 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="rightWrapper">
|
<div class="rightWrapper">
|
||||||
<div class="groupTitle" i18n="configurationFeatures"></div>
|
<div class="groupTitle" i18n="configurationFeatures"></div>
|
||||||
<dl class="features">
|
<table>
|
||||||
<!-- list generated here -->
|
<thead>
|
||||||
</dl>
|
<tr>
|
||||||
|
<th i18n="configurationFeatureEnabled"></th>
|
||||||
|
<th i18n="configurationFeatureName"></th>
|
||||||
|
<th i18n="configurationFeatureDescription"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody class="features">
|
||||||
|
<!-- table generated here -->
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="clear-both"></div>
|
<div class="clear-both"></div>
|
||||||
<div class="leftWrapper">
|
<div class="leftWrapper">
|
||||||
|
@ -84,12 +93,12 @@
|
||||||
</select>
|
</select>
|
||||||
<span i18n="configurationGPStype"></span>
|
<span i18n="configurationGPStype"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="line">
|
<!-- <div class="line"> -->
|
||||||
<select class="gps_baudrate">
|
<!-- <select class="gps_baudrate"> -->
|
||||||
<!-- list generated here -->
|
<!-- list generated here -->
|
||||||
</select>
|
<!-- </select> -->
|
||||||
<span i18n="configurationGPSbaudrate"></span>
|
<!-- <span i18n="configurationGPSbaudrate"></span> -->
|
||||||
</div>
|
<!-- </div> -->
|
||||||
<div class="line">
|
<div class="line">
|
||||||
<select class="gps_ubx_sbas">
|
<select class="gps_ubx_sbas">
|
||||||
<!-- list generated here -->
|
<!-- list generated here -->
|
||||||
|
|
|
@ -54,40 +54,42 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
||||||
|
|
||||||
// generate features
|
// generate features
|
||||||
var featureNames = [
|
var featureNames = [
|
||||||
{name: 'PPM', description: 'Enable PPM input (and disable PWM input)'},
|
{name: 'RX_PPM', description: 'PPM RX input'},
|
||||||
{name: 'VBAT', description: 'Enable Battery voltage monitoring'},
|
{name: 'VBAT', description: 'Battery voltage monitoring'},
|
||||||
{name: 'INFLIGHT_ACC_CAL', description: 'Enable in-flight level calibration'},
|
{name: 'INFLIGHT_ACC_CAL', description: 'In-flight level calibration'},
|
||||||
{name: 'SERIALRX', description: 'Enable Serial-based receiver (SPEKSAT, SBUS, SUMD)'},
|
{name: 'RX_SERIAL', description: 'Serial-based receiver (SPEKSAT, SBUS, SUMD)'},
|
||||||
{name: 'MOTOR_STOP', description: 'Don\'t spin the motors when armed'},
|
{name: 'MOTOR_STOP', description: 'Don\'t spin the motors when armed'},
|
||||||
{name: 'SERVO_TILT', description: 'Enable servo gimbal'},
|
{name: 'SERVO_TILT', description: 'Servo gimbal'},
|
||||||
{name: 'SOFTSERIAL', description: 'Enable 3rd serial port'},
|
{name: 'SOFTSERIAL', description: 'Enable CPU based serial ports (configure port scenario first)'},
|
||||||
{name: 'LED_RING', description: 'Enable LED ring support'},
|
{name: 'GPS', description: 'GPS (configure port scenario first)'},
|
||||||
{name: 'GPS', description: 'Enable GPS (PPM or 3rd serial port required)'},
|
{name: 'FAILSAFE', description: 'Failsafe settings on RX signal loss'},
|
||||||
{name: 'FAILSAFE', description: 'Enable failsafe settings on PPM/PWM signal loss'},
|
{name: 'SONAR', description: 'Sonar'},
|
||||||
{name: 'SONAR', description: 'Enable sonar'},
|
{name: 'TELEMETRY', description: 'Telemetry output'},
|
||||||
{name: 'TELEMETRY', description: 'Enable FrSky- compatible telemetry output'},
|
{name: 'CURRENT_METER', description: 'Battery current monitoring'},
|
||||||
{name: 'POWERMETER', description: 'Enable battery current monitoring'},
|
{name: '3D', description: '3D mode (for use with reversible ESCs)'},
|
||||||
{name: 'VARIO', description: 'Enable VARIO'},
|
{name: 'RX_PARALLEL_PWM', description: 'PWM RX input'},
|
||||||
{name: '3D', description: 'Enable 3D mode (for use with reversible ESCs)'}
|
{name: 'RX_MSP', description: 'MSP RX input'},
|
||||||
|
{name: 'RSSI_ADC', description: 'Analog RSSI input'},
|
||||||
|
{name: 'LED_STRIP', description: 'Addressable RGB LED strip support'},
|
||||||
|
{name: 'DISPLAY', description: 'OLED Screen Display'},
|
||||||
|
{name: 'ONESHOT125', description: 'ONESHOT ESC support (disconnect ESCs, remove props)'}
|
||||||
];
|
];
|
||||||
|
|
||||||
var features_e = $('.features');
|
var features_e = $('.features');
|
||||||
for (var i = 0; i < featureNames.length; i++) {
|
for (var i = 0; i < featureNames.length; i++) {
|
||||||
var element = $('<dt><input id="feature-' + i + '" title="' + featureNames[i].name + '" type="checkbox" /></dt><dd><label for="feature-' + i + '">' + featureNames[i].description + '</label></dd>');
|
var row_e = $('<tr><td><input id="feature-' + i + '" title="' + featureNames[i].name + '" type="checkbox" /></td><td><label for="feature-' + i + '">' + featureNames[i].name + '</label></td><td>' + featureNames[i].description + '</td>');
|
||||||
element.find('input').attr('checked', bit_check(BF_CONFIG.features, i));
|
row_e.find('input').attr('checked', bit_check(BF_CONFIG.features, i));
|
||||||
|
|
||||||
features_e.append(element);
|
features_e.append(row_e);
|
||||||
}
|
}
|
||||||
|
|
||||||
// generate GPS
|
// generate GPS
|
||||||
var gpsTypes = [
|
var gpsTypes = [
|
||||||
'NMEA',
|
'NMEA',
|
||||||
'UBLOX',
|
'UBLOX'
|
||||||
'MTK_NMEA',
|
|
||||||
'MTK_BINARY',
|
|
||||||
'MAG_BINARY'
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/*
|
||||||
var gpsBauds = [
|
var gpsBauds = [
|
||||||
'115200',
|
'115200',
|
||||||
'57600',
|
'57600',
|
||||||
|
@ -95,6 +97,7 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
||||||
'19200',
|
'19200',
|
||||||
'9600'
|
'9600'
|
||||||
];
|
];
|
||||||
|
*/
|
||||||
|
|
||||||
var gpsSbas = [
|
var gpsSbas = [
|
||||||
'Disabled',
|
'Disabled',
|
||||||
|
@ -114,6 +117,7 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
||||||
MISC.gps_type = parseInt($(this).val());
|
MISC.gps_type = parseInt($(this).val());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
var gps_baudrate_e = $('select.gps_baudrate');
|
var gps_baudrate_e = $('select.gps_baudrate');
|
||||||
for (var i = 0; i < gpsBauds.length; i++) {
|
for (var i = 0; i < gpsBauds.length; i++) {
|
||||||
gps_baudrate_e.append('<option value="' + i + '">' + gpsBauds[i] + '</option>');
|
gps_baudrate_e.append('<option value="' + i + '">' + gpsBauds[i] + '</option>');
|
||||||
|
@ -122,6 +126,7 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
||||||
gps_baudrate_e.change(function () {
|
gps_baudrate_e.change(function () {
|
||||||
MISC.gps_baudrate = parseInt($(this).val());
|
MISC.gps_baudrate = parseInt($(this).val());
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
var gps_ubx_sbas_e = $('select.gps_ubx_sbas');
|
var gps_ubx_sbas_e = $('select.gps_ubx_sbas');
|
||||||
for (var i = 0; i < gpsSbas.length; i++) {
|
for (var i = 0; i < gpsSbas.length; i++) {
|
||||||
|
@ -134,7 +139,7 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
||||||
|
|
||||||
// select current gps configuration
|
// select current gps configuration
|
||||||
gps_type_e.val(MISC.gps_type);
|
gps_type_e.val(MISC.gps_type);
|
||||||
gps_baudrate_e.val(MISC.gps_baudrate);
|
//gps_baudrate_e.val(MISC.gps_baudrate);
|
||||||
gps_ubx_sbas_e.val(MISC.gps_ubx_sbas);
|
gps_ubx_sbas_e.val(MISC.gps_ubx_sbas);
|
||||||
|
|
||||||
// generate serial RX
|
// generate serial RX
|
||||||
|
@ -143,7 +148,7 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
||||||
'SPEKTRUM2048',
|
'SPEKTRUM2048',
|
||||||
'SBUS',
|
'SBUS',
|
||||||
'SUMD',
|
'SUMD',
|
||||||
'MSP'
|
'SUMH'
|
||||||
];
|
];
|
||||||
|
|
||||||
var serialRX_e = $('select.serialRX');
|
var serialRX_e = $('select.serialRX');
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
<select class="hybrid_helper" name="rcmap_helper">
|
<select class="hybrid_helper" name="rcmap_helper">
|
||||||
<option value="AETR1234">Default</option>
|
<option value="AETR1234">Default</option>
|
||||||
<option value="AETR1234">Futaba / Hitec</option>
|
<option value="AETR1234">Futaba / Hitec</option>
|
||||||
<option value="TAER1234">JR / Spektrum</option>
|
<option value="TAER1234">JR / Spektrum / Graupner</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue