|
|
|
@ -28,7 +28,6 @@ function read_hex_file(data) {
|
|
|
|
|
|
|
|
|
|
switch (record_type) {
|
|
|
|
|
case 0x00: // data record
|
|
|
|
|
if (byte_count > 0) {
|
|
|
|
|
var crc = byte_count + parseInt(address.substr(0, 2), 16) + parseInt(address.substr(2, 2), 16) + record_type;
|
|
|
|
|
for (var needle = 0; needle < byte_count * 2; needle += 2) {
|
|
|
|
|
var num = parseInt(content.substr(needle, 2), 16); // get one byte in hex and convert it to decimal
|
|
|
|
@ -49,7 +48,6 @@ function read_hex_file(data) {
|
|
|
|
|
// break out of the for loop as crc is wrong anyway, we dont need to process any more data
|
|
|
|
|
i = data.length;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 0x01: // end of file record
|
|
|
|
|
result.end_of_file = true;
|
|
|
|
|