mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-13 03:19:54 +03:00
Convert to CommonJS Modules - Part 2
This commit is contained in:
parent
91f1699659
commit
38727c54a8
21 changed files with 729 additions and 694 deletions
|
@ -21,6 +21,11 @@ helper.features.execute(function () {
|
|||
});
|
||||
|
||||
*/
|
||||
|
||||
const mspHelper = require('./msp/MSPHelper');
|
||||
const BitHelper = require('./bitHelper');
|
||||
const FC = require('./fc');
|
||||
|
||||
var features = (function() {
|
||||
|
||||
let publicScope = {},
|
||||
|
@ -46,7 +51,7 @@ var features = (function() {
|
|||
publicScope.updateUI = function ($container, values) {
|
||||
$container.find('[data-bit].feature').each(function () {
|
||||
let $this = $(this);
|
||||
$this.prop('checked', bit_check(values, $this.attr("data-bit")));
|
||||
$this.prop('checked', BitHelper.bit_check(values, $this.attr("data-bit")));
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -71,11 +76,11 @@ var features = (function() {
|
|||
privateScope.setBits = function () {
|
||||
|
||||
for (const bit of toSet) {
|
||||
FEATURES = bit_set(FEATURES, bit);
|
||||
FC.FEATURES = BitHelper.bit_set(FC.FEATURES, bit);
|
||||
}
|
||||
|
||||
for (const bit of toUnset) {
|
||||
FEATURES = bit_clear(FEATURES, bit);
|
||||
FC.FEATURES = BitHelper.bit_clear(FC.FEATURES, bit);
|
||||
}
|
||||
|
||||
mspHelper.saveFeatures(exitPoint);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue