From 41a9a2671a605f11b3ef18b9d8f5929d0c3d3493 Mon Sep 17 00:00:00 2001 From: breadoven <56191411+breadoven@users.noreply.github.com> Date: Tue, 21 May 2024 18:48:49 +0100 Subject: [PATCH] Update flightlog.js --- js/flightlog.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/flightlog.js b/js/flightlog.js index 3c4fa44..434edf8 100644 --- a/js/flightlog.js +++ b/js/flightlog.js @@ -11,7 +11,7 @@ */ function FlightLog(logData) { var - ADDITIONAL_COMPUTED_FIELD_COUNT = 9, /** attitude + PID_SUM + PID_ERROR + VELOCITY + WIND_VELOCITY + WIND_HEADING **/ + ADDITIONAL_COMPUTED_FIELD_COUNT = 10, /** attitude + PID_SUM + PID_ERROR + VELOCITY + WIND_VELOCITY + WIND_HEADING + HOME DISTANCE**/ that = this, logIndex = false, @@ -380,7 +380,7 @@ function FlightLog(logData) { case 'P': case 'I': //The parser re-uses the "frame" array so we must copy that data somewhere else - var numOutputFields = frame.length + slowFrameLength + ADDITIONAL_COMPUTED_FIELD_COUNT + gpsFrameLength; + var numOutputFields = frame.length + slowFrameLength + gpsFrameLength + ADDITIONAL_COMPUTED_FIELD_COUNT ; //Do we have a recycled chunk to copy on top of? if (chunk.frames[mainFrameIndex]) {