| 138 | } |
| 139 | |
| 140 | void 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 | |
| 153 | void Framework::MyPositionModeChanged(location::EMyPositionMode mode, bool routingActive) |
| 154 | { |
no test coverage detected