MCPcopy Create free account
hub / github.com/comaps/comaps / OnCompassUpdated

Method OnCompassUpdated

android/sdk/src/main/cpp/app/organicmaps/sdk/Framework.cpp:140–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140void Framework::OnCompassUpdated(location::CompassInfo const & info, bool forceRedraw)
141{
142 static double const COMPASS_THRESHOLD = math::DegToRad(1.0);
143
144 /// @todo Do not emit compass bearing too often.
145 /// Need to make more experiments in future.
146 if (forceRedraw || fabs(ang::GetShortestDistance(m_lastCompass, info.m_bearing)) >= COMPASS_THRESHOLD)
147 {
148 m_lastCompass = info.m_bearing;
149 m_work.OnCompassUpdate(info);
150 }
151}
152
153void Framework::MyPositionModeChanged(location::EMyPositionMode mode, bool routingActive)
154{

Calls 3

DegToRadFunction · 0.85
GetShortestDistanceFunction · 0.85
OnCompassUpdateMethod · 0.45

Tested by

no test coverage detected