mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-21 11:54:15 +01:00
LP-601 Use normal altitude sign above home for AboveAltitude condition parameter
This commit is contained in:
parent
fe5ca6d5c1
commit
9e788436d0
@ -601,8 +601,7 @@ static uint8_t conditionBelowError()
|
|||||||
/**
|
/**
|
||||||
* the AboveAltitude measures the flight altitude relative to home position
|
* the AboveAltitude measures the flight altitude relative to home position
|
||||||
* returns true if above critical altitude
|
* returns true if above critical altitude
|
||||||
* WARNING! Altitudes are always negative (down coordinate)
|
* Parameter 0: altitude in meters
|
||||||
* Parameter 0: altitude in meters (negative!)
|
|
||||||
*/
|
*/
|
||||||
static uint8_t conditionAboveAltitude()
|
static uint8_t conditionAboveAltitude()
|
||||||
{
|
{
|
||||||
@ -610,7 +609,7 @@ static uint8_t conditionAboveAltitude()
|
|||||||
|
|
||||||
PositionStateGet(&positionState);
|
PositionStateGet(&positionState);
|
||||||
|
|
||||||
if (positionState.Down <= pathAction.ConditionParameters[0]) {
|
if (-positionState.Down >= pathAction.ConditionParameters[0]) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -290,8 +290,7 @@ void opmap_edit_waypoint_dialog::setupConditionWidgets()
|
|||||||
ui->condParam1->setEnabled(true);
|
ui->condParam1->setEnabled(true);
|
||||||
ui->dsb_condParam1->setEnabled(true);
|
ui->dsb_condParam1->setEnabled(true);
|
||||||
ui->condParam1->setText("Altitude (m):");
|
ui->condParam1->setText("Altitude (m):");
|
||||||
ui->descriptionConditionLabel->setText(tr("<p>The AboveAltitude condition measures the flight altitude relative to home position, returns true if "
|
ui->descriptionConditionLabel->setText(tr("<p>The AboveAltitude condition measures the flight altitude relative to home position, returns true if above critical altitude.</p>"));
|
||||||
"above critical altitude.</p><p><b>WARNING!</b> altitudes set here are always <b>negative</b> if above Home. (down coordinate)</p>"));
|
|
||||||
break;
|
break;
|
||||||
case MapDataDelegate::ENDCONDITION_ABOVESPEED:
|
case MapDataDelegate::ENDCONDITION_ABOVESPEED:
|
||||||
ui->condParam1->setEnabled(true);
|
ui->condParam1->setEnabled(true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user