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

feat: move logging to esm modules

This commit is contained in:
Tomas Chmelevskij 2021-01-01 22:26:30 +04:00
parent ef68bb170f
commit 4d2c89990b
4 changed files with 12 additions and 7 deletions

View file

@ -1,7 +1,7 @@
'use strict';
import { millitime } from '../utils/common.js';
TABS.logging = {};
TABS.logging.initialize = function (callback) {
const logging = {};
logging.initialize = function (callback) {
if (GUI.active_tab != 'logging') {
GUI.active_tab = 'logging';
@ -319,6 +319,9 @@ TABS.logging.initialize = function (callback) {
}
};
TABS.logging.cleanup = function (callback) {
logging.cleanup = function (callback) {
if (callback) callback();
};
// TODO: only for transition to modules, drop this eventually
window.TABS.logging = logging;

View file

@ -79,8 +79,8 @@ export function generateVirtualApiVersions() {
}
}
// TODO: these are temp binding while transition to module happens
window.microtime = microtime;
window.millitime = millitime;
window.degToRad = degToRad;
window.bytesToSize = bytesToSize;
window.checkChromeRuntimeError = checkChromeRuntimeError;