mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-20 06:45:12 +03:00
Merge pull request #1891 from Asizon/maxRateWarning
High rates warning message to prevent desyncs
This commit is contained in:
commit
f4f6da02c6
3 changed files with 12 additions and 0 deletions
|
@ -2104,6 +2104,12 @@ TABS.pid_tuning.updateRatesLabels = function() {
|
|||
{value: parseInt(maxAngularVelPitch), balloon: function() {drawBalloonLabel(stickContext, maxAngularVelPitch, curveWidth, rateScale * (maxAngularVel - parseInt(maxAngularVelPitch)), 'right', BALLOON_COLORS.pitch, balloonsDirty);}},
|
||||
{value: parseInt(maxAngularVelYaw), balloon: function() {drawBalloonLabel(stickContext, maxAngularVelYaw, curveWidth, rateScale * (maxAngularVel - parseInt(maxAngularVelYaw)), 'right', BALLOON_COLORS.yaw, balloonsDirty);}}
|
||||
];
|
||||
// show warning message if any axis angular velocity exceeds 1800d/s
|
||||
const MAX_RATE_WARNING = 1800;
|
||||
const warningRates = (parseInt(maxAngularVelRoll) > MAX_RATE_WARNING || parseInt(maxAngularVelPitch) > MAX_RATE_WARNING
|
||||
|| parseInt(maxAngularVelYaw) > MAX_RATE_WARNING);
|
||||
$('.maxRateWarning').toggle(warningRates);
|
||||
|
||||
// and sort them in descending order so the largest value is at the top always
|
||||
balloons.sort(function(a,b) {return (b.value - a.value)});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue