1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-24 00:35:26 +03:00

Use firmware options on introduction (#3900)

* Use firmware options

* Enable telemetry for CRSF, GHST and FPORT

* Add supported date

* Only add telemetry when not included in firmware

* Reduce brain overload
This commit is contained in:
Mark Haslinghuis 2024-04-21 01:38:56 +02:00 committed by GitHub
parent 16f70a5be8
commit 37fada11ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 36 additions and 20 deletions

View file

@ -10,7 +10,7 @@ import MSP from "./msp";
import MSPCodes from "./msp/MSPCodes";
import PortUsage from "./port_usage";
import PortHandler from "./port_handler";
import CONFIGURATOR, { API_VERSION_1_45, API_VERSION_1_46, API_VERSION_1_47 } from "./data_storage";
import CONFIGURATOR, { API_VERSION_1_45, API_VERSION_1_46 } from "./data_storage";
import UI_PHONES from "./phones_ui";
import { bit_check } from './bit.js';
import { sensor_status, have_sensor } from "./sensor_helpers";
@ -353,7 +353,7 @@ function onOpen(openInfo) {
gui_log(i18n.getMessage('buildInfoReceived', [FC.CONFIG.buildInfo]));
// retrieve build options from the flight controller
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_47)) {
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_46)) {
FC.processBuildOptions();
}
@ -540,7 +540,7 @@ function checkReportProblems() {
}
async function processBuildOptions() {
const supported = semver.satisfies(FC.CONFIG.apiVersion, `${API_VERSION_1_45} - ${API_VERSION_1_46}`);
const supported = semver.eq(FC.CONFIG.apiVersion, API_VERSION_1_45);
// firmware 1_45 or higher is required to support cloud build options
// firmware 1_46 or higher retrieves build options from the flight controller