This repository has been archived by the owner on Apr 21, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Glint_Prefix.pch
81 lines (57 loc) · 2.95 KB
/
Glint_Prefix.pch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//
// Prefix header for all source files of the 'Glint' target in the 'Glint' project
//
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#endif
// Distance filter for CLLocationManager (in meters)
#define FILTER_DISTANCE 5.0
// If no updates from CLLocationManager for this long (in seconds), force an update anyway.
#define FORCE_POSITION_UPDATE_INTERVAL 60.0
// How often to refresh the main screen display (in seconds)
#define DISPLAY_THREAD_INTERVAL 0.5
// How often to refresh background status (in seconds)
#define STATUS_THREAD_INTERVAL 0.4
// How often to check if it's time to record a new trackpoint (in seconds)
#define MEASUREMENT_THREAD_INTERVAL 5.0
// How long to wait before locking buttons with slider
#define SLIDER_DELAY_INTERVAL 10.0
// Radius of the compass rose (in pixels)
#define COMPASS_RADIUS 250.0
// Constant in the currentSpeed formula:
// currentSpeed = (SOFTNESS_FACTOR * newCurrentSpeed + oldCurrentSpeed) / (1 + SOFTNESS_FACTOR)
#define SOFTNESS_FACTOR 0.33
// How often to save a new trackpoint, when recording
#define USERPREF_MEASUREMENT_INTERVAL [[NSUserDefaults standardUserDefaults] integerForKey:@"average_interval"]
// Minimum (maximum?) horizontal acc uracy to accept GPS data
#define USERPREF_MINIMUM_PRECISION [[NSUserDefaults standardUserDefaults] integerForKey:@"gps_minprec"]
// Which unit set to use. See unitsets.plist.
#define USERPREF_UNITSET [[NSUserDefaults standardUserDefaults] integerForKey:@"units"]
// Whether to turn on the proximity sensor or not.
#define USERPREF_ENABLE_PROXIMITY [[NSUserDefaults standardUserDefaults] boolForKey:@"enable_proximity"]
// Estimate time over what distance (in km), for the main screen.
#define USERPREF_ESTIMATE_DISTANCE [[NSUserDefaults standardUserDefaults] doubleForKey:@"estimate_distance"]
// Email address to send recorded tracks to.
#define USERPREF_EMAIL_ADDRESS [[NSUserDefaults standardUserDefaults] stringForKey:@"email_address"]
// Whether to play sounds or not.
#define USERPREF_SOUNDS [[NSUserDefaults standardUserDefaults] boolForKey:@"sounds_enabled"]
// Whether to play sounds or not.
#define USERPREF_CURRENTPAGE [[NSUserDefaults standardUserDefaults] integerForKey:@"current_page"]
// Length of a "lap"
#define USERPREF_LAPLENGTH [[NSUserDefaults standardUserDefaults] integerForKey:@"lap_length"]
// Whether to continue recording at startup
#define USERPREF_RESTART_RECORDING [[NSUserDefaults standardUserDefaults] boolForKey:@"restart_recording"]
// What type of map to display
#define USERPREF_MAP_TYPE [[NSUserDefaults standardUserDefaults] integerForKey:@"map_type"]
// Maximum time with unsaved trackpoints (seconds)
#define AUTO_COMMIT_INTERVAL 60.0f
// Run a thread to fake movement, for debugging and screenshotting
// #define FAKE_MOVEMENT
// Run long (slow) unit tests that simulate movement.
// #define LONG_UNIT_TESTS
#ifdef DEBUG
#define debug_NSLog(format, ...) NSLog(format, ## __VA_ARGS__)
#else
#define debug_NSLog(format, ...)
#endif