Skip to content

Commit 31ae623

Browse files
fix (backend, main): remove auto open tabs
1 parent a193e92 commit 31ae623

File tree

7 files changed

+1
-64
lines changed

7 files changed

+1
-64
lines changed

backend/cmd/config.toml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
# 3. Toggle the Fault Propagation to your needs (true/false)
88
# 4. Check the TCP configuration and make sure to use the needed Keep Alive settings
99

10-
# Control Station general configuration
11-
[app]
12-
automatic_window_opening = "" # Leave blank to open no windows (<blank>, ethernet-view, control-station, both)
1310

1411
# Vehicle Configuration
1512
[vehicle]
@@ -40,13 +37,6 @@ keep_alive_ms = 1000 # Keep-alive interval in milliseconds
4037
ring_buffer_size = 64 # Size of the ring buffer for incoming packets (number of packets, not bytes)
4138
packet_chan_size = 16 # Size of the channel buffer
4239

43-
# TFTP Configuration
44-
[tftp]
45-
block_size = 131072 # TFTP block size in bytes (128kB)
46-
retries = 3 # Maximum number of retries before aborting transfer
47-
timeout_ms = 5000 # Timeout between retries in milliseconds
48-
backoff_factor = 2 # Backoff multiplier for retry delays
49-
enable_progress = true # Enable progress callbacks during transfers
5040

5141
# Logger Configuration
5242
[logging]

backend/cmd/dev-config.toml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
# 4. Check the TCP configuration and make sure to use the needed Keep Alive settings
1010

1111
# Control Station general configuration
12-
[app]
13-
automatic_window_opening = "" # Leave blank to open no windows (<blank>, ethernet-view, control-station, both)
1412

1513
# Vehicle Configuration
1614
[vehicle]
@@ -64,16 +62,6 @@ programable_boards = "/uploadableBoards"
6462
connections = "/backend"
6563
files = "/"
6664

67-
# TFTP Configuration
68-
[tftp]
69-
block_size = 512 # TFTP block size (512 or 1468 bytes)
70-
retries = 3 # Number of retries for TFTP operations
71-
timeout_ms = 5000 # Timeout for TFTP operations in milliseconds
72-
backoff_factor = 2 # Backoff factor for retries
73-
enable_progress = true # Enable progress updates during transfers
74-
75-
76-
7765
# Logging Configuration
7866
[logging]
7967
time_unit = "us" # Time unit for log timestamps (ns, us, ms, s)

backend/cmd/main.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,6 @@ func main() {
135135
}
136136
}
137137

138-
// Open browser tabs
139-
openBrowserTabs(config)
140-
141138
// Wait for interrupt signal to gracefully shutdown the backend
142139
interrupt := make(chan os.Signal, 1)
143140
signal.Notify(interrupt, os.Interrupt)

backend/cmd/orchestrator.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import (
1515
"github.com/HyperloopUPV-H8/h9-backend/pkg/logger"
1616
data_logger "github.com/HyperloopUPV-H8/h9-backend/pkg/logger/data"
1717
order_logger "github.com/HyperloopUPV-H8/h9-backend/pkg/logger/order"
18-
"github.com/pkg/browser"
1918
trace "github.com/rs/zerolog/log"
2019
)
2120

@@ -148,16 +147,3 @@ func setUpLogger(config config.Config) (*logger.Logger, abstraction.SubloggersMa
148147
return loggerHandler, subloggers
149148

150149
}
151-
152-
func openBrowserTabs(config config.Config) {
153-
154-
switch config.App.AutomaticWindowOpening {
155-
case "ethernet-view":
156-
browser.OpenURL("http://" + config.Server["ethernet-view"].Addr)
157-
case "control-station":
158-
browser.OpenURL("http://" + config.Server["control-station"].Addr)
159-
case "both":
160-
browser.OpenURL("http://" + config.Server["ethernet-view"].Addr)
161-
browser.OpenURL("http://" + config.Server["control-station"].Addr)
162-
}
163-
}

backend/go.mod

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ require (
1010
github.com/jmaralo/sntp v0.0.0-20240116111937-45a0a3419272
1111
github.com/pelletier/go-toml/v2 v2.0.7
1212
github.com/pin/tftp/v3 v3.0.0
13-
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c
1413
github.com/rs/zerolog v1.29.0
1514
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1
1615
)
@@ -41,6 +40,4 @@ require (
4140
gopkg.in/warnings.v0 v0.1.2 // indirect
4241
)
4342

44-
require (
45-
golang.org/x/net v0.38.0 // indirect
46-
)
43+
require golang.org/x/net v0.38.0 // indirect

backend/go.sum

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcej
2323
github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM=
2424
github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=
2525
github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=
26-
github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs=
27-
github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw=
2826
github.com/gliderlabs/ssh v0.3.7 h1:iV3Bqi942d9huXnzEF2Mt+CY9gLu8DNM4Obd+8bODRE=
2927
github.com/gliderlabs/ssh v0.3.7/go.mod h1:zpHEXBstFnQYtGnB8k8kQLol82umzn/2/snG7alWVD8=
3028
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI=
@@ -46,8 +44,6 @@ github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
4644
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
4745
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
4846
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
49-
github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY=
50-
github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
5147
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
5248
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
5349
github.com/jmaralo/sntp v0.0.0-20240116111937-45a0a3419272 h1:dtQzdBn2P781UxyDPZd1tv4QE29ffpnmJ15qBkXHypY=
@@ -76,8 +72,6 @@ github.com/pin/tftp/v3 v3.0.0 h1:o9cQpmWBSbgiaYXuN+qJAB12XBIv4dT7OuOONucn2l0=
7672
github.com/pin/tftp/v3 v3.0.0/go.mod h1:xwQaN4viYL019tM4i8iecm++5cGxSqen6AJEOEyEI0w=
7773
github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4=
7874
github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI=
79-
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ=
80-
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU=
8175
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
8276
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
8377
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
@@ -150,7 +144,6 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc
150144
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
151145
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
152146
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
153-
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
154147
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
155148
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
156149
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=

backend/internal/config/config_types.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ import (
66
"github.com/HyperloopUPV-H8/h9-backend/pkg/logger"
77
)
88

9-
type App struct {
10-
AutomaticWindowOpening string `toml:"automatic_window_opening"`
11-
}
12-
139
type Adj struct {
1410
Branch string `toml:"branch"`
1511
Validate bool `toml:"validate"`
@@ -19,14 +15,6 @@ type Transport struct {
1915
PropagateFault bool `toml:"propagate_fault"`
2016
}
2117

22-
type TFTP struct {
23-
BlockSize int `toml:"block_size"`
24-
Retries int `toml:"retries"`
25-
TimeoutMs int `toml:"timeout_ms"`
26-
BackoffFactor int `toml:"backoff_factor"`
27-
EnableProgress bool `toml:"enable_progress"`
28-
}
29-
3018
type TCP struct {
3119
BackoffMinMs int `toml:"backoff_min_ms"`
3220
BackoffMaxMs int `toml:"backoff_max_ms"`
@@ -47,12 +35,10 @@ type Logging struct {
4735
}
4836

4937
type Config struct {
50-
App App
5138
Vehicle vehicle.Config
5239
Server server.Config
5340
Adj Adj
5441
Transport Transport
55-
TFTP TFTP
5642
TCP TCP
5743
UDP UDP
5844
Logging Logging

0 commit comments

Comments
 (0)