mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-27 16:54:15 +01:00
Merge remote-tracking branch 'origin/next' into thread/OP-816_Setup_Wizard_Revo_Support
This commit is contained in:
commit
17b3b72158
@ -697,11 +697,8 @@ static void updateStabilizationDesired(ManualControlCommandData * cmd, ManualCon
|
|||||||
static void updatePathDesired(ManualControlCommandData * cmd, bool changed,bool home)
|
static void updatePathDesired(ManualControlCommandData * cmd, bool changed,bool home)
|
||||||
{
|
{
|
||||||
static portTickType lastSysTime;
|
static portTickType lastSysTime;
|
||||||
portTickType thisSysTime;
|
portTickType thisSysTime = xTaskGetTickCount();
|
||||||
float dT;
|
/* float dT = (thisSysTime - lastSysTime) / portTICK_RATE_MS / 1000.0f; */
|
||||||
|
|
||||||
thisSysTime = xTaskGetTickCount();
|
|
||||||
dT = (thisSysTime - lastSysTime) / portTICK_RATE_MS / 1000.0f;
|
|
||||||
lastSysTime = thisSysTime;
|
lastSysTime = thisSysTime;
|
||||||
|
|
||||||
if (home && changed) {
|
if (home && changed) {
|
||||||
@ -738,16 +735,15 @@ static void updatePathDesired(ManualControlCommandData * cmd, bool changed,bool
|
|||||||
pathDesired.EndingVelocity=0;
|
pathDesired.EndingVelocity=0;
|
||||||
pathDesired.Mode = PATHDESIRED_MODE_FLYENDPOINT;
|
pathDesired.Mode = PATHDESIRED_MODE_FLYENDPOINT;
|
||||||
PathDesiredSet(&pathDesired);
|
PathDesiredSet(&pathDesired);
|
||||||
|
/* Disable this section, until such time as proper discussion can be had about how to implement it for all types of crafts.
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
/*Disable this section, until such time as proper discussion can be had about how to implement it for all types of crafts.
|
|
||||||
PathDesiredData pathDesired;
|
PathDesiredData pathDesired;
|
||||||
PathDesiredGet(&pathDesired);
|
PathDesiredGet(&pathDesired);
|
||||||
pathDesired.End[PATHDESIRED_END_NORTH] += dT * -cmd->Pitch;
|
pathDesired.End[PATHDESIRED_END_NORTH] += dT * -cmd->Pitch;
|
||||||
pathDesired.End[PATHDESIRED_END_EAST] += dT * cmd->Roll;
|
pathDesired.End[PATHDESIRED_END_EAST] += dT * cmd->Roll;
|
||||||
pathDesired.Mode = PATHDESIRED_MODE_FLYENDPOINT;
|
pathDesired.Mode = PATHDESIRED_MODE_FLYENDPOINT;
|
||||||
PathDesiredSet(&pathDesired);
|
PathDesiredSet(&pathDesired);
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user