mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-25 09:15:42 +03:00
Empty Programming tab
This commit is contained in:
parent
554bec3606
commit
cdf7b82108
7 changed files with 71 additions and 2 deletions
54
tabs/programming.js
Normal file
54
tabs/programming.js
Normal file
|
@ -0,0 +1,54 @@
|
|||
'use strict';
|
||||
|
||||
TABS.programming = {};
|
||||
|
||||
TABS.programming.initialize = function (callback, scrollPosition) {
|
||||
let loadChainer = new MSPChainerClass(),
|
||||
saveChainer = new MSPChainerClass();
|
||||
|
||||
if (GUI.active_tab != 'programming') {
|
||||
GUI.active_tab = 'programming';
|
||||
googleAnalytics.sendAppView('Programming');
|
||||
}
|
||||
|
||||
loadChainer.setChain([
|
||||
mspHelper.loadLogicConditions,
|
||||
mspHelper.loadGlobalFunctions
|
||||
]);
|
||||
loadChainer.setExitPoint(loadHtml);
|
||||
loadChainer.execute();
|
||||
|
||||
saveChainer.setChain([
|
||||
mspHelper.sendLogicConditions,
|
||||
mspHelper.sendGlobalFunctions,
|
||||
mspHelper.saveToEeprom
|
||||
]);
|
||||
saveChainer.setExitPoint(reboot);
|
||||
|
||||
function reboot() {
|
||||
//noinspection JSUnresolvedVariable
|
||||
GUI.log(chrome.i18n.getMessage('configurationEepromSaved'));
|
||||
|
||||
GUI.tab_switch_cleanup(function() {
|
||||
MSP.send_message(MSPCodes.MSP_SET_REBOOT, false, false, function () {
|
||||
GUI.log(chrome.i18n.getMessage('deviceRebooting'));
|
||||
GUI.handleReconnect($('.tab_programming a'));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function loadHtml() {
|
||||
console.log(2);
|
||||
GUI.load("./tabs/programming.html", processHtml);
|
||||
}
|
||||
|
||||
function processHtml() {
|
||||
console.log(3);
|
||||
|
||||
GUI.content_ready(callback);
|
||||
}
|
||||
}
|
||||
|
||||
TABS.programming.cleanup = function (callback) {
|
||||
if (callback) callback();
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue