Skip to content

Commit

Permalink
Added curves settings for axis_s log fields (for airplanes) (#789)
Browse files Browse the repository at this point in the history
added curves settings for axis_s log fields (for airplanes)
  • Loading branch information
demvlad authored Nov 23, 2024
1 parent 8e9e411 commit 65dbdc3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/flightlog_fields_presenter.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ const FRIENDLY_FIELD_NAMES = {
"axisF[0]": "PID Feedforward [roll]",
"axisF[1]": "PID Feedforward [pitch]",
"axisF[2]": "PID Feedforward [yaw]",

"axisS[all]": "PID S",
"axisS[0]": "PID S [roll]",
"axisS[1]": "PID S [pitch]",
"axisS[2]": "PID S [yaw]",

//Virtual field
"axisSum[all]": "PID Sum",
Expand Down Expand Up @@ -1540,6 +1545,9 @@ FlightLogFieldPresenter.decodeFieldToFriendly = function (
case "axisF[0]":
case "axisF[1]":
case "axisF[2]":
case "axisS[0]":
case "axisS[1]":
case "axisS[2]":
return `${flightLog.getPIDPercentage(value).toFixed(1)} %`;

case "accSmooth[0]":
Expand Down Expand Up @@ -2222,6 +2230,9 @@ FlightLogFieldPresenter.ConvertFieldValue = function (
case "axisF[0]":
case "axisF[1]":
case "axisF[2]":
case "axisS[0]":
case "axisS[1]":
case "axisS[2]":
return toFriendly
? flightLog.getPIDPercentage(value)
: value / flightLog.getPIDPercentage(1.0);
Expand Down

0 comments on commit 65dbdc3

Please sign in to comment.