From e8c46d1f25ece397206fee2be488c44dbdcd1669 Mon Sep 17 00:00:00 2001 From: cTn Date: Wed, 17 Sep 2014 14:21:42 +0200 Subject: [PATCH] removing various elements from initial tab --- tabs/initial_setup.html | 34 ++------------------- tabs/initial_setup.js | 65 ----------------------------------------- 2 files changed, 3 insertions(+), 96 deletions(-) diff --git a/tabs/initial_setup.html b/tabs/initial_setup.html index faf40d0d34..eb4f166b9d 100644 --- a/tabs/initial_setup.html +++ b/tabs/initial_setup.html @@ -28,34 +28,6 @@ -
- - - -
@@ -129,8 +101,8 @@
- -
- +
+ +
\ No newline at end of file diff --git a/tabs/initial_setup.js b/tabs/initial_setup.js index 301e2bd2af..0605e448cc 100644 --- a/tabs/initial_setup.js +++ b/tabs/initial_setup.js @@ -46,71 +46,6 @@ TABS.initial_setup.initialize = function (callback) { // set heading in interactive block $('span.heading').text(chrome.i18n.getMessage('initialSetupheading', [0])); - - // UI hook handling mixer type change that swaps the image representation - $('.mixer select').change(function () { - var val = $(this).val(); - - var imageArray = [ - 'custom', // there is no type 0, we will use custom image as spacer - 'tri', - 'quadp', - 'quadx', - 'custom', // bi - 'custom', // gimbal - 'y6', - 'hex6p', - 'custom', // flying wing - 'y4', - 'hex6x', - 'octox', - 'octox', - 'octox', - 'airplane', - 'custom', - 'custom', - 'vtail', - 'custom', - 'custom', - 'custom', - 'custom', - 'custom', - ]; - - $('.mixer .preview').attr('src', './images/motor_order/' + imageArray[val] + '.svg'); - }); - - // update mixer type with current value - $('.mixer select').val(BF_CONFIG.mixerConfiguration).change(); - - // save - $('a.update').click(function () { - // update object - BF_CONFIG.mixerConfiguration = parseInt($('.mixer select').val()); - - function save_to_eeprom() { - MSP.send_message(MSP_codes.MSP_EEPROM_WRITE, false, false, reboot); - } - - function reboot() { - GUI.log(chrome.i18n.getMessage('initialSetupEepromSaved')); - - GUI.tab_switch_cleanup(function() { - MSP.send_message(MSP_codes.MSP_SET_REBOOT, false, false, reinitialize); - }); - } - - function reinitialize() { - GUI.log(chrome.i18n.getMessage('deviceRebooting')); - - MSP.send_message(MSP_codes.MSP_IDENT, false, false, function () { - GUI.log(chrome.i18n.getMessage('deviceReady')); - TABS.initial_setup.initialize(); - }); - } - - MSP.send_message(MSP_codes.MSP_SET_CONFIG, MSP.crunch(MSP_codes.MSP_SET_CONFIG), false, save_to_eeprom); - }); } else { // old stuff $('.COMPATIBILITY').show();