mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-15 04:15:28 +03:00
Empty Programming tab
This commit is contained in:
parent
554bec3606
commit
cdf7b82108
7 changed files with 71 additions and 2 deletions
|
@ -2225,6 +2225,9 @@
|
|||
"accCalibrationProcessing": {
|
||||
"message": "Processing..."
|
||||
},
|
||||
"tabProgramming": {
|
||||
"message": "Programming"
|
||||
},
|
||||
"tabAdvancedTuning": {
|
||||
"message": "Advanced tuning"
|
||||
},
|
||||
|
|
|
@ -39,7 +39,8 @@ var GUI_control = function () {
|
|||
'profiles',
|
||||
'advanced_tuning',
|
||||
'mission_control',
|
||||
'mixer'
|
||||
'mixer',
|
||||
'programming'
|
||||
];
|
||||
this.allowedTabs = this.defaultAllowedTabsWhenDisconnected;
|
||||
|
||||
|
|
|
@ -206,7 +206,9 @@
|
|||
<li class="tab_advanced_tuning">
|
||||
<a href="#" data-i18n="tabAdvancedTuning" class="tabicon ic_advanced" title="Advanced Tuning"></a>
|
||||
</li>
|
||||
|
||||
<li class="tab_programming">
|
||||
<a href="#" data-i18n="tabProgramming" class="tabicon ic_config" title="Programming"></a>
|
||||
</li>
|
||||
<li class="tab_receiver">
|
||||
<a href="#" data-i18n="tabReceiver" class="tabicon ic_rx" title="Receiver"></a>
|
||||
</li>
|
||||
|
|
4
main.js
4
main.js
|
@ -247,6 +247,10 @@ $(document).ready(function () {
|
|||
case 'advanced_tuning':
|
||||
TABS.advanced_tuning.initialize(content_ready);
|
||||
break;
|
||||
case 'programming':
|
||||
console.log(1);
|
||||
TABS.programming.initialize(content_ready);
|
||||
break;
|
||||
case 'cli':
|
||||
TABS.cli.initialize(content_ready);
|
||||
break;
|
||||
|
|
0
src/css/tabs/programming.css
Normal file
0
src/css/tabs/programming.css
Normal file
5
tabs/programming.html
Normal file
5
tabs/programming.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
<div class="tab-configuration tab-programming toolbar_fixed_bottom">
|
||||
<div class="content_wrapper" id="programming-main-content">
|
||||
<div class="tab_title" data-i18n="tabProgramming">Programming</div>
|
||||
</div>
|
||||
</div>
|
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