From ae6d902b8890c374bd1a4b36d845f34ce83e5969 Mon Sep 17 00:00:00 2001 From: cTn Date: Thu, 5 Dec 2013 11:03:29 +0100 Subject: [PATCH] fixing buffer overflow --- tabs/initial_setup.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tabs/initial_setup.js b/tabs/initial_setup.js index 3550bce5a6..61e33e28fc 100644 --- a/tabs/initial_setup.js +++ b/tabs/initial_setup.js @@ -84,12 +84,13 @@ function tab_initialize_initial_setup() { // During this period MCU won't be able to process any serial commands because its locked in a for/while loop // until this operation finishes, sending more commands through data_poll() will result in serial buffer overflow - // which will in turn result in MSP CRC error (don't be alarmed) + GUI.interval_pause('initial_setup_data_pull'); send_message(MSP_codes.MSP_ACC_CALIBRATION, MSP_codes.MSP_ACC_CALIBRATION); GUI.timeout_add('button_reset', function() { + GUI.interval_resume('initial_setup_data_pull'); self.removeClass('calibrating'); - }, 1000); + }, 2000); } });