Skip to content

Commit a1dd2ac

Browse files
committed
adapt pod_data.go
1 parent c2c3dc7 commit a1dd2ac

5 files changed

Lines changed: 13 additions & 13 deletions

File tree

backend/internal/adj/adj.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ func getBoards(info Info, boardsList map[string]string) (map[string]Board, error
9797
return nil, err
9898
}
9999

100-
// board.Structures = getBoardStructures( boardJSON.StructuresPaths) // TODO: Issued in JSON_ADE #1
101-
102100
boards[boardName] = board
103101
}
104102

backend/internal/adj/models.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
package adj
22

3+
import "github.com/HyperloopUPV-H8/h9-backend/internal/utils"
4+
35
type ADJ struct {
46
Info Info
57
Boards map[string]Board
68
}
79

810
type Info struct {
9-
Ports map[string]uint16 `json:"ports"`
10-
Addresses map[string]string `json:"addresses"`
11-
Units map[string]string `json:"units"`
12-
MessageIds map[string]uint16 `json:"message_ids"`
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"`
1315
BoardIds map[string]uint16
1416
}
1517

backend/internal/pod_data/measurement.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import (
44
"fmt"
55
"strings"
66

7+
"github.com/HyperloopUPV-H8/h9-backend/internal/adj"
78
"github.com/HyperloopUPV-H8/h9-backend/internal/common"
8-
"github.com/HyperloopUPV-H8/h9-backend/internal/excel/adj"
9-
"github.com/HyperloopUPV-H8/h9-backend/internal/excel/utils"
9+
"github.com/HyperloopUPV-H8/h9-backend/internal/utils"
1010
)
1111

1212
const EnumType = "enum"
@@ -114,7 +114,7 @@ func getBooleanMeasurement(adeMeas adj.Measurement) BooleanMeasurement {
114114
}
115115

116116
func isNumeric(kind string) bool {
117-
return (kind == "uint8" ||
117+
return kind == "uint8" ||
118118
kind == "uint16" ||
119119
kind == "uint32" ||
120120
kind == "uint64" ||
@@ -123,5 +123,5 @@ func isNumeric(kind string) bool {
123123
kind == "int32" ||
124124
kind == "int64" ||
125125
kind == "float32" ||
126-
kind == "float64")
126+
kind == "float64"
127127
}

backend/internal/pod_data/models.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package pod_data
22

3-
import "github.com/HyperloopUPV-H8/h9-backend/internal/excel/utils"
3+
import "github.com/HyperloopUPV-H8/h9-backend/internal/utils"
44

55
type PodData struct {
66
Boards []Board `json:"boards"`

backend/internal/pod_data/pod_data.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package pod_data
22

33
import (
4+
"github.com/HyperloopUPV-H8/h9-backend/internal/utils"
45
"strconv"
56

7+
"github.com/HyperloopUPV-H8/h9-backend/internal/adj"
68
"github.com/HyperloopUPV-H8/h9-backend/internal/common"
7-
"github.com/HyperloopUPV-H8/h9-backend/internal/excel/adj"
8-
"github.com/HyperloopUPV-H8/h9-backend/internal/excel/utils"
99
)
1010

1111
func NewPodData(adeBoards map[string]adj.Board, globalUnits map[string]utils.Operations) (PodData, error) {

0 commit comments

Comments
 (0)