1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-13 03:19:54 +03:00

drop BF_CONFIG MSP frame

This commit is contained in:
Pawel Spychalski (DzikuVx) 2022-02-23 16:02:47 +01:00
parent c5d52b0a0a
commit 051e9fa00e
12 changed files with 55 additions and 172 deletions

View file

@ -1,4 +1,4 @@
/*global mspHelper,BF_CONFIG*/
/*global mspHelper,FEATURES,bit_clear,bit_set*/
'use strict';
var helper = helper || {};
@ -67,20 +67,20 @@ helper.features = (function() {
publicScope.execute = function(callback) {
exitPoint = callback;
mspHelper.loadBfConfig(privateScope.setBits);
mspHelper.loadFeatures(privateScope.setBits);
};
privateScope.setBits = function () {
for (const bit of toSet) {
BF_CONFIG.features = bit_set(BF_CONFIG.features, bit);
FEATURES = bit_set(FEATURES, bit);
}
for (const bit of toUnset) {
BF_CONFIG.features = bit_clear(BF_CONFIG.features, bit);
FEATURES = bit_clear(FEATURES, bit);
}
mspHelper.saveBfConfig(exitPoint);
mspHelper.saveFeatures(exitPoint);
}
return publicScope;