diff options
author | vng <viktor.govako@gmail.com> | 2012-11-09 01:54:01 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:46:51 +0300 |
commit | 58d629c8e214ba4b28671217b49000505ef0167d (patch) | |
tree | 8227b919d51f0b156fa9622d83013c9e30d026af /platform | |
parent | d83b3d3384389e571445b5e95ee1effe3b0f7604 (diff) |
Minor style changes.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/location.hpp | 8 | ||||
-rw-r--r-- | platform/location_service.cpp | 3 |
2 files changed, 5 insertions, 6 deletions
diff --git a/platform/location.hpp b/platform/location.hpp index 87261f68c1..bd742e333a 100644 --- a/platform/location.hpp +++ b/platform/location.hpp @@ -6,13 +6,11 @@ namespace location { - /// after this period we cont position as "too old" - static double const POSITION_TIMEOUT_SECONDS = 300.0; - enum TLocationError { - EDenied, - ENotSupported + ENoError = 0, + EDenied = 1, + EGPSIsOff = 2 }; enum TLocationSource diff --git a/platform/location_service.cpp b/platform/location_service.cpp index 1159599b1b..a24c8c8acd 100644 --- a/platform/location_service.cpp +++ b/platform/location_service.cpp @@ -21,10 +21,11 @@ class PositionFilter public: PositionFilter() : m_prevLocation(NULL) {} ~PositionFilter() { delete m_prevLocation; } + /// @return true if location should be sent to observers bool Passes(location::GpsInfo const & newLocation) { - if (time(NULL) - newLocation.m_timestamp > location::POSITION_TIMEOUT_SECONDS) + if (time(NULL) - newLocation.m_timestamp > 300.0) return false; bool passes = true; |