Revert "[tracks] Fixed ending points."

This reverts commit 64f50d4e49.
This commit is contained in:
Konstantin Pastbin
2025-08-31 15:58:44 +07:00
parent de305e1a87
commit 2dce119370
11 changed files with 88 additions and 83 deletions

View File

@@ -1,16 +1,20 @@
#include "map/gps_tracker.hpp"
#include "map/framework.hpp"
#include "platform/platform.hpp"
#include "platform/settings.hpp"
#include "base/file_name_utils.hpp"
#include <string>
#include "defines.hpp"
using namespace std::chrono;
namespace
{
std::string_view constexpr kEnabledKey = "GpsTrackingEnabled";
char const kEnabledKey[] = "GpsTrackingEnabled";
inline std::string GetFilePath()
{
@@ -68,6 +72,11 @@ bool GpsTracker::IsEmpty() const
return m_track.IsEmpty();
}
size_t GpsTracker::GetTrackSize() const
{
return m_track.GetSize();
}
TrackStatistics GpsTracker::GetTrackStatistics() const
{
return m_track.GetTrackStatistics();
@@ -94,3 +103,9 @@ void GpsTracker::OnLocationUpdated(location::GpsInfo const & info)
return;
m_track.AddPoint(info);
}
void GpsTracker::ForEachTrackPoint(GpsTrackCallback const & callback) const
{
CHECK(callback != nullptr, ("Callback should be provided"));
m_track.ForEachPoint(callback);
}