mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-21 07:15:18 +03:00
gps related configuration
This commit is contained in:
parent
ce53bc99f2
commit
ee0dec96d8
4 changed files with 112 additions and 5 deletions
|
@ -354,6 +354,15 @@
|
||||||
"configurationGPS": {
|
"configurationGPS": {
|
||||||
"message": "GPS"
|
"message": "GPS"
|
||||||
},
|
},
|
||||||
|
"configurationGPStype": {
|
||||||
|
"message": "Type"
|
||||||
|
},
|
||||||
|
"configurationGPSbaudrate": {
|
||||||
|
"message": "Baudrate"
|
||||||
|
},
|
||||||
|
"configurationGPSubxSbas": {
|
||||||
|
"message": "Ground Assistance Type"
|
||||||
|
},
|
||||||
"configurationSerialRX": {
|
"configurationSerialRX": {
|
||||||
"message": "Serial Receiver"
|
"message": "Serial Receiver"
|
||||||
},
|
},
|
||||||
|
|
|
@ -73,6 +73,22 @@
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
}
|
}
|
||||||
|
.tab-configuration .gps .line {
|
||||||
|
clear: left;
|
||||||
|
}
|
||||||
|
.tab-configuration .gps select {
|
||||||
|
float: left;
|
||||||
|
|
||||||
|
width: 100px;
|
||||||
|
height: 20px;
|
||||||
|
|
||||||
|
margin: 0 10px 5px 0;
|
||||||
|
|
||||||
|
border: 1px solid silver;
|
||||||
|
}
|
||||||
|
.tab-configuration .gps span {
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
.tab-configuration .serialRX {
|
.tab-configuration .serialRX {
|
||||||
width: 125px;
|
width: 125px;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="leftWrapper">
|
<div class="leftWrapper">
|
||||||
<div class="groupTitle" i18n="configurationMixer"></div>
|
<div class="groupTitle" i18n="configurationMixer"></div>
|
||||||
<select class="mixerList" size="10">
|
<select class="mixerList" size="10">
|
||||||
<!-- mixer list generated here -->
|
<!-- list generated here -->
|
||||||
</select>
|
</select>
|
||||||
<div class="mixerPreview">
|
<div class="mixerPreview">
|
||||||
<img src="./images/motor_order/custom.svg" />
|
<img src="./images/motor_order/custom.svg" />
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
<div class="rightWrapper">
|
<div class="rightWrapper">
|
||||||
<div class="groupTitle" i18n="configurationFeatures"></div>
|
<div class="groupTitle" i18n="configurationFeatures"></div>
|
||||||
<dl class="features">
|
<dl class="features">
|
||||||
<!-- feature list generated here -->
|
<!-- list generated here -->
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
<div class="clear-both"></div>
|
<div class="clear-both"></div>
|
||||||
|
@ -108,12 +108,31 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clear-both"></div>
|
<div class="clear-both"></div>
|
||||||
<div class="leftWrapper">
|
<div class="leftWrapper gps">
|
||||||
<div class="groupTitle" i18n="configurationGPS"></div>
|
<div class="groupTitle" i18n="configurationGPS"></div>
|
||||||
|
<div class="line">
|
||||||
|
<select class="gps_type">
|
||||||
|
<!-- list generated here -->
|
||||||
|
</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_ubx_sbas">
|
||||||
|
<!-- list generated here -->
|
||||||
|
</select>
|
||||||
|
<span i18n="configurationGPSubxSbas"></span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="rightWrapper">
|
<div class="rightWrapper">
|
||||||
<div class="groupTitle" i18n="configurationSerialRX"></div>
|
<div class="groupTitle" i18n="configurationSerialRX"></div>
|
||||||
<select class="serialRX" size="4">
|
<select class="serialRX" size="4">
|
||||||
|
<!-- list generated here -->
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="clear-both"></div>
|
<div class="clear-both"></div>
|
||||||
|
|
|
@ -119,6 +119,69 @@ TABS.configuration.initialize = function (callback) {
|
||||||
features_e.append(element);
|
features_e.append(element);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// generate GPS
|
||||||
|
var gpsTypes = [
|
||||||
|
'NMEA',
|
||||||
|
'UBLOX',
|
||||||
|
'MTK_NMEA',
|
||||||
|
'MTK_BINARY',
|
||||||
|
'MAG_BINARY'
|
||||||
|
];
|
||||||
|
|
||||||
|
var gpsBauds = [
|
||||||
|
'115200',
|
||||||
|
'57600',
|
||||||
|
'38400',
|
||||||
|
'19200',
|
||||||
|
'9600'
|
||||||
|
];
|
||||||
|
|
||||||
|
var gpsSbas = [
|
||||||
|
'Auto-detect',
|
||||||
|
'European EGNOS',
|
||||||
|
'North American WAAS',
|
||||||
|
'Japanese MSAS',
|
||||||
|
'Indian GAGAN'
|
||||||
|
];
|
||||||
|
|
||||||
|
var gps_type_e = $('select.gps_type');
|
||||||
|
for (var i = 0; i < gpsTypes.length; i++) {
|
||||||
|
gps_type_e.append('<option value="' + i + '">' + gpsTypes[i] + '</option>');
|
||||||
|
}
|
||||||
|
|
||||||
|
gps_type_e.change(function () {
|
||||||
|
var val = parseInt($(this).val());
|
||||||
|
|
||||||
|
MISC.gps_type = 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>');
|
||||||
|
}
|
||||||
|
|
||||||
|
gps_baudrate_e.change(function () {
|
||||||
|
var val = parseInt($(this).val());
|
||||||
|
|
||||||
|
MISC.gps_baudrate = val;
|
||||||
|
});
|
||||||
|
|
||||||
|
var gps_ubx_sbas_e = $('select.gps_ubx_sbas');
|
||||||
|
for (var i = 0; i < gpsSbas.length; i++) {
|
||||||
|
gps_ubx_sbas_e.append('<option value="' + i + '">' + gpsSbas[i] + '</option>');
|
||||||
|
}
|
||||||
|
|
||||||
|
gps_ubx_sbas_e.change(function () {
|
||||||
|
var val = parseInt($(this).val());
|
||||||
|
|
||||||
|
MISC.gps_ubx_sbas = val;
|
||||||
|
});
|
||||||
|
|
||||||
|
// select current gps configuration
|
||||||
|
gps_type_e.val(MISC.gps_type);
|
||||||
|
gps_baudrate_e.val(MISC.gps_baudrate);
|
||||||
|
gps_ubx_sbas_e.val(MISC.gps_ubx_sbas);
|
||||||
|
|
||||||
// generate serial RX
|
// generate serial RX
|
||||||
var serialRXtypes = [
|
var serialRXtypes = [
|
||||||
'SPEKTRUM1024',
|
'SPEKTRUM1024',
|
||||||
|
@ -129,10 +192,10 @@ TABS.configuration.initialize = function (callback) {
|
||||||
|
|
||||||
var serialRX_e = $('select.serialRX');
|
var serialRX_e = $('select.serialRX');
|
||||||
for (var i = 0; i < serialRXtypes.length; i++) {
|
for (var i = 0; i < serialRXtypes.length; i++) {
|
||||||
serialRX_e.append('<option value="' + (i) + '">' + serialRXtypes[i] + '</option>');
|
serialRX_e.append('<option value="' + i + '">' + serialRXtypes[i] + '</option>');
|
||||||
}
|
}
|
||||||
|
|
||||||
serialRX_e.change(function() {
|
serialRX_e.change(function () {
|
||||||
var val = parseInt($(this).val());
|
var val = parseInt($(this).val());
|
||||||
|
|
||||||
BF_CONFIG.serialrx_type = val;
|
BF_CONFIG.serialrx_type = val;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue