diff --git a/changelog.html b/changelog.html index 3262682d..d73671b6 100644 --- a/changelog.html +++ b/changelog.html @@ -1,3 +1,7 @@ +05.08.2014 - 0.39 +

+ - UI enhancements for sensors tab
+

05.08.2014 - 0.38

- Bugfix for firmware flasher UI
diff --git a/manifest.json b/manifest.json index 12c55b8b..cdfdef73 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "minimum_chrome_version": "33", - "version": "0.38", + "version": "0.39", "author": "cTn", "name": "Baseflight - Configurator", diff --git a/tabs/sensors.css b/tabs/sensors.css index 47d7fc8b..c5738d13 100644 --- a/tabs/sensors.css +++ b/tabs/sensors.css @@ -12,7 +12,10 @@ } .tab-sensors .info input { vertical-align: middle; - margin: 0 10px 0 5px; + margin: 0 5px 0 15px; + } + .tab-sensors .info .first { + margin: 0 5px 0 0; } .tab-sensors .wrapper { display: none; diff --git a/tabs/sensors.html b/tabs/sensors.html index 341180d6..aef419c4 100644 --- a/tabs/sensors.html +++ b/tabs/sensors.html @@ -6,11 +6,11 @@ We recommend to only render graphs for sensors you are interested in while using reasonable update periods.

- - - - - + + + + +
diff --git a/tabs/sensors.js b/tabs/sensors.js index 7369892e..a1df4afd 100644 --- a/tabs/sensors.js +++ b/tabs/sensors.js @@ -168,6 +168,15 @@ function tab_initialize_sensors() { // translate to user-selected language localize(); + // disable graphs for sensors that are missing + var checkboxes = $('.tab-sensors .info .checkboxes input'); + if (!bit_check(CONFIG.activeSensors, 1)) { // baro + checkboxes.eq(3).prop('disabled', true); + } + if (!bit_check(CONFIG.activeSensors, 2)) { // mag + checkboxes.eq(2).prop('disabled', true); + } + $('.tab-sensors .info .checkboxes input').change(function() { var enable = $(this).prop('checked'); var index = $(this).parent().index(); @@ -204,7 +213,7 @@ function tab_initialize_sensors() { if (result.graphs_enabled) { var checkboxes = $('.tab-sensors .info .checkboxes input'); for (var i = 0; i < result.graphs_enabled.length; i++) { - checkboxes.eq(i).prop('checked', result.graphs_enabled[i]).change(); + checkboxes.eq(i).not(':disabled').prop('checked', result.graphs_enabled[i]).change(); } } else { $('.tab-sensors .info input:lt(4)').prop('checked', true).change();