diff --git a/api/v1/station/explorer.go b/api/v1/station/explorer.go index 6be9e637..e9ff1fae 100644 --- a/api/v1/station/explorer.go +++ b/api/v1/station/explorer.go @@ -1,12 +1,14 @@ package station import ( + "fmt" + "github.com/anyshake/observer/drivers/explorer" "github.com/anyshake/observer/utils/timesource" ) func (e *explorerInfo) get(timeSource *timesource.Source, explorerDeps *explorer.ExplorerDependency) error { - e.DeviceId = explorerDeps.Config.GetDeviceId() + e.DeviceId = fmt.Sprintf("%08X", explorerDeps.Config.GetDeviceId()) e.Elevation = explorerDeps.Config.GetElevation() e.Errors = explorerDeps.Health.GetErrors() e.Received = explorerDeps.Health.GetReceived() diff --git a/api/v1/station/types.go b/api/v1/station/types.go index 50e30fc5..bbf9da60 100644 --- a/api/v1/station/types.go +++ b/api/v1/station/types.go @@ -11,7 +11,7 @@ type explorerInfo struct { Errors int64 `json:"errors"` Received int64 `json:"received"` SampleRate int `json:"sample_rate"` - DeviceId uint32 `json:"device_id"` + DeviceId string `json:"device_id"` Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` Elevation float64 `json:"elevation"` diff --git a/frontend/src/src/models/response/common/station/0.json b/frontend/src/src/models/response/common/station/0.json index 14373705..24dbe60e 100644 --- a/frontend/src/src/models/response/common/station/0.json +++ b/frontend/src/src/models/response/common/station/0.json @@ -9,7 +9,7 @@ "errors": 47, "received": 131, "sample_rate": 125, - "device_id": 20030813, + "device_id": "FFFFFFFF", "latitude": 39.9, "longitude": 116.4, "elevation": 50.0,