Skip to content

Commit

Permalink
fix feedforward weight
Browse files Browse the repository at this point in the history
  • Loading branch information
ctzsnooze committed Jun 10, 2021
1 parent 0b9b5a3 commit 9ea32f9
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions js/flightlog_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,8 @@ var FlightLogParser = function(logData) {
vbat_pid_gain : "vbat_pid_compensation",
yaw_accel_limit : "yawRateAccelLimit",
yaw_lowpass_hz : "yaw_lpf_hz",
feedforward_transition : "ff_transition"
feedforward_transition : "ff_transition",
feedforward_weight : "ff_weight"
},

frameTypes,
Expand Down Expand Up @@ -757,22 +758,13 @@ var FlightLogParser = function(logData) {
case "magPID":
that.sysConfig.magPID = parseCommaSeparatedString(fieldValue,3); //[parseInt(fieldValue, 10), null, null];
break;

case "ff_weight":
// Add it to the end of the rollPID, pitchPID and yawPID
var ffValues = parseCommaSeparatedString(fieldValue);
that.sysConfig["rollPID"].push(ffValues[0]);
that.sysConfig["pitchPID"].push(ffValues[1]);
that.sysConfig["yawPID"].push(ffValues[2]);
break;
case "feedforward_weight":
// Add it to the end of the rollPID, pitchPID and yawPID
var ffValues = parseCommaSeparatedString(fieldValue);
that.sysConfig["rollPID"].push(ffValues[0]);
that.sysConfig["pitchPID"].push(ffValues[1]);
that.sysConfig["yawPID"].push(ffValues[2]);
break;

/* End of CSV packed values */

case "vbatcellvoltage":
Expand Down

0 comments on commit 9ea32f9

Please sign in to comment.