make led states an array
This commit is contained in:
parent
4ff50f961a
commit
a91d6bc576
|
@ -62,12 +62,12 @@ func GetBestStateFromList(spaces []*Space) State {
|
||||||
return state
|
return state
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *StateAggregator) GetLedStates() map[int]string {
|
func (s *StateAggregator) GetLedStates() []string {
|
||||||
states := make(map[int]string)
|
var states []string
|
||||||
|
|
||||||
s.mtx.RLock()
|
s.mtx.RLock()
|
||||||
for i, spaceList := range s.ledList {
|
for _, spaceList := range s.ledList {
|
||||||
states[i] = ColorMap[GetBestStateFromList(spaceList)]
|
states = append(states, ColorMap[GetBestStateFromList(spaceList)])
|
||||||
}
|
}
|
||||||
s.mtx.RUnlock()
|
s.mtx.RUnlock()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue