Fix API package
This commit is contained in:
parent
8d29ece214
commit
2426582bd3
@ -90,15 +90,15 @@ func (c *Client) requestNoRes(req types.Request) error {
|
|||||||
// handleResp handles the received response as needed
|
// handleResp handles the received response as needed
|
||||||
func (c *Client) handleResp(res types.Response) error {
|
func (c *Client) handleResp(res types.Response) error {
|
||||||
switch res.Type {
|
switch res.Type {
|
||||||
case types.ResTypeWatchHeartRate:
|
case types.ReqTypeWatchHeartRate:
|
||||||
c.heartRateCh <- res
|
c.heartRateCh <- res
|
||||||
case types.ResTypeWatchBattLevel:
|
case types.ReqTypeWatchBattLevel:
|
||||||
c.battLevelCh <- res
|
c.battLevelCh <- res
|
||||||
case types.ResTypeWatchStepCount:
|
case types.ReqTypeWatchStepCount:
|
||||||
c.stepCountCh <- res
|
c.stepCountCh <- res
|
||||||
case types.ResTypeWatchMotion:
|
case types.ReqTypeWatchMotion:
|
||||||
c.motionCh <- res
|
c.motionCh <- res
|
||||||
case types.ResTypeDFUProgress:
|
case types.ReqTypeFwUpgrade:
|
||||||
c.dfuProgressCh <- res
|
c.dfuProgressCh <- res
|
||||||
default:
|
default:
|
||||||
c.respCh <- res
|
c.respCh <- res
|
||||||
|
Loading…
Reference in New Issue
Block a user