mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-18 22:05:13 +03:00
Cordova framework integration, Android support, mobile UI & options tab
Cordova integration and android platform : - Added cordova directory with required config - Added cordova applications generation in gulpfile - Added cordova development instructions - Used cordova plugins to simulate missing chrome api plugins (chrome.serial and chrome.fileSystem) - Added cordova clipboard support - Added android operating system and Cordova gui mode - Fixed some css and js files to make them working on Android as well as on computers - Added --skipdep argument to accelerate cordova build (gulp task) - Added a webview helper to help people to update the webview app of their device New options tab : - Added options tab replacing the options dropdown - Added option to switch between phones UI and computers UI Mobile interface and global interface improvements : - Simplified the structure of the header with flex css - Made headerbar and tab container responsive (compact headerbar and side menu) - All tabs are adapted to mobile interface (except firmware flasher) - The servos and adjustments tabs are not fully adapted but are "usable" - Improved header bar animation - Improved log expandation animation - Added swipe gesture to toggle side menu Fixes during the development : - Logo position - Dark mode - Auto connection - Error messages (cordova_chromeapi.js) - Responsive grid - Testing - Disconnection - Width of boxes inside the OSD tab - Fixed cli tab - OSD tab - Motor stop switch - White spaces in boxes - Dialogs size - Connect button state - Prevent tablet with a height larger than 575px to switch to computers ui - Fixed logging tab - Fixed code smell - Fixed yarn cordova plugin install issue - Fixed content_wrapper - Fixed vibrations when scrolling - Fixed scrolling bar alignment - Fixed dialogReportProblem height - Fixed rates logo - Fixed auto connection default value (true) - Fixed D to D max - Fixed dialogs Added required messages in locales/en/messages.json file Requested changes
This commit is contained in:
parent
ea880840a8
commit
4f93e54ae6
99 changed files with 9095 additions and 3015 deletions
|
@ -68,7 +68,7 @@ function initializeSerialBackend() {
|
|||
|
||||
// lock port select & baud while we are connecting / connected
|
||||
$('div#port-picker #port, div#port-picker #baud, div#port-picker #delay').prop('disabled', true);
|
||||
$('div.connect_controls a.connect_state').text(i18n.getMessage('connecting'));
|
||||
$('div.connect_controls div.connect_state').text(i18n.getMessage('connecting'));
|
||||
|
||||
serial.connect(portName, {bitrate: selected_baud}, onOpen);
|
||||
|
||||
|
@ -107,7 +107,7 @@ function initializeSerialBackend() {
|
|||
|
||||
// auto-connect
|
||||
ConfigStorage.get('auto_connect', function (result) {
|
||||
if (result.auto_connect === 'undefined' || result.auto_connect) {
|
||||
if (result.auto_connect === undefined || result.auto_connect) {
|
||||
// default or enabled by user
|
||||
GUI.auto_connect = true;
|
||||
|
||||
|
@ -147,6 +147,10 @@ function initializeSerialBackend() {
|
|||
}
|
||||
|
||||
function finishClose(finishedCallback) {
|
||||
if (GUI.isCordova()) {
|
||||
UI_PHONES.reset();
|
||||
}
|
||||
|
||||
var wasConnected = CONFIGURATOR.connectionValid;
|
||||
|
||||
analytics.sendEvent(analytics.EVENT_CATEGORIES.FLIGHT_CONTROLLER, 'Disconnected');
|
||||
|
@ -183,7 +187,7 @@ function finishClose(finishedCallback) {
|
|||
|
||||
// reset connect / disconnect button
|
||||
$('div.connect_controls a.connect').removeClass('active');
|
||||
$('div.connect_controls a.connect_state').text(i18n.getMessage('connect'));
|
||||
$('div.connect_controls div.connect_state').text(i18n.getMessage('connect'));
|
||||
|
||||
// reset active sensor indicators
|
||||
sensor_status(0);
|
||||
|
@ -309,7 +313,7 @@ function onOpen(openInfo) {
|
|||
}
|
||||
|
||||
function abortConnect() {
|
||||
$('div#connectbutton a.connect_state').text(i18n.getMessage('connect'));
|
||||
$('div#connectbutton div.connect_state').text(i18n.getMessage('connect'));
|
||||
$('div#connectbutton a.connect').removeClass('active');
|
||||
|
||||
// unlock port select & baud
|
||||
|
@ -409,6 +413,7 @@ function checkReportProblems() {
|
|||
});
|
||||
|
||||
problemDialog.showModal();
|
||||
$('#dialogReportProblems').scrollTop(0);
|
||||
}
|
||||
|
||||
processUid();
|
||||
|
@ -456,6 +461,10 @@ function finishOpen() {
|
|||
GUI.allowedTabs.splice(GUI.allowedTabs.indexOf('led_strip'), 1);
|
||||
}
|
||||
|
||||
if (GUI.isCordova()) {
|
||||
UI_PHONES.reset();
|
||||
}
|
||||
|
||||
onConnect();
|
||||
|
||||
GUI.selectDefaultTabWhenConnected();
|
||||
|
@ -474,7 +483,7 @@ function onConnect() {
|
|||
$('div#flashbutton a.flash').removeClass('active');
|
||||
}
|
||||
GUI.timeout_remove('connecting'); // kill connecting timer
|
||||
$('div#connectbutton a.connect_state').text(i18n.getMessage('disconnect')).addClass('active');
|
||||
$('div#connectbutton div.connect_state').text(i18n.getMessage('disconnect')).addClass('active');
|
||||
$('div#connectbutton a.connect').addClass('active');
|
||||
|
||||
$('#tabs ul.mode-disconnected').hide();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue