Skip to content

Commit c7a08db

Browse files
authored
Merge pull request #176 from HyperloopUPV-H8/backend/unmarshal-bug
[backend][2] ADJ alpha.1 - Unmarshal bug
2 parents 2aafdd3 + f72c8ca commit c7a08db

2 files changed

Lines changed: 13 additions & 13 deletions

File tree

backend/internal/adj/models.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ type ADJ struct {
88
}
99

1010
type Info struct {
11-
Ports map[string]uint16 `json:"ports"`
12-
Addresses map[string]string `json:"addresses"`
13-
Units map[string]utils.Operations `json:"units"`
14-
MessageIds map[string]uint16 `json:"message_ids"`
15-
BoardIds map[string]uint16
11+
Ports []map[string]uint16 `json:"ports"`
12+
Addresses []map[string]string `json:"addresses"`
13+
Units []map[string]utils.Operations `json:"units"`
14+
MessageIds []map[string]uint16 `json:"message_ids"`
15+
BoardIds []map[string]uint16
1616
}
1717

1818
type Board struct {

backend/internal/pod_data/models.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ type Measurement interface {
2828
}
2929

3030
type NumericMeasurement struct {
31-
Id string `json:"id"` // Remove json tags
32-
Name string `json:"name"`
33-
Type string `json:"type"`
34-
Units string `json:"units"`
35-
DisplayUnits utils.Units `json:"-"`
36-
PodUnits utils.Units `json:"-"`
37-
SafeRange []*float64 `json:"safeRange"`
38-
WarningRange []*float64 `json:"warningRange"`
31+
Id string `json:"id"` // Remove json tags
32+
Name string `json:"name"`
33+
Type string `json:"type"`
34+
Units []string `json:"units"`
35+
DisplayUnits []utils.Units `json:"-"`
36+
PodUnits []utils.Units `json:"-"`
37+
SafeRange []*float64 `json:"safeRange"`
38+
WarningRange []*float64 `json:"warningRange"`
3939
}
4040

4141
func (m NumericMeasurement) GetId() string {

0 commit comments

Comments
 (0)