From: Florian Forster Date: Tue, 16 Jan 2018 21:37:01 +0000 (+0100) Subject: Fixup: Pass RestingHeartRate to SetHeartRate(). X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=4b89d270e3125a5184896db627520b915ffec635;p=kraftakt.git Fixup: Pass RestingHeartRate to SetHeartRate(). --- diff --git a/gfit/gfit.go b/gfit/gfit.go index 33e5a66..ea41b95 100644 --- a/gfit/gfit.go +++ b/gfit/gfit.go @@ -343,7 +343,7 @@ func (c *Client) heartRate(ctx context.Context, dataSource *fitness.DataSource, return results, maxEndTime, nil } -func (c *Client) SetHeartRate(ctx context.Context, totalDurations []fitbit.HeartRateZone, startOfDay time.Time) error { +func (c *Client) SetHeartRate(ctx context.Context, totalDurations []fitbit.HeartRateZone, restingHeartRate int, startOfDay time.Time) error { dataSource := &fitness.DataSource{ Application: Application(ctx), DataType: &fitness.DataType{ diff --git a/gfitsync.go b/gfitsync.go index 29f98ae..c5b4b62 100644 --- a/gfitsync.go +++ b/gfitsync.go @@ -259,7 +259,7 @@ func handleNotification(ctx context.Context, s *fitbit.Subscription) error { return fmt.Errorf("gfitClient.SetCalories(%d) = %v", summary.Summary.CaloriesOut, err) } - if err := gfitClient.SetHeartRate(ctx, summary.Summary.HeartRateZones, tm); err != nil { + if err := gfitClient.SetHeartRate(ctx, summary.Summary.HeartRateZones, summary.Summary.RestingHeartRate, tm); err != nil { return fmt.Errorf("gfitClient.SetHeartRate() = %v", err) }