wip modem/tests

This commit is contained in:
2025-06-10 16:23:01 +02:00
parent ecf5fb46a0
commit 49a4642db2
10 changed files with 207 additions and 57 deletions

View File

@ -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) {