Add context support and update lrpc

This commit is contained in:
2022-05-01 15:22:28 -07:00
parent b0c4574481
commit 78b5ca1de8
21 changed files with 155 additions and 144 deletions

View File

@@ -1,12 +1,15 @@
package api
import (
"context"
"go.arsenm.dev/infinitime"
)
func (c *Client) FirmwareUpgrade(upgType UpgradeType, files ...string) (chan infinitime.DFUProgress, error) {
func (c *Client) FirmwareUpgrade(ctx context.Context, upgType UpgradeType, files ...string) (chan infinitime.DFUProgress, error) {
progressCh := make(chan infinitime.DFUProgress, 5)
err := c.client.Call(
ctx,
"ITD",
"FirmwareUpgrade",
FwUpgradeData{