1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-23 16:25:22 +03:00

Bump API_VERSION_ACCEPTED and semver cleanup (#3104)

Firmware flasher: build config help icons style fix (#3092)

Co-authored-by: Ivan Efimov <gendalf44@yandex.ru>
This commit is contained in:
haslinghuis 2022-12-11 04:55:14 +01:00 committed by GitHub
parent 7df8d627e9
commit 867b59d204
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 1702 additions and 4113 deletions

View file

@ -532,34 +532,25 @@ CliAutoComplete._initTextcomplete = function() {
}),
]);
if (semver.gte(FC.CONFIG.flightControllerVersion, "4.0.0")) {
$textarea.textcomplete('register', [
strategy({ // "resource show all", from BF 4.0.0 onwards
match: /^(\s*resource\s+show\s+)(\w*)$/i,
search: function(term, callback) {
sendOnEnter = true;
searcher(term, callback, ['all'], 1, true);
},
template: highlighterPrefix,
}),
]);
}
$textarea.textcomplete('register', [
strategy({ // "resource show all", from BF 4.0.0 onwards
match: /^(\s*resource\s+show\s+)(\w*)$/i,
search: function(term, callback) {
sendOnEnter = true;
searcher(term, callback, ['all'], 1, true);
},
template: highlighterPrefix,
}),
]);
// diff command
const diffArgs1 = ["master", "profile", "rates", "all"];
const diffArgs2 = [];
if (semver.lt(FC.CONFIG.flightControllerVersion, "3.4.0")) {
diffArgs2.push("showdefaults");
} else {
// above 3.4.0
diffArgs2.push("defaults");
if (semver.gte(FC.CONFIG.flightControllerVersion, "4.0.0")) {
diffArgs1.push("hardware");
diffArgs2.push("bare");
}
}
// above 3.4.0
diffArgs2.push("defaults");
diffArgs1.push("hardware");
diffArgs2.push("bare");
diffArgs1.sort();
diffArgs2.sort();