Skip to content

Commit 4a9d274

Browse files
committed
Remove Impedance params from Weight
1 parent e48419a commit 4a9d274

2 files changed

Lines changed: 1 addition & 5 deletions

File tree

pkg/core/weight.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ type Weight struct {
2727
BodyScore int `json:"BodyScore,omitempty"` // points
2828
HeartRate int `json:"HeartRate,omitempty"` // beats per minute
2929
Height float32 `json:"Height,omitempty"` // cm
30-
Impedance int `json:"Impedance,omitempty"` // ohm
3130
SkeletalMuscleMass float32 `json:"SkeletalMuscleMass,omitempty"` // kg
3231

3332
User string `json:"User,omitempty"`
@@ -55,6 +54,5 @@ func Equal(w1, w2 *Weight) bool {
5554
w1.BodyScore == w2.BodyScore &&
5655
w1.HeartRate == w2.HeartRate &&
5756
w1.Height == w2.Height &&
58-
w1.Impedance == w2.Impedance &&
5957
w1.SkeletalMuscleMass == w2.SkeletalMuscleMass
6058
}

pkg/zepp/client.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ func (c *Client) GetFilterWeights(name string) ([]*core.Weight, error) {
9393
BasalMetabolism: int(record.Summary.Metabolism),
9494
BodyScore: record.Summary.BodyScore,
9595
Height: record.Summary.Height,
96-
Impedance: record.Summary.Impedance,
9796

9897
User: name,
9998
Source: record.DeviceId,
@@ -298,8 +297,7 @@ func (c *Client) Equal(w1, w2 *core.Weight) bool {
298297
w1.VisceralFat == w2.VisceralFat &&
299298
w1.BasalMetabolism == w2.BasalMetabolism &&
300299
w1.BodyScore == w2.BodyScore &&
301-
equalFloat(w1.Height, w2.Height) &&
302-
w1.Impedance == w2.Impedance
300+
equalFloat(w1.Height, w2.Height)
303301
}
304302

305303
const (

0 commit comments

Comments
 (0)