From 10c8fc6bf3c24c4e2056a484ff8bca569104b724 Mon Sep 17 00:00:00 2001 From: cTn Date: Thu, 17 Apr 2014 01:05:25 +0200 Subject: [PATCH] adding labels, adding 500 deg scale for gyro --- tabs/sensors.html | 11 ++++++----- tabs/sensors.js | 8 ++++---- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/tabs/sensors.html b/tabs/sensors.html index e2d515542e..2317009388 100644 --- a/tabs/sensors.html +++ b/tabs/sensors.html @@ -7,11 +7,11 @@ update periods.

- Gyroscope - Accelerometer - Magnetometer - Barometer - Debug + + + + +
@@ -36,6 +36,7 @@
diff --git a/tabs/sensors.js b/tabs/sensors.js index 04e1d9d5ed..7f1ccc416b 100644 --- a/tabs/sensors.js +++ b/tabs/sensors.js @@ -157,7 +157,7 @@ function tab_initialize_sensors() { $('#content').load("./tabs/sensors.html", function load_html() { $('.tab-sensors .info .checkboxes input').change(function() { var enable = $(this).prop('checked'); - var index = $(this).index(); + var index = $(this).parent().index(); switch (index) { case 0: @@ -178,7 +178,7 @@ function tab_initialize_sensors() { } var checkboxes = []; - $('.tab-sensors .info input').each(function() { + $('.tab-sensors .info .checkboxes input').each(function() { checkboxes.push($(this).prop('checked')); }); @@ -189,7 +189,7 @@ function tab_initialize_sensors() { chrome.storage.local.get('graphs_enabled', function(result) { if (result.graphs_enabled) { - var checkboxes = $('.tab-sensors .info input'); + 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(); } @@ -302,7 +302,7 @@ function tab_initialize_sensors() { // fetch currently enabled plots var checkboxes = []; - $('.tab-sensors .info input').each(function() { + $('.tab-sensors .info .checkboxes input').each(function() { checkboxes.push($(this).prop('checked')); });