fix: send 0 values when configuring base (#63)

This commit is contained in:
wpetit 2024-09-18 15:20:41 +02:00
parent 593c062993
commit b2cdf23fb7
2 changed files with 15 additions and 7 deletions

View File

@ -173,6 +173,14 @@ var testCases = []operationTestCase{
return return
} }
config, err := ops.Configuration(ctx)
if err != nil {
t.Errorf("%+v", errors.WithStack(err))
return
}
t.Logf("updated configuration: %v", spew.Sdump(config))
}, },
}, },
{ {

View File

@ -1,14 +1,14 @@
package model package model
type Base struct { type Base struct {
Accumulation int `json:"accumulation,omitempty"` Accumulation int `json:"accumulation"`
AntennaOffset float64 `json:"antenna_offset,omitempty"` AntennaOffset float64 `json:"antenna_offset"`
Coordinates BaseCoordinates `json:"coordinates,omitempty"` Coordinates BaseCoordinates `json:"coordinates"`
Mode string `json:"mode,omitempty"` Mode string `json:"mode"`
} }
type BaseCoordinates struct { type BaseCoordinates struct {
Height float64 `json:"height,omitempty"` Height float64 `json:"height"`
Latitude float64 `json:"latitude,omitempty"` Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude,omitempty"` Longitude float64 `json:"longitude"`
} }