From 2426582bd30ec3db110c636a2aeb5fa9c4729472 Mon Sep 17 00:00:00 2001 From: Elara Musayelyan Date: Sun, 24 Oct 2021 00:49:48 -0700 Subject: [PATCH] Fix API package --- api/client.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api/client.go b/api/client.go index 45846af..bdd20c6 100644 --- a/api/client.go +++ b/api/client.go @@ -90,15 +90,15 @@ func (c *Client) requestNoRes(req types.Request) error { // handleResp handles the received response as needed func (c *Client) handleResp(res types.Response) error { switch res.Type { - case types.ResTypeWatchHeartRate: + case types.ReqTypeWatchHeartRate: c.heartRateCh <- res - case types.ResTypeWatchBattLevel: + case types.ReqTypeWatchBattLevel: c.battLevelCh <- res - case types.ResTypeWatchStepCount: + case types.ReqTypeWatchStepCount: c.stepCountCh <- res - case types.ResTypeWatchMotion: + case types.ReqTypeWatchMotion: c.motionCh <- res - case types.ResTypeDFUProgress: + case types.ReqTypeFwUpgrade: c.dfuProgressCh <- res default: c.respCh <- res