From 3228625de1ff6ee02e4d8e45f8050fb58fbaa331 Mon Sep 17 00:00:00 2001 From: tricopterY Date: Fri, 18 Dec 2015 13:43:05 +1100 Subject: [PATCH 1/8] jBox Tooltip implementation using i18n_title instead of jBox:Content - reduces DOM element counts --- _locales/en/messages.json | 6 ++++++ js/gui.js | 3 +-- tabs/failsafe.css | 3 +++ tabs/failsafe.html | 28 +++++++--------------------- tabs/failsafe.js | 10 ++++------ 5 files changed, 21 insertions(+), 29 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 75608872..666e4eec 100755 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1349,6 +1349,12 @@ "failsafeChannelFallbackSettingsHelp": { "message": "These settings are applied to invalid individual AUX channels or to all channels when entering stage 1. Note: values are saved in steps of 25usec, so small changes disappear" }, + "failsafeChannelFallbackSettingsAuto": { + "message": "Auto means Roll, Pitch and Yaw to center and Throttle low. Hold means maintain the last good value received" + }, + "failsafeChannelFallbackSettingsHold": { + "message": "Hold means maintain the last good value received. Set means the value given here will be used" + }, "failsafeStageTwoSettingsTitle": { "message": "Stage 2 - Settings" }, diff --git a/js/gui.js b/js/gui.js index 3707fcd3..c93bda8e 100644 --- a/js/gui.js +++ b/js/gui.js @@ -287,8 +287,7 @@ GUI_control.prototype.content_ready = function (callback) { }); $('.cf_tip').each(function() { - $(this).jBox('Tooltip', { - content: $(this).children('.cf_tooltiptext'), + $(this).jBox('Tooltip', { delayOpen: 100, delayClose: 100, position: { diff --git a/tabs/failsafe.css b/tabs/failsafe.css index 551ddc33..e878a55e 100644 --- a/tabs/failsafe.css +++ b/tabs/failsafe.css @@ -214,7 +214,10 @@ } .tab-failsafe .channelname { + float:left; margin-right: 3px; + width:60%; + padding-top: 2px; } .tab-failsafe .note { diff --git a/tabs/failsafe.html b/tabs/failsafe.html index ee768da0..1b0951b0 100644 --- a/tabs/failsafe.html +++ b/tabs/failsafe.html @@ -39,9 +39,7 @@
-
-
-
+
@@ -59,9 +57,7 @@
-
-
-
+
@@ -82,9 +78,7 @@
-
-
-
+
@@ -92,25 +86,19 @@
-
-
-
+
-
-
-
+
-
-
-
+
@@ -133,9 +121,7 @@ -
-
-
+
diff --git a/tabs/failsafe.js b/tabs/failsafe.js index 891bbed9..d9d4b2b5 100644 --- a/tabs/failsafe.js +++ b/tabs/failsafe.js @@ -126,11 +126,10 @@ TABS.failsafe.initialize = function (callback, scrollPosition) { if (i < channelNames.length) { fullChannels_e.append('\
\ -
\ +
\ ' + channelNames[i] + '\
\ -
\ - \ +
\ \ \ \ From a2841632295c021b4b30c9a72d8e1de04c9c89d8 Mon Sep 17 00:00:00 2001 From: tricopterY Date: Fri, 18 Dec 2015 14:29:09 +1100 Subject: [PATCH 2/8] jBox Tooltip implementation using i18n_title instead of jBox:Content - reduces DOM element counts --- tabs/failsafe.css | 14 +++++++++++++- tabs/failsafe.js | 16 ++++++++-------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/tabs/failsafe.css b/tabs/failsafe.css index e878a55e..8bf37ddf 100644 --- a/tabs/failsafe.css +++ b/tabs/failsafe.css @@ -216,7 +216,19 @@ .tab-failsafe .channelname { float:left; margin-right: 3px; - width:60%; + width:20%; + padding-top: 2px; +} + +.tab-failsafe .aux-value { + float:left; + width:15%; + padding-top: 2px; +} + +.tab-failsafe .aux-set { + float:left; + width:10%; padding-top: 2px; } diff --git a/tabs/failsafe.js b/tabs/failsafe.js index d9d4b2b5..e213e673 100644 --- a/tabs/failsafe.js +++ b/tabs/failsafe.js @@ -129,29 +129,29 @@ TABS.failsafe.initialize = function (callback, scrollPosition) {
\ ' + channelNames[i] + '\
\ -
\ - \ \ \ \
\ -
\ +
\
\ '); } else { fullChannels_e.append('\
\ -
\ - ' + chrome.i18n.getMessage("controlAxisAux" + (aux_index++)) + '\ +
\ + ' + chrome.i18n.getMessage("controlAxisAux" + (aux_index++)) + '\ ' + auxAssignment[aux_assignment_index++] + '\
\ -
\ - \ \ \ \
\ -
\ +
\
\ '); } From 3fcc7d5daec49dfd5f3a6ee56185eef774b558e6 Mon Sep 17 00:00:00 2001 From: tricopterY Date: Fri, 18 Dec 2015 14:35:09 +1100 Subject: [PATCH 3/8] jBox Tooltip implementation using i18n_title instead of jBox:Content - reduces DOM element counts --- tabs/failsafe.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tabs/failsafe.css b/tabs/failsafe.css index 8bf37ddf..e88c3929 100644 --- a/tabs/failsafe.css +++ b/tabs/failsafe.css @@ -216,7 +216,7 @@ .tab-failsafe .channelname { float:left; margin-right: 3px; - width:20%; + width:60%; padding-top: 2px; } @@ -228,7 +228,7 @@ .tab-failsafe .aux-set { float:left; - width:10%; + width:15%; padding-top: 2px; } From c46fc423a7fa37774eb91cb42664e2e009ef6e83 Mon Sep 17 00:00:00 2001 From: tricopterY Date: Fri, 18 Dec 2015 17:13:11 +1100 Subject: [PATCH 4/8] jBox Tooltip implementation using i18n_title instead of jBox:Content - reduces DOM element counts --- tabs/failsafe.css | 26 ++++++++++++++++---------- tabs/failsafe.js | 17 ++++++++--------- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/tabs/failsafe.css b/tabs/failsafe.css index e88c3929..a157ba50 100644 --- a/tabs/failsafe.css +++ b/tabs/failsafe.css @@ -213,23 +213,29 @@ margin-right: 3px; } -.tab-failsafe .channelname { - float:left; - margin-right: 3px; +.tab-failsafe .channelprimary { + float:left; + width:60%; +} + +.tab-failsafe .channelauxiliary { + float:left; width:60%; padding-top: 2px; } -.tab-failsafe .aux-value { - float:left; - width:15%; - padding-top: 2px; +.tab-failsafe .channelname { + margin-right: 3px; } -.tab-failsafe .aux-set { +.tab-failsafe .channelsetting { float:left; - width:15%; - padding-top: 2px; + width:25%; +} + +.tab-failsafe .auxiliary { + float:left; + width:15%; } .tab-failsafe .note { diff --git a/tabs/failsafe.js b/tabs/failsafe.js index e213e673..620c22fb 100644 --- a/tabs/failsafe.js +++ b/tabs/failsafe.js @@ -126,32 +126,31 @@ TABS.failsafe.initialize = function (callback, scrollPosition) { if (i < channelNames.length) { fullChannels_e.append('\
\ -
\ +
\ ' + channelNames[i] + '\
\ -
\ - \ \ \ \
\ -
\
\ '); } else { fullChannels_e.append('\
\ -
\ - ' + chrome.i18n.getMessage("controlAxisAux" + (aux_index++)) + '\ +
\ + ' + chrome.i18n.getMessage("controlAxisAux" + (aux_index++)) + '\ ' + auxAssignment[aux_assignment_index++] + '\
\ -
\ - \ \ \ \
\ -
\ +
\
\ '); } From 50f1269e0ba5f9513e9baad2144b07538545726c Mon Sep 17 00:00:00 2001 From: tricopterY Date: Fri, 18 Dec 2015 21:36:31 +1100 Subject: [PATCH 5/8] jBox Tooltip implementation using i18n_title instead of jBox:Content - reduces DOM element counts --- _locales/en/messages.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 666e4eec..8faac4aa 100755 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -965,7 +965,7 @@ "message": "Motor Test Mode Notice:
Moving the sliders will cause the motors to spin up.
In order to prevent injury remove ALL propellers before using this feature.
" }, "motorsEnableControl": { - "message": "I understand the risks, propellors are removed - Enable motor control." + "message": "I understand the risks, propellers are removed - Enable motor control." }, "sensorsInfo": { @@ -1199,7 +1199,7 @@ "message": "Recovery / Lost communication" }, "firmwareFlasherRecoveryText": { - "message": "If you have lost comminication with your board follow these steps to restore communication:
  • Power off
  • Enable 'No reboot sequence', enable 'Full chip erase'.
  • Jumper the BOOT pins or hold BOOT button.
  • Power on (activity LED will NOT flash if done correctly).
  • Release BOOT button if your FC has one.
  • Flash with correct firmware (using manual baud rate if specified in your FC's manual).
  • Power off.
  • Remove BOOT jumper.
  • Power on (activity LED should flash).
  • Connect normally.
" + "message": "If you have lost communication with your board follow these steps to restore communication:
  • Power off
  • Enable 'No reboot sequence', enable 'Full chip erase'.
  • Jumper the BOOT pins or hold BOOT button.
  • Power on (activity LED will NOT flash if done correctly).
  • Release BOOT button if your FC has one.
  • Flash with correct firmware (using manual baud rate if specified in your FC's manual).
  • Power off.
  • Remove BOOT jumper.
  • Power on (activity LED should flash).
  • Connect normally.
" }, "firmwareFlasherButtonLeave": { "message": "Leave Firmware Flasher" From 6b3b5a6d9434e08e6a00e241c37a494a453bf558 Mon Sep 17 00:00:00 2001 From: Dominic Clifton Date: Thu, 7 Jan 2016 00:28:31 +0100 Subject: [PATCH 6/8] Fix transponsed roll/yaw icons (relative to mixer diagrams) --- images/icons/cf_icon_roll.svg | 14 ++++++++++---- images/icons/cf_icon_yaw.svg | 14 ++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/images/icons/cf_icon_roll.svg b/images/icons/cf_icon_roll.svg index c8e7d8fb..17901652 100644 --- a/images/icons/cf_icon_roll.svg +++ b/images/icons/cf_icon_roll.svg @@ -4,9 +4,15 @@ viewBox="0 0 85 85" style="enable-background:new 0 0 85 85;" xml:space="preserve"> - - + + + + + + + + diff --git a/images/icons/cf_icon_yaw.svg b/images/icons/cf_icon_yaw.svg index 17901652..c8e7d8fb 100644 --- a/images/icons/cf_icon_yaw.svg +++ b/images/icons/cf_icon_yaw.svg @@ -4,15 +4,9 @@ viewBox="0 0 85 85" style="enable-background:new 0 0 85 85;" xml:space="preserve"> - - - - - - - - + + From 14135cb64eadd01d3ba9889bfe56780b65e25e50 Mon Sep 17 00:00:00 2001 From: Dominic Clifton Date: Thu, 7 Jan 2016 00:29:31 +0100 Subject: [PATCH 7/8] Cleanup board/sensor alignment UI. --- _locales/en/messages.json | 15 ++++++++++++--- tabs/configuration.css | 24 ++++++++++++++++-------- tabs/configuration.html | 39 ++++++++++++++++++++++++--------------- tabs/configuration.js | 6 +++--- 4 files changed, 55 insertions(+), 29 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index f31a6249..b114f935 100755 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -470,13 +470,22 @@ "message": "Board and Sensor Alignment" }, "configurationBoardAlignmentRoll": { - "message": "Roll Adjustment [deg]" + "message": "Roll Degrees" }, "configurationBoardAlignmentPitch": { - "message": "Pitch Adjustment [deg]" + "message": "Pitch Degrees" }, "configurationBoardAlignmentYaw": { - "message": "Yaw Adjustment [deg]" + "message": "Yaw Degrees" + }, + "configurationSensorAlignmentGyro": { + "message": "Gyroscope Alignment" + }, + "configurationSensorAlignmentAcc": { + "message": "Accelerometer Alignment" + }, + "configurationSensorAlignmentMag": { + "message": "Compass/Magnetometer Alignment" }, "configurationAccelTrims": { "message": "Accelerometer Trim" diff --git a/tabs/configuration.css b/tabs/configuration.css index 4024c8c0..00bee329 100644 --- a/tabs/configuration.css +++ b/tabs/configuration.css @@ -202,7 +202,9 @@ border-bottom: 1px solid #ddd; } -.tab-configuration .number { +.tab-configuration .number, +.tab-configuration .select + { margin-bottom: 5px; clear: left; padding-bottom: 5px; @@ -211,7 +213,8 @@ float: left; } -.tab-configuration .number:last-child { +.tab-configuration .number:last-child, +.tab-configuration .select:last-child { border-bottom: none; padding-bottom: 0px; margin-bottom: 0px; @@ -361,12 +364,12 @@ } .tab-configuration .board select { - float: left; - width: 100%; + /*float: left;*/ + width: 50%; height: 20px; margin: 0 0px 2px 0; border: 1px solid silver; - brder-radius:3px; + border-radius:3px; } @@ -385,7 +388,7 @@ height: 20px; margin: 0 0px 2px 0; border: 1px solid silver; - brder-radius:3px; + border-radius:3px; margin-bottom: 20px; margin-top:3px; @@ -441,12 +444,17 @@ } .tab-configuration .sensoralignment { - width: 40%; + width: 60%; float: left; } .tab-configuration .board_align_content { - width: 60%; + width: 40%; + float: left; +} + +.tab-configuration .sensoralignment span { + width: 50%; float: left; } diff --git a/tabs/configuration.html b/tabs/configuration.html index e3cf87ad..a6b50151 100644 --- a/tabs/configuration.html +++ b/tabs/configuration.html @@ -123,23 +123,32 @@
-
- +
+
-
- +
+
-
- +
+
diff --git a/tabs/configuration.js b/tabs/configuration.js index 61aca7cf..dc35c38b 100644 --- a/tabs/configuration.js +++ b/tabs/configuration.js @@ -231,9 +231,9 @@ TABS.configuration.initialize = function (callback, scrollPosition) { $('.tab-configuration .sensoralignment').hide(); } else { for (var i = 0; i < alignments.length; i++) { - orientation_gyro_e.append(''); - orientation_acc_e.append(''); - orientation_mag_e.append(''); + orientation_gyro_e.append(''); + orientation_acc_e.append(''); + orientation_mag_e.append(''); } orientation_gyro_e.val(SENSOR_ALIGNMENT.align_gyro); orientation_acc_e.val(SENSOR_ALIGNMENT.align_acc); From 3993af0d8cf43fdd6fbb4e242dbc7000cf0bcd1f Mon Sep 17 00:00:00 2001 From: Dominic Clifton Date: Thu, 7 Jan 2016 00:40:34 +0100 Subject: [PATCH 8/8] Convert a few more tooltips to use i18n_title. --- tabs/configuration.html | 8 ++------ tabs/pid_tuning.html | 4 +--- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/tabs/configuration.html b/tabs/configuration.html index a6b50151..763c1929 100644 --- a/tabs/configuration.html +++ b/tabs/configuration.html @@ -97,9 +97,7 @@
-
-
-
+
@@ -292,9 +290,7 @@
-
-
-
+
diff --git a/tabs/pid_tuning.html b/tabs/pid_tuning.html index 1f6365e5..26af8890 100755 --- a/tabs/pid_tuning.html +++ b/tabs/pid_tuning.html @@ -134,9 +134,7 @@
-
-
-
+