Skip to content

Commit

Permalink
GimbalVideoControl: allow multiple funcs per key
Browse files Browse the repository at this point in the history
Probably none of these make sense to combine, but the else-ifs made an
unwritten priority order that was not clear. This behavior is more
expected, and we clearly warn the user now on the settings page about
clashes.
  • Loading branch information
robertlong13 committed Jan 6, 2025
1 parent 774394a commit e659953
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Controls/GimbalVideoControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -462,43 +462,43 @@ private void HandleKeyPress(Keys key)
{
TakePicture();
}
else if (key == preferences.ToggleRecording)
if (key == preferences.ToggleRecording)
{
SetRecording(!isRecording);
}
else if (key == preferences.StartRecording)
if (key == preferences.StartRecording)
{
SetRecording(true);
}
else if (key == preferences.StopRecording)
if (key == preferences.StopRecording)
{
SetRecording(false);
}
else if (key == preferences.ToggleLockFollow)
if (key == preferences.ToggleLockFollow)
{
SetYawLock(!yaw_lock);
}
else if (key == preferences.SetLock)
if (key == preferences.SetLock)
{
SetYawLock(true);
}
else if (key == preferences.SetFollow)
if (key == preferences.SetFollow)
{
SetYawLock(false);
}
else if (key == preferences.Retract)
if (key == preferences.Retract)
{
Retract();
}
else if (key == preferences.Neutral)
if (key == preferences.Neutral)
{
Neutral();
}
else if (key == preferences.PointDown)
if (key == preferences.PointDown)
{
PointDown();
}
else if (key == preferences.Home)
if (key == preferences.Home)
{
Home();
}
Expand Down

0 comments on commit e659953

Please sign in to comment.