mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-03 11:24:10 +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;
|
static portTickType lastSysTime;
|
||||||
portTickType thisSysTime;
|
portTickType thisSysTime;
|
||||||
float dT;
|
float dT;
|
||||||
|
const bool TRANSMITTER_MODE_POSITION = false;
|
||||||
|
|
||||||
thisSysTime = xTaskGetTickCount();
|
thisSysTime = xTaskGetTickCount();
|
||||||
dT = (thisSysTime - lastSysTime) / portTICK_RATE_MS / 1000.0f;
|
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.End[PATHDESIRED_END_DOWN] = positionActual.Down;
|
||||||
pathDesired.Mode = PATHDESIRED_MODE_ENDPOINT;
|
pathDesired.Mode = PATHDESIRED_MODE_ENDPOINT;
|
||||||
PathDesiredSet(&pathDesired);
|
PathDesiredSet(&pathDesired);
|
||||||
} else {
|
} else if (TRANSMITTER_MODE_POSITION) {
|
||||||
PathDesiredData pathDesired;
|
PathDesiredData pathDesired;
|
||||||
PathDesiredGet(&pathDesired);
|
PathDesiredGet(&pathDesired);
|
||||||
pathDesired.End[PATHDESIRED_END_NORTH] += dT * -cmd->Pitch;
|
pathDesired.End[PATHDESIRED_END_NORTH] += dT * -cmd->Pitch;
|
||||||
|
Loading…
Reference in New Issue
Block a user