wip modem/tests
This commit is contained in:
@ -275,6 +275,63 @@ var testCases = []operationTestCase{
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "SetBaseCorrections",
|
||||
Run: func(t *testing.T, ops protocol.Operations) {
|
||||
ctx := context.Background()
|
||||
if err := ops.Connect(ctx); err != nil {
|
||||
t.Errorf("%+v", errors.WithStack(err))
|
||||
return
|
||||
}
|
||||
|
||||
defer func() {
|
||||
if err := ops.Close(ctx); err != nil {
|
||||
t.Errorf("%+v", errors.WithStack(err))
|
||||
}
|
||||
}()
|
||||
opts := []protocol.SetBaseCorrectionsFunc{
|
||||
protocol.WithNTRIPAddress("crtk.net"),
|
||||
protocol.WithNTRIPPort(2101),
|
||||
protocol.WithNTRIPUsername("centipede"),
|
||||
protocol.WithNTRIPPassword("centipede"),
|
||||
protocol.WithNTRIPMountPoint("EPI21"),
|
||||
protocol.WithSendPositionToBase(true),
|
||||
}
|
||||
|
||||
if err := ops.SetBaseCorrections(ctx, opts...); err != nil {
|
||||
t.Errorf("%+v", errors.WithStack(err))
|
||||
return
|
||||
}
|
||||
t.Logf("BaseCorrection Update")
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "SetModem",
|
||||
Run: func(t *testing.T, ops protocol.Operations) {
|
||||
ctx := context.Background()
|
||||
if err := ops.Connect(ctx); err != nil {
|
||||
t.Errorf("%+v", errors.WithStack(err))
|
||||
return
|
||||
}
|
||||
|
||||
defer func() {
|
||||
if err := ops.Close(ctx); err != nil {
|
||||
t.Errorf("%+v", errors.WithStack(err))
|
||||
}
|
||||
}()
|
||||
opts := []protocol.SetModemOptionsFunc{
|
||||
protocol.WithApn("mmsbouygtel.com"),
|
||||
}
|
||||
|
||||
if err := ops.SetModem(ctx, opts...); err != nil {
|
||||
t.Errorf("%+v", errors.WithStack(err))
|
||||
return
|
||||
}
|
||||
t.Logf("Modem Update")
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "AveragePosition",
|
||||
Run: func(t *testing.T, ops protocol.Operations) {
|
||||
|
Reference in New Issue
Block a user