Update configuration for Cleanflight settings.

10.3.x-maintenance
Dominic Clifton 2014-12-20 02:50:36 +00:00
parent e398e52d9d
commit 7692b7354a
6 changed files with 88 additions and 35 deletions

View File

@ -334,6 +334,17 @@
"message": "EEPROM <span style=\"color: green\">saved</span>"
},
"configurationFeatureEnabled": {
"message": "Enabled"
},
"configurationFeatureName": {
"message": "Name"
},
"configurationFeatureDescription": {
"message": "Description"
},
"configurationMixer": {
"message": "Mixer"
},

View File

@ -489,6 +489,9 @@ var MSP = {
//
// Cleanflight specific
//
case MSP_codes.MSP_SET_CHANNEL_FORWARDING:
console.log('Channel forwarding saved');
break;
case MSP_codes.MSP_API_VERSION:
CONFIG.apiVersion = data.getUint8(1) + '.' + data.getUint8(2);

View File

@ -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 {
position: relative;
}
@ -111,12 +134,14 @@
.tab-configuration .current .checkbox span {
margin-left: 15px;
}
.tab-configuration .buttons {
position: fixed;
.tab-auxiliary > .buttons {
width: calc(100% - 20px);
margin-top: 10px;
bottom: 10px;
}
.tab-configuration .save {
display: block;
float: right;

View File

@ -10,9 +10,18 @@
</div>
<div class="rightWrapper">
<div class="groupTitle" i18n="configurationFeatures"></div>
<dl class="features">
<!-- list generated here -->
</dl>
<table>
<thead>
<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 class="clear-both"></div>
<div class="leftWrapper">
@ -84,12 +93,12 @@
</select>
<span i18n="configurationGPStype"></span>
</div>
<div class="line">
<select class="gps_baudrate">
<!-- list generated here -->
</select>
<span i18n="configurationGPSbaudrate"></span>
</div>
<!-- <div class="line"> -->
<!-- <select class="gps_baudrate"> -->
<!-- list generated here -->
<!-- </select> -->
<!-- <span i18n="configurationGPSbaudrate"></span> -->
<!-- </div> -->
<div class="line">
<select class="gps_ubx_sbas">
<!-- list generated here -->

View File

@ -54,40 +54,42 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
// generate features
var featureNames = [
{name: 'PPM', description: 'Enable PPM input (and disable PWM input)'},
{name: 'VBAT', description: 'Enable Battery voltage monitoring'},
{name: 'INFLIGHT_ACC_CAL', description: 'Enable in-flight level calibration'},
{name: 'SERIALRX', description: 'Enable Serial-based receiver (SPEKSAT, SBUS, SUMD)'},
{name: 'RX_PPM', description: 'PPM RX input'},
{name: 'VBAT', description: 'Battery voltage monitoring'},
{name: 'INFLIGHT_ACC_CAL', description: 'In-flight level calibration'},
{name: 'RX_SERIAL', description: 'Serial-based receiver (SPEKSAT, SBUS, SUMD)'},
{name: 'MOTOR_STOP', description: 'Don\'t spin the motors when armed'},
{name: 'SERVO_TILT', description: 'Enable servo gimbal'},
{name: 'SOFTSERIAL', description: 'Enable 3rd serial port'},
{name: 'LED_RING', description: 'Enable LED ring support'},
{name: 'GPS', description: 'Enable GPS (PPM or 3rd serial port required)'},
{name: 'FAILSAFE', description: 'Enable failsafe settings on PPM/PWM signal loss'},
{name: 'SONAR', description: 'Enable sonar'},
{name: 'TELEMETRY', description: 'Enable FrSky- compatible telemetry output'},
{name: 'POWERMETER', description: 'Enable battery current monitoring'},
{name: 'VARIO', description: 'Enable VARIO'},
{name: '3D', description: 'Enable 3D mode (for use with reversible ESCs)'}
{name: 'SERVO_TILT', description: 'Servo gimbal'},
{name: 'SOFTSERIAL', description: 'Enable CPU based serial ports (configure port scenario first)'},
{name: 'GPS', description: 'GPS (configure port scenario first)'},
{name: 'FAILSAFE', description: 'Failsafe settings on RX signal loss'},
{name: 'SONAR', description: 'Sonar'},
{name: 'TELEMETRY', description: 'Telemetry output'},
{name: 'CURRENT_METER', description: 'Battery current monitoring'},
{name: '3D', description: '3D mode (for use with reversible ESCs)'},
{name: 'RX_PARALLEL_PWM', description: 'PWM RX input'},
{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');
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>');
element.find('input').attr('checked', bit_check(BF_CONFIG.features, i));
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>');
row_e.find('input').attr('checked', bit_check(BF_CONFIG.features, i));
features_e.append(element);
features_e.append(row_e);
}
// generate GPS
var gpsTypes = [
'NMEA',
'UBLOX',
'MTK_NMEA',
'MTK_BINARY',
'MAG_BINARY'
'UBLOX'
];
/*
var gpsBauds = [
'115200',
'57600',
@ -95,6 +97,7 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
'19200',
'9600'
];
*/
var gpsSbas = [
'Disabled',
@ -114,6 +117,7 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
MISC.gps_type = parseInt($(this).val());
});
/*
var gps_baudrate_e = $('select.gps_baudrate');
for (var i = 0; i < gpsBauds.length; i++) {
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 () {
MISC.gps_baudrate = parseInt($(this).val());
});
*/
var gps_ubx_sbas_e = $('select.gps_ubx_sbas');
for (var i = 0; i < gpsSbas.length; i++) {
@ -134,7 +139,7 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
// select current gps configuration
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);
// generate serial RX
@ -143,7 +148,7 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
'SPEKTRUM2048',
'SBUS',
'SUMD',
'MSP'
'SUMH'
];
var serialRX_e = $('select.serialRX');

View File

@ -41,7 +41,7 @@
<select class="hybrid_helper" name="rcmap_helper">
<option value="AETR1234">Default</option>
<option value="AETR1234">Futaba / Hitec</option>
<option value="TAER1234">JR / Spektrum</option>
<option value="TAER1234">JR / Spektrum / Graupner</option>
</select>
</div>
</div>