mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
manual control was mapping tx input as -180º -> 180º for AttitudeDesired.Yaw.
The Wiki (http://wiki.openpilot.org/Unit_Standards) states this should be 0 - 360º Made the code match the wiki. git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1463 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
f55e9cf819
commit
3c6d9d6976
@ -197,7 +197,14 @@ static void manualControlTask(void* parameters)
|
|||||||
{
|
{
|
||||||
attitude.Roll = cmd.Roll*stabSettings.RollMax;
|
attitude.Roll = cmd.Roll*stabSettings.RollMax;
|
||||||
attitude.Pitch = cmd.Pitch*stabSettings.PitchMax;
|
attitude.Pitch = cmd.Pitch*stabSettings.PitchMax;
|
||||||
attitude.Yaw = cmd.Yaw*180.0;
|
if (cmd.Yaw<0)
|
||||||
|
{
|
||||||
|
attitude.Yaw = 360 + (cmd.Yaw*180.0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
attitude.Yaw = (cmd.Yaw*180.0);
|
||||||
|
}
|
||||||
attitude.Throttle = cmd.Throttle*stabSettings.ThrottleMax;
|
attitude.Throttle = cmd.Throttle*stabSettings.ThrottleMax;
|
||||||
AttitudeDesiredSet(&attitude);
|
AttitudeDesiredSet(&attitude);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user