Skip to content

Commit

Permalink
writing distance and kcal to iphone #957
Browse files Browse the repository at this point in the history
  • Loading branch information
cagnulein committed Oct 2, 2022
1 parent 37e98fa commit 1bbca34
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/ios/AppleWatchToIpad/Connection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,13 @@ class Connection {
if sender?.contains("PHONE") ?? false && message.contains("HR=") {
let hr : String = message.slice(from: "HR=", to: "#") ?? ""
WatchKitConnection.currentHeartRate = (Int(hr) ?? 0)
}
} else if sender?.contains("PAD") ?? false && message.contains("KCAL=") {
let kcal : String = message.slice(from: "KCAL=", to: "#") ?? ""
WatchKitConnection.kcal = (Int(kcal) ?? 0)
} else if sender?.contains("PAD") ?? false && message.contains("ODO=") {
let kcal : String = message.slice(from: "ODO=", to: "#") ?? ""
WatchKitConnection.distance = (Double(odo) ?? 0)
}
}
}
self.receiveMessage()
Expand Down

0 comments on commit 1bbca34

Please sign in to comment.