mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-02 10:24:11 +01:00
Disable transmitter updating PH location while using a tablet.
This commit is contained in:
parent
e43651e57e
commit
c4b82fa1fd
@ -724,6 +724,7 @@ static void updatePathDesired(ManualControlCommandData * cmd, bool changed)
|
||||
static portTickType lastSysTime;
|
||||
portTickType thisSysTime;
|
||||
float dT;
|
||||
const bool TRANSMITTER_MODE_POSITION = false;
|
||||
|
||||
thisSysTime = xTaskGetTickCount();
|
||||
dT = (thisSysTime - lastSysTime) / portTICK_RATE_MS / 1000.0f;
|
||||
@ -741,7 +742,7 @@ static void updatePathDesired(ManualControlCommandData * cmd, bool changed)
|
||||
pathDesired.End[PATHDESIRED_END_DOWN] = positionActual.Down;
|
||||
pathDesired.Mode = PATHDESIRED_MODE_ENDPOINT;
|
||||
PathDesiredSet(&pathDesired);
|
||||
} else {
|
||||
} else if (TRANSMITTER_MODE_POSITION) {
|
||||
PathDesiredData pathDesired;
|
||||
PathDesiredGet(&pathDesired);
|
||||
pathDesired.End[PATHDESIRED_END_NORTH] += dT * -cmd->Pitch;
|
||||
|
Loading…
Reference in New Issue
Block a user