Skip to content

Commit 87afa58

Browse files
committed
Fixed a copy/paste error when saving height.
1 parent 066aa1a commit 87afa58

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

IOS/Model/HealthManager.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -767,9 +767,9 @@ class HealthManager {
767767

768768
/// @brief Adds the weight reading to HealthKit.
769769
func saveWeightIntoHealthStore(weight: Double, unitSystem: UnitSystem) {
770-
var units = HKUnit.inch()
770+
var units = HKUnit.pound()
771771
if unitSystem == UNIT_SYSTEM_METRIC {
772-
units = HKUnit.meterUnit(with: HKMetricPrefix.centi)
772+
units = HKUnit.gramUnit(with: HKMetricPrefix.kilo)
773773
}
774774
let now = Date()
775775
let weightQuantity = HKQuantity.init(unit: units, doubleValue: weight)

0 commit comments

Comments
 (0)