Skip to content

Commit

Permalink
resolve heading commands
Browse files Browse the repository at this point in the history
  • Loading branch information
seandepagnier committed May 1, 2018
1 parent d543f26 commit a4076e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pypilotDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,8 @@ void pypilotDialog::OnControlAngle( wxCommandEvent& event )
m_stCommand->SetLabel(wxString::Format("%.1f", cmd));
m_HeadingCommandUpdate = wxDateTime::UNow();
if(m_bTrueNorthMode && m_cMode->GetSelection() == 0 /*compass*/)
cmd = heading_resolve_pos(cmd - m_pypilot_pi.m_declination);
cmd -= m_pypilot_pi.m_declination;
cmd = heading_resolve_pos(cmd);
m_pypilot_pi.m_client.set("ap.heading_command", cmd);
}
}
Expand Down

0 comments on commit a4076e9

Please sign in to comment.