1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

LP-601 Use normal altitude sign above home for AboveAltitude condition parameter

This commit is contained in:
Laurent Lalanne 2018-10-07 23:16:25 +02:00
parent fe5ca6d5c1
commit 9e788436d0
2 changed files with 3 additions and 5 deletions

View File

@ -601,8 +601,7 @@ static uint8_t conditionBelowError()
/**
* the AboveAltitude measures the flight altitude relative to home position
* returns true if above critical altitude
* WARNING! Altitudes are always negative (down coordinate)
* Parameter 0: altitude in meters (negative!)
* Parameter 0: altitude in meters
*/
static uint8_t conditionAboveAltitude()
{
@ -610,7 +609,7 @@ static uint8_t conditionAboveAltitude()
PositionStateGet(&positionState);
if (positionState.Down <= pathAction.ConditionParameters[0]) {
if (-positionState.Down >= pathAction.ConditionParameters[0]) {
return true;
}
return false;

View File

@ -290,8 +290,7 @@ void opmap_edit_waypoint_dialog::setupConditionWidgets()
ui->condParam1->setEnabled(true);
ui->dsb_condParam1->setEnabled(true);
ui->condParam1->setText("Altitude (m):");
ui->descriptionConditionLabel->setText(tr("<p>The AboveAltitude condition measures the flight altitude relative to home position, returns true if "
"above critical altitude.</p><p><b>WARNING!</b> altitudes set here are always <b>negative</b> if above Home. (down coordinate)</p>"));
ui->descriptionConditionLabel->setText(tr("<p>The AboveAltitude condition measures the flight altitude relative to home position, returns true if above critical altitude.</p>"));
break;
case MapDataDelegate::ENDCONDITION_ABOVESPEED:
ui->condParam1->setEnabled(true);