mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Location service: make distance and time threshold configurable
Right now the distance is always in meters, the mobile app doesn't deal with units at all, anyway. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
24404a401d
commit
76d0763527
7 changed files with 84 additions and 9 deletions
|
|
@ -123,6 +123,8 @@ struct preferences {
|
|||
geocoding_prefs_t geocoding;
|
||||
enum deco_mode deco_mode;
|
||||
short conservatism_level;
|
||||
int time_threshold;
|
||||
int distance_threshold;
|
||||
};
|
||||
enum unit_system_values {
|
||||
METRIC,
|
||||
|
|
|
|||
|
|
@ -1601,6 +1601,13 @@ void loadPreferences()
|
|||
// Subsurface webservice id is stored outside of the groups
|
||||
GET_TXT("subsurface_webservice_uid", userid);
|
||||
|
||||
// but the related time / distance threshold (only used in the mobile app)
|
||||
// are in their own group
|
||||
s.beginGroup("locationService");
|
||||
GET_INT("distance_threshold", distance_threshold);
|
||||
GET_INT("time_threshold", time_threshold);
|
||||
s.endGroup();
|
||||
|
||||
// GeoManagement
|
||||
s.beginGroup("geocoding");
|
||||
#ifdef DISABLED
|
||||
|
|
|
|||
|
|
@ -79,7 +79,9 @@ struct preferences default_prefs = {
|
|||
.category = { 0 }
|
||||
},
|
||||
.deco_mode = BUEHLMANN,
|
||||
.conservatism_level = 3
|
||||
.conservatism_level = 3,
|
||||
.distance_threshold = 1000,
|
||||
.time_threshold = 600
|
||||
};
|
||||
|
||||
int run_survey;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue