Skip to content

Commit

Permalink
Update pid_tuning.js
Browse files Browse the repository at this point in the history
- adjusted control point positions to avoid a step in the throttle curve
marc-frank committed Nov 16, 2024
1 parent 6fbe9da commit a36e556
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/js/tabs/pid_tuning.js
Original file line number Diff line number Diff line change
@@ -1462,11 +1462,11 @@ pid_tuning.initialize = function (callback) {
// math magic by englishman
const topY = canvasHeight * (1 - throttleScale);
const midX = canvasWidth * mid;
const midXl = midX * 0.5;
const midXr = (((canvasWidth - midX) * 0.5) + midX);
const midXl = midX * (1 - expo);
const midXr = ((canvasWidth - midX) * expo) + midX;
const midY = (canvasHeight - throttleScale) * (1 - hover);
const midYl = (canvasHeight - ((canvasHeight - midY) * 0.5 * (expo + 1)));
const midYr = (topY + ((midY - topY) * 0.5 *(expo + 1)));
const midYl = midY;
const midYr = midY;

let thrPercent = (FC.RC.channels[3] - 1000) / 1000,
thrpos = thrPercent <= mid

0 comments on commit a36e556

Please sign in to comment.