1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-21 15:25:22 +03:00

don't save reference to function we dont need

This commit is contained in:
cTn 2014-03-29 01:28:27 +01:00
parent 58d43c381b
commit 6f1b603d3e

View file

@ -421,7 +421,7 @@ STM32_protocol.prototype.upload_procedure = function(step) {
var bytes_flashed = 0; var bytes_flashed = 0;
var bytes_flashed_total = 0; // used for progress bar var bytes_flashed_total = 0; // used for progress bar
var write = function() { function write() {
if (bytes_flashed < self.hex.data[flashing_block].bytes) { if (bytes_flashed < self.hex.data[flashing_block].bytes) {
var bytes_to_write = ((bytes_flashed + 128) <= self.hex.data[flashing_block].bytes) ? 128 : (self.hex.data[flashing_block].bytes - bytes_flashed); var bytes_to_write = ((bytes_flashed + 128) <= self.hex.data[flashing_block].bytes) ? 128 : (self.hex.data[flashing_block].bytes - bytes_flashed);
@ -482,7 +482,7 @@ STM32_protocol.prototype.upload_procedure = function(step) {
self.upload_procedure(6); self.upload_procedure(6);
} }
} }
}; }
// start writing // start writing
write(); write();
@ -501,7 +501,7 @@ STM32_protocol.prototype.upload_procedure = function(step) {
self.verify_hex.push([]); self.verify_hex.push([]);
} }
var reading = function() { function reading() {
if (bytes_verified < self.hex.data[reading_block].bytes) { if (bytes_verified < self.hex.data[reading_block].bytes) {
var bytes_to_read = ((bytes_verified + 128) <= self.hex.data[reading_block].bytes) ? 128 : (self.hex.data[reading_block].bytes - bytes_verified); var bytes_to_read = ((bytes_verified + 128) <= self.hex.data[reading_block].bytes) ? 128 : (self.hex.data[reading_block].bytes - bytes_verified);
@ -579,7 +579,7 @@ STM32_protocol.prototype.upload_procedure = function(step) {
} }
} }
} }
}; }
// start reading // start reading
reading(); reading();