Skip to content

Commit 6d145ae

Browse files
committed
Add AutoConnect feature to GUI
* GUI supports auto-connecting on start #55 * No longer allow changing settings while running * Support changing the number of discovery connect attempts * Upgrade to Fyne v2.2.2 * Refactor some of the code into their own files * Tag v2.3.0 Fixes: #55
1 parent 73f8754 commit 6d145ae

File tree

8 files changed

+987
-304
lines changed

8 files changed

+987
-304
lines changed

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# AlpacaScope Changelog
22

3+
## v2.3.0 - 2022-07-21
4+
5+
Added:
6+
7+
- GUI now supports auto-connect on startup #55
8+
9+
Changed:
10+
11+
- Options are now disabled while running
12+
313
## v2.2.3 - 2021-12-06
414

515
Fixed:

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ endif
99
BUILDINFOSDET ?=
1010
PROGRAM_ARGS ?=
1111

12-
PROJECT_VERSION := 2.2.3
12+
PROJECT_VERSION := 2.3.0
1313
BUILD_ID := 1
1414
DOCKER_REPO := synfinatic
1515
PROJECT_NAME := alpacascope

go.mod

+4-5
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@ module github.com/synfinatic/alpacascope
33
go 1.16
44

55
require (
6-
fyne.io/fyne/v2 v2.1.1
6+
fyne.io/fyne/v2 v2.2.2
77
github.com/go-resty/resty/v2 v2.3.0
88
github.com/kr/text v0.2.0 // indirect
99
github.com/libp2p/go-reuseport v0.1.0
1010
github.com/mattn/go-colorable v0.1.8
11-
github.com/sirupsen/logrus v1.7.0
11+
github.com/sirupsen/logrus v1.8.1
1212
github.com/spf13/pflag v1.0.5
13-
github.com/stretchr/testify v1.7.0
14-
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c
13+
github.com/stretchr/testify v1.7.2
14+
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad
1515
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
16-
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect
1716
)

go.sum

+588-32
Large diffs are not rendered by default.

gui/config.go

+31-27
Original file line numberDiff line numberDiff line change
@@ -27,40 +27,44 @@ import (
2727

2828
// Our actual application config
2929
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
4446
}
4547

4648
// Loads the config from our SettingsStore (if it exists),
4749
// otherwise will return our defaults. Errors are informational
4850
// so you know why loading settings failed.
4951
func NewAlpacaScopeConfig() *AlpacaScopeConfig {
5052
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(),
6468
}
6569

6670
return config

0 commit comments

Comments
 (0)