mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-16 21:05:30 +03:00
CF/BF - fix some usages of flightControllerVersion which should have
used MSP API version. FYI: 3.1.0 = api 1.31 - https://github.com/betaflight/betaflight/blob/v3.1.6/src/main/msp/msp_protocol.h 3.0.1 = api 1.21 - https://github.com/betaflight/betaflight/blob/v3.0.1/src/main/io/msp_protocol.h 3.0.0 = api 1.20 - https://github.com/betaflight/betaflight/blob/v3.0.0/src/main/io/msp_protocol.h 2.9.1 = api 1.16 - https://github.com/betaflight/betaflight/blob/v2.9.1/src/main/io/serial_msp.h 2.8.0 = api 1.16 - https://github.com/betaflight/betaflight/blob/v.2.8.0/src/main/io/serial_msp.h 2.4.0 = api 1.16 - https://github.com/betaflight/betaflight/blob/v2.4.0/src/main/io/serial_msp.h
This commit is contained in:
parent
6fb4a089e5
commit
b4936958f8
12 changed files with 115 additions and 98 deletions
|
@ -74,7 +74,7 @@ $(document).ready(function () {
|
|||
// Reset various UI elements
|
||||
$('span.i2c-error').text(0);
|
||||
$('span.cycle-time').text(0);
|
||||
if (CONFIG.flightControllerVersion !== '' && semver.gte(CONFIG.flightControllerVersion, "3.0.0"))
|
||||
if (semver.gte(CONFIG.apiVersion, "1.20.0"))
|
||||
$('span.cpu-load').text('');
|
||||
|
||||
// unlock port select & baud
|
||||
|
@ -271,12 +271,12 @@ function onConnect() {
|
|||
|
||||
$('#tabs ul.mode-connected').show();
|
||||
|
||||
if (semver.gte(CONFIG.flightControllerVersion, "2.9.1")) {
|
||||
if (semver.gte(CONFIG.apiVersion, "1.16.0")) {
|
||||
MSP.send_message(MSPCodes.MSP_STATUS_EX, false, false);
|
||||
} else {
|
||||
MSP.send_message(MSPCodes.MSP_STATUS, false, false);
|
||||
|
||||
if (semver.gte(CONFIG.flightControllerVersion, "2.4.0")) {
|
||||
if (CONFIG.flightControllerIdentifier === 'BTFL' && semver.gte(CONFIG.flightControllerVersion, "2.4.0")) {
|
||||
CONFIG.numProfiles = 2;
|
||||
$('.tab-pid_tuning select[name="profile"] .profile3').hide();
|
||||
} else {
|
||||
|
@ -460,10 +460,10 @@ function update_live_status() {
|
|||
|
||||
if (GUI.active_tab != 'cli') {
|
||||
MSP.send_message(MSPCodes.MSP_BOXNAMES, false, false);
|
||||
if (semver.gte(CONFIG.flightControllerVersion, "2.9.1"))
|
||||
MSP.send_message(MSPCodes.MSP_STATUS_EX, false, false);
|
||||
if (semver.gte(CONFIG.apiVersion, "1.32.0"))
|
||||
MSP.send_message(MSPCodes.MSP_STATUS_EX, false, false);
|
||||
else
|
||||
MSP.send_message(MSPCodes.MSP_STATUS, false, false);
|
||||
MSP.send_message(MSPCodes.MSP_STATUS, false, false);
|
||||
MSP.send_message(MSPCodes.MSP_ANALOG, false, false);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue