EEBus: update eebus-go/ship-go, drop ship-go fork (#31550)
This commit is contained in:
parent
7dc1aa34c1
commit
feff7d8ae6
8 changed files with 21 additions and 23 deletions
|
|
@ -23,10 +23,10 @@ const WriteTimeout = 10 * time.Second
|
|||
|
||||
// Await runs a control write and waits for the remote device's result, returning
|
||||
// an error if the write is rejected or no result arrives within WriteTimeout.
|
||||
func Await(write func(func(model.ResultDataType)) (*model.MsgCounterType, error)) error {
|
||||
func Await(write func(func(model.ResultDataType, model.MsgCounterType)) (*model.MsgCounterType, error)) error {
|
||||
res := make(chan model.ResultDataType, 1)
|
||||
|
||||
if _, err := write(func(r model.ResultDataType) { res <- r }); err != nil {
|
||||
if _, err := write(func(r model.ResultDataType, _ model.MsgCounterType) { res <- r }); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ func TestEEBus(t *testing.T) {
|
|||
_, err = box.uclpc.WriteConsumptionLimit(srvEntity, ucapi.LoadLimit{
|
||||
IsActive: true,
|
||||
Value: 1,
|
||||
}, func(result model.ResultDataType) {
|
||||
}, func(result model.ResultDataType, _ model.MsgCounterType) {
|
||||
t.Logf("lpc result: %v", result)
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue