Skip to content

Commit f6cda94

Browse files
xBlaz3kxxBlaz3kx
andauthored
Small fixes (#21)
Co-authored-by: xBlaz3kx <[email protected]>
1 parent f7ef817 commit f6cda94

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

internal/chargepoint/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@ func Run(isDebug bool, config *settings.Settings, connectors []*settings.Connect
6868
protocolVersion = settings.ProtocolVersion(chargePointInfo.ProtocolVersion)
6969
// Execution
7070
ctx, cancel = context.WithCancel(context.Background())
71-
quitChannel = make(chan os.Signal, 1)
71+
quitChannel = make(chan os.Signal, 5)
7272
)
73+
7374
defer cancel()
7475
signal.Notify(quitChannel, syscall.SIGINT, syscall.SIGTERM)
7576

internal/components/hardware/indicator/ws281x.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,11 @@ func (ws *WS281x) Blink(index int, times int, colorHex uint32) error {
8686
}
8787

8888
// Cleanup turn the LEDs off and terminate the data connection.
89-
func (ws WS281x) Cleanup() {
89+
func (ws *WS281x) Cleanup() {
9090
var i = 0
9191
for ws.numberOfLEDs != i {
9292
ws.DisplayColor(i, Off)
93+
i++
9394
}
9495
ws.close()
9596
}

internal/components/settings/settings-manager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ func loadConnectorFromPath(name, path string) (*settings.Connector, error) {
129129

130130
log.Debugf("Read connector from %s", path)
131131
cachePathKey := fmt.Sprintf("connectorEvse%dId%d", connector.EvseId, connector.ConnectorId)
132-
ConnectorSettings.Store(cachePathKey, &connector)
132+
ConnectorSettings.Store(cachePathKey, connectorCfg)
133133

134134
return &connector, nil
135135
}

0 commit comments

Comments
 (0)