Use api package in itgui

This commit is contained in:
2021-10-24 13:27:14 -07:00
parent c57c1f89b9
commit c881502b44
6 changed files with 73 additions and 158 deletions

View File

@@ -48,7 +48,7 @@ func (c *Client) BatteryLevel() (uint8, error) {
func (c *Client) WatchBatteryLevel() (<-chan uint8, func(), error) {
c.battLevelCh = make(chan types.Response, 2)
err := c.requestNoRes(types.Request{
Type: types.ReqTypeBattLevel,
Type: types.ReqTypeWatchBattLevel,
})
if err != nil {
return nil, nil, err