feat(AveragePosition/GetNTRIPMountPoint): change return type, update cmd average_position
This commit is contained in:
@ -153,7 +153,7 @@ func (c *Client) Reboot(ctx context.Context) error {
|
||||
}
|
||||
|
||||
// AveragePosition implements protocol.Operations.
|
||||
func (c *Client) AveragePosition(ctx context.Context) (*protocol.TaskMessage, error) {
|
||||
func (c *Client) AveragePosition(ctx context.Context) (*protocol.TaskMessage[protocol.AveragePositionPayload], error) {
|
||||
_, ops, err := c.getProtocol(ctx)
|
||||
if err != nil {
|
||||
return nil, errors.WithStack(err)
|
||||
@ -168,17 +168,17 @@ func (c *Client) AveragePosition(ctx context.Context) (*protocol.TaskMessage, er
|
||||
}
|
||||
|
||||
// GetNTRIPMountPoint implements protocol.Operations.
|
||||
func (c *Client) GetNTRIPMountPoint(ctx context.Context) error {
|
||||
func (c *Client) GetNTRIPMountPoint(ctx context.Context) (*protocol.TaskMessage[protocol.NTRIPPayload], error) {
|
||||
_, ops, err := c.getProtocol(ctx)
|
||||
if err != nil {
|
||||
return errors.WithStack(err)
|
||||
return nil, errors.WithStack(err)
|
||||
}
|
||||
|
||||
if err := ops.GetNTRIPMountPoint(ctx); err != nil {
|
||||
return errors.WithStack(err)
|
||||
ntripMsg, err := ops.GetNTRIPMountPoint(ctx)
|
||||
if err != nil {
|
||||
return nil, errors.WithStack(err)
|
||||
}
|
||||
|
||||
return nil
|
||||
return ntripMsg, nil
|
||||
}
|
||||
|
||||
// SetBaseCorrections implements protocol.Operations.
|
||||
|
Reference in New Issue
Block a user