feat(AveragePosition/GetNTRIPMountPoint): change return type, update cmd average_position
This commit is contained in:
@ -12,10 +12,10 @@ type BaseInfo struct {
|
||||
Height float64
|
||||
Accumulation int
|
||||
}
|
||||
type TaskMessage struct {
|
||||
Name string `json:"name"`
|
||||
State string `json:"state"`
|
||||
Payload map[string]interface{} `json:"payload"`
|
||||
type TaskMessage[T any] struct {
|
||||
Name string `json:"name"`
|
||||
State string `json:"state"`
|
||||
Payload T `json:"payload"`
|
||||
}
|
||||
|
||||
type Operations interface {
|
||||
@ -51,10 +51,10 @@ type Operations interface {
|
||||
Reboot(ctx context.Context) error
|
||||
|
||||
// AveragePosition gathers data and computes the average position
|
||||
AveragePosition(ctx context.Context) (*TaskMessage, error)
|
||||
AveragePosition(ctx context.Context) (*TaskMessage[AveragePositionPayload], error)
|
||||
|
||||
//GetNTRIPMountPoint retrieves availables mount point
|
||||
GetNTRIPMountPoint(ctx context.Context) error
|
||||
GetNTRIPMountPoint(ctx context.Context) (*TaskMessage[NTRIPPayload], error)
|
||||
|
||||
//SetBaseCorrections updates the corrections obtaining station
|
||||
SetBaseCorrections(ctx context.Context, funcs ...SetBaseCorrectionsFunc) error
|
||||
|
Reference in New Issue
Block a user