From a4076e9fc0d1a7f886bb0a9e472356b0b0a7593a Mon Sep 17 00:00:00 2001 From: Sean D'Epagnier Date: Tue, 1 May 2018 08:01:47 -0400 Subject: [PATCH] resolve heading commands --- src/pypilotDialog.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pypilotDialog.cpp b/src/pypilotDialog.cpp index e079e8f..2aa5d01 100644 --- a/src/pypilotDialog.cpp +++ b/src/pypilotDialog.cpp @@ -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); } }