1
0
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:
James Cotton 2012-08-12 17:51:52 -05:00
parent e43651e57e
commit c4b82fa1fd

View File

@ -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;