33DashboardInstrument_Compass::DashboardInstrument_Compass(
34 wxWindow* parent, wxWindowID
id, wxString title,
38 SetOptionMarker(5, DIAL_MARKER_SIMPLE, 2);
39 SetOptionLabel(20, DIAL_LABEL_ROTATED);
40 SetOptionMainValue(
"%.0f", DIAL_POSITION_INSIDE);
43void DashboardInstrument_Compass::SetData(
DASH_CAP st,
double data,
46 if (std::isnan(data)) m_gps_wd =
true;
48 if (st == m_main_value_cap) {
50 m_angle_start =
static_cast<int>(-data);
53 m_main_value_unit =
unit;
54 }
else if (st == m_extra_value_cap) {
56 m_extra_value_unit =
unit;
61void DashboardInstrument_Compass::DrawBackground(wxGCDC* dc) {
62 DrawBoat(dc, m_cx, m_cy, m_radius);
64 DrawCompassRose(dc, m_cx, m_cy,
static_cast<int>(0.7 * m_radius),
65 m_angle_start,
true, m_Properties);
68void DashboardInstrument_Compass::DrawForeground(wxGCDC* dc) {
Dashboard compass instrument.