Skip to content

Commit

Permalink
Update flightlog_parser.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mmosca authored Aug 14, 2024
1 parent b37998d commit 3caedd0
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions js/flightlog_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -465,22 +465,18 @@ var FlightLogParser = function(logData) {
fieldName = asciiArrayToString(stream.data.subarray(lineStart, separatorPos));
fieldValue = asciiArrayToString(stream.data.subarray(separatorPos + 1, lineEnd));

//console.log("parsed field: '" + fieldName + "' = " + fieldValue);
switch (fieldName) {
case "I interval":
that.sysConfig.frameIntervalI = parseInt(fieldValue, 10);
if (that.sysConfig.frameIntervalI < 1)
that.sysConfig.frameIntervalI = 1;
console.log("fameIntervalI: " + that.sysConfig.frameIntervalI);
break;
case "P interval":
matches = fieldValue.match(/(\d+)\/(\d+)/);
console.log("P interval" + fieldValue);

if (matches) {
that.sysConfig.frameIntervalPNum = parseInt(matches[1], 10);
that.sysConfig.frameIntervalPDenom = parseInt(matches[2], 10);
console.log("fameIntervalP: " + that.sysConfig.frameIntervalPNum + "/" + that.sysConfig.frameIntervalPDenom);
}
break;
case "Data version":
Expand Down Expand Up @@ -533,7 +529,6 @@ var FlightLogParser = function(logData) {
case "acc_1G":
case "debug_mode":
that.sysConfig[fieldName] = parseInt(fieldValue, 10);
console.log("+++ " + fieldName + ": "+that.sysConfig[fieldName] + "("+fieldValue+")");
break;

/*
Expand Down

0 comments on commit 3caedd0

Please sign in to comment.