mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-15 20:35:19 +03:00
Update RSSI channel configuration.
This commit is contained in:
parent
38e9db1aca
commit
eda54f13db
6 changed files with 22 additions and 19 deletions
|
@ -510,8 +510,8 @@
|
||||||
"receiverChannelMapTitle": {
|
"receiverChannelMapTitle": {
|
||||||
"message": "You can define your own channel map by clicking inside the box"
|
"message": "You can define your own channel map by clicking inside the box"
|
||||||
},
|
},
|
||||||
"receiverRssiAux": {
|
"receiverRssiChannel": {
|
||||||
"message": "RSSI on AUX"
|
"message": "RSSI Channel"
|
||||||
},
|
},
|
||||||
"receiverRefreshRateTitle": {
|
"receiverRefreshRateTitle": {
|
||||||
"message": "Graph refresh rate"
|
"message": "Graph refresh rate"
|
||||||
|
|
|
@ -131,7 +131,7 @@ var MISC = {
|
||||||
gps_baudrate: 0,
|
gps_baudrate: 0,
|
||||||
gps_ubx_sbas: 0,
|
gps_ubx_sbas: 0,
|
||||||
multiwiicurrentoutput: 0,
|
multiwiicurrentoutput: 0,
|
||||||
rssi_aux_channel: 0,
|
rssi_channel: 0,
|
||||||
placeholder2: 0,
|
placeholder2: 0,
|
||||||
mag_declination: 0, // not checked
|
mag_declination: 0, // not checked
|
||||||
vbatscale: 0,
|
vbatscale: 0,
|
||||||
|
|
|
@ -321,7 +321,7 @@ var MSP = {
|
||||||
MISC.gps_baudrate = data.getUint8(11);
|
MISC.gps_baudrate = data.getUint8(11);
|
||||||
MISC.gps_ubx_sbas = data.getInt8(12);
|
MISC.gps_ubx_sbas = data.getInt8(12);
|
||||||
MISC.multiwiicurrentoutput = data.getUint8(13);
|
MISC.multiwiicurrentoutput = data.getUint8(13);
|
||||||
MISC.rssi_aux_channel = data.getUint8(14);
|
MISC.rssi_channel = data.getUint8(14);
|
||||||
MISC.placeholder2 = data.getUint8(15);
|
MISC.placeholder2 = data.getUint8(15);
|
||||||
MISC.mag_declination = data.getInt16(16, 1) / 10; // -18000-18000
|
MISC.mag_declination = data.getInt16(16, 1) / 10; // -18000-18000
|
||||||
MISC.vbatscale = data.getUint8(18, 1); // 10-200
|
MISC.vbatscale = data.getUint8(18, 1); // 10-200
|
||||||
|
@ -819,7 +819,7 @@ MSP.crunch = function (code) {
|
||||||
buffer.push(MISC.gps_baudrate);
|
buffer.push(MISC.gps_baudrate);
|
||||||
buffer.push(MISC.gps_ubx_sbas);
|
buffer.push(MISC.gps_ubx_sbas);
|
||||||
buffer.push(MISC.multiwiicurrentoutput);
|
buffer.push(MISC.multiwiicurrentoutput);
|
||||||
buffer.push(MISC.rssi_aux_channel);
|
buffer.push(MISC.rssi_channel);
|
||||||
buffer.push(MISC.placeholder2);
|
buffer.push(MISC.placeholder2);
|
||||||
buffer.push(lowByte(MISC.mag_declination * 10));
|
buffer.push(lowByte(MISC.mag_declination * 10));
|
||||||
buffer.push(highByte(MISC.mag_declination * 10));
|
buffer.push(highByte(MISC.mag_declination * 10));
|
||||||
|
|
|
@ -127,7 +127,7 @@
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
.tab-receiver .rssi_aux_wrapper {
|
.tab-receiver .rssi_channel_wrapper {
|
||||||
float: right;
|
float: right;
|
||||||
|
|
||||||
margin: 10px 0 0 0;
|
margin: 10px 0 0 0;
|
||||||
|
@ -137,7 +137,7 @@
|
||||||
border: 1px solid #8b8b8b;
|
border: 1px solid #8b8b8b;
|
||||||
border-left: 0;
|
border-left: 0;
|
||||||
}
|
}
|
||||||
.tab-receiver .rssi_aux_wrapper .head {
|
.tab-receiver .rssi_channel_wrapper .head {
|
||||||
height: 15px;
|
height: 15px;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@
|
||||||
border-bottom: 1px solid #8b8b8b;
|
border-bottom: 1px solid #8b8b8b;
|
||||||
background-color: #ececec;
|
background-color: #ececec;
|
||||||
}
|
}
|
||||||
.tab-receiver .rssi_aux_wrapper select {
|
.tab-receiver .rssi_channel_wrapper select {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 22px;
|
height: 22px;
|
||||||
|
|
||||||
|
|
|
@ -22,14 +22,10 @@
|
||||||
<td><input type="number" name="expo" step="0.01" min="0" max="1" /></td>
|
<td><input type="number" name="expo" step="0.01" min="0" max="1" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<div class="rssi_aux_wrapper">
|
<div class="rssi_channel_wrapper">
|
||||||
<div class="head" i18n="receiverRssiAux"></div>
|
<div class="head" i18n="receiverRssiChannel"></div>
|
||||||
<select name="rssi_aux_channel">
|
<select name="rssi_channel">
|
||||||
<option value="0">Disabled</option>
|
<!-- list generated here -->
|
||||||
<option value="1">1</option>
|
|
||||||
<option value="2">2</option>
|
|
||||||
<option value="3">3</option>
|
|
||||||
<option value="4">4</option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="rcmap_wrapper">
|
<div class="rcmap_wrapper">
|
||||||
|
|
|
@ -162,8 +162,15 @@ TABS.receiver.initialize = function (callback) {
|
||||||
$('input[name="rcmap"]').val($(this).val());
|
$('input[name="rcmap"]').val($(this).val());
|
||||||
});
|
});
|
||||||
|
|
||||||
// rssi aux
|
// rssi
|
||||||
$('select[name="rssi_aux_channel"]').val(MISC.rssi_aux_channel);
|
|
||||||
|
var rssi_channel_e = $('select.rssi_channel');
|
||||||
|
rssi_channel_e.append('<option value="0">Disabled</option>');
|
||||||
|
for (var i = 0; i < RC.active_channels; i++) {
|
||||||
|
rssi_channel_e.append('<option value="' + i + '">' + i + '</option>');
|
||||||
|
}
|
||||||
|
|
||||||
|
$('select[name="rssi_channel"]').val(MISC.rssi_channel);
|
||||||
|
|
||||||
// UI Hooks
|
// UI Hooks
|
||||||
// curves
|
// curves
|
||||||
|
@ -272,7 +279,7 @@ TABS.receiver.initialize = function (callback) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// catch rssi aux
|
// catch rssi aux
|
||||||
MISC.rssi_aux_channel = parseInt($('select[name="rssi_aux_channel"]').val());
|
MISC.rssi_channel = parseInt($('select[name="rssi_channel"]').val());
|
||||||
|
|
||||||
function save_rc_map() {
|
function save_rc_map() {
|
||||||
MSP.send_message(MSP_codes.MSP_SET_RCMAP, MSP.crunch(MSP_codes.MSP_SET_RCMAP), false, save_misc);
|
MSP.send_message(MSP_codes.MSP_SET_RCMAP, MSP.crunch(MSP_codes.MSP_SET_RCMAP), false, save_misc);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue