1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-13 19:40:22 +03:00

fix timers

This commit is contained in:
cTn 2014-10-01 15:18:37 +02:00
parent a580d94d10
commit 3312bf5df2
2 changed files with 4 additions and 4 deletions

View file

@ -128,7 +128,7 @@ STM32_protocol.prototype.initialize = function () {
self.receive_buffer = []; self.receive_buffer = [];
self.verify_hex = []; self.verify_hex = [];
self.upload_time_start = microtime(); self.upload_time_start = millitime();
self.upload_process_alive = false; self.upload_process_alive = false;
// reset progress bar to initial state // reset progress bar to initial state
@ -655,7 +655,7 @@ STM32_protocol.prototype.upload_procedure = function (step) {
// disconnect // disconnect
GUI.interval_remove('STM32_timeout'); // stop STM32 timeout timer (everything is finished now) GUI.interval_remove('STM32_timeout'); // stop STM32 timeout timer (everything is finished now)
console.log('Script finished after: ' + (microtime() - self.upload_time_start).toFixed(4) + ' seconds'); console.log('Script finished after: ' + ((millitime() - self.upload_time_start) / 1000) + ' seconds');
// close connection // close connection
serial.disconnect(function (result) { serial.disconnect(function (result) {

View file

@ -67,7 +67,7 @@ STM32DFU_protocol.prototype.connect = function (device, hex) {
self.hex = hex; self.hex = hex;
// reset and set some variables before we start // reset and set some variables before we start
self.upload_time_start = microtime(); self.upload_time_start = millitime();
self.verify_hex = []; self.verify_hex = [];
// reset progress bar to initial state // reset progress bar to initial state
@ -466,7 +466,7 @@ STM32DFU_protocol.prototype.upload_procedure = function (step) {
break; break;
case 99: case 99:
// cleanup // cleanup
console.log('Script finished after: ' + (microtime() - self.upload_time_start).toFixed(4) + ' seconds'); console.log('Script finished after: ' + ((millitime() - self.upload_time_start) / 1000) + ' seconds');
self.releaseInterface(0); self.releaseInterface(0);
break; break;