@@ -27,40 +27,44 @@ import (
27
27
28
28
// Our actual application config
29
29
type AlpacaScopeConfig struct {
30
- TelescopeProtocol string `json:"TelescopeProtocol"`
31
- TelescopeMount string `json:"TelescopeMount"`
32
- AutoTracking bool `json:"AutoTracking"`
33
- ListenIp string `json:"ListenIp"`
34
- ListenPort string `json:"ListenPort"`
35
- AscomAuto bool `json:"AscomAuto"`
36
- AscomIp string `json:"AscomIp"`
37
- AscomPort string `json:"AscomPort"`
38
- AscomTelescope string `json:"AscomTelescope"`
39
- HighPrecisionLX200 bool `json:"HighPrecisionLX200"`
40
- isRunning bool
41
- Quit chan bool `json:"-"` // have to hide since public
42
- EnableButtons chan bool `json:"-"`
43
- store * SettingsStore // platform specific
30
+ TelescopeProtocol string `json:"TelescopeProtocol"`
31
+ TelescopeMount string `json:"TelescopeMount"`
32
+ AutoTracking bool `json:"AutoTracking"`
33
+ ListenIp string `json:"ListenIp"`
34
+ ListenPort string `json:"ListenPort"`
35
+ AscomAuto bool `json:"AscomAuto"`
36
+ AutoConnectAttempts string `json:"AutoConnectAttempts"`
37
+ AutoStart bool `json:"AutoStart"`
38
+ AscomIp string `json:"AscomIp"`
39
+ AscomPort string `json:"AscomPort"`
40
+ AscomTelescope string `json:"AscomTelescope"`
41
+ HighPrecisionLX200 bool `json:"HighPrecisionLX200"`
42
+ isRunning bool
43
+ Quit chan bool `json:"-"` // have to hide since public
44
+ EnableButtons chan bool `json:"-"`
45
+ store * SettingsStore // platform specific
44
46
}
45
47
46
48
// Loads the config from our SettingsStore (if it exists),
47
49
// otherwise will return our defaults. Errors are informational
48
50
// so you know why loading settings failed.
49
51
func NewAlpacaScopeConfig () * AlpacaScopeConfig {
50
52
config := & AlpacaScopeConfig {
51
- TelescopeProtocol : "NexStar" ,
52
- TelescopeMount : "Alt-Az" ,
53
- HighPrecisionLX200 : false ,
54
- AutoTracking : true ,
55
- AscomAuto : true ,
56
- ListenIp : "All-Interfaces/0.0.0.0" ,
57
- ListenPort : "4030" ,
58
- AscomIp : "127.0.0.1" ,
59
- AscomPort : alpaca .DEFAULT_PORT_STR ,
60
- AscomTelescope : "0" ,
61
- Quit : make (chan bool ),
62
- EnableButtons : make (chan bool ),
63
- store : NewSettingsStore (),
53
+ TelescopeProtocol : "NexStar" ,
54
+ TelescopeMount : "Alt-Az" ,
55
+ HighPrecisionLX200 : false ,
56
+ AutoTracking : true ,
57
+ AscomAuto : true ,
58
+ AutoConnectAttempts : "3" ,
59
+ AutoStart : false ,
60
+ ListenIp : "All-Interfaces/0.0.0.0" ,
61
+ ListenPort : "4030" ,
62
+ AscomIp : "127.0.0.1" ,
63
+ AscomPort : alpaca .DEFAULT_PORT_STR ,
64
+ AscomTelescope : "0" ,
65
+ Quit : make (chan bool ),
66
+ EnableButtons : make (chan bool ),
67
+ store : NewSettingsStore (),
64
68
}
65
69
66
70
return config
0 commit comments