Skip to content

Commit a0b6302

Browse files
committed
Baseline work to establish bluetooth reset support for G7
1 parent 205054e commit a0b6302

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

G7SensorKit/G7CGMManager/G7CGMManager.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,9 @@ public class G7CGMManager: CGMManager {
239239

240240
public func scanForNewSensor(scanAfterDelay: Bool = false) {
241241
logDeviceCommunication("Forgetting existing sensor and starting scan for new sensor.", type: .connection)
242+
243+
// we no longer assume that the hearbeat is working correctly
244+
self.providesBLEHeartbeat = false
242245

243246
mutateState { state in
244247
state.sensorID = nil
@@ -290,6 +293,8 @@ extension G7CGMManager: G7SensorDelegate {
290293
let shouldSwitchToNewSensor = true
291294

292295
if shouldSwitchToNewSensor {
296+
self.providesBLEHeartbeat = true // re-enable the BLE Heatbeat
297+
293298
mutateState { state in
294299
state.sensorID = name
295300
state.activatedAt = activatedAt

0 commit comments

Comments
 (0)