Skip to content

Commit 6870b09

Browse files
authored
reservoir change analytics, readme update (#105)
1 parent 640e45f commit 6870b09

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

Loop/Managers/AnalyticsManager.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ class AnalyticsManager {
7575
logEvent("Pump battery replacement")
7676
}
7777

78+
func reservoirWasRewound() {
79+
logEvent("Pump reservoir rewind")
80+
}
81+
7882
func didChangeBasalRateSchedule() {
7983
logEvent("Basal rate change")
8084
}

Loop/Managers/DeviceDataManager.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,10 @@ class DeviceDataManager: CarbStoreDelegate, TransmitterDelegate, ReceiverDelegat
281281
NotificationManager.sendPumpReservoirLowNotificationForAmount(newVolume, andTimeRemaining: timeLeft)
282282
}
283283
}
284+
285+
if newVolume > previousVolume + 1 {
286+
AnalyticsManager.sharedManager.reservoirWasRewound()
287+
}
284288
}
285289
}
286290
}

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Please understand that this project:
3030
<thead>
3131
<tr>
3232
<td colspan="2" rowspan="4"></td>
33-
<th colspan="2">Insulin Pump</th>
33+
<th colspan="3">Insulin Pump</th>
3434
</tr>
3535
<tr>
3636
<th>MM 522/722</th>
@@ -43,27 +43,28 @@ Please understand that this project:
4343
<th rowspan="4">CGM</th>
4444
<th>Dexcom G4</th>
4545
<td>✅<sup><a href="#hw1">1</a> <a href="#hw2">2</a></sup></td>
46-
<td>✅<sup><a href="#hw1">1</a></sup></td>
46+
<td>✅<sup><a href="#hw1">1</a> <a href="#hw3">3</a></sup></sup></td>
47+
<td>✅<sup><a href="#hw1">1</a> <a href="#hw3">3</a></sup></sup></td>
4748
</tr>
4849
<tr>
4950
<th>Dexcom G5</th>
50-
<td>✅<sup><a href="#hw2">2</a> <a href="#hw3">3</a></sup></td>
51+
<td>✅<sup><a href="#hw2">2</a></sup></td>
52+
<td>✅<sup><a href="#hw3">3</a></sup></td>
5153
<td>✅<sup><a href="#hw3">3</a></sup></td>
5254
</tr>
5355
<tr>
5456
<th>MM CGM</th>
5557
<td>❌<sup><a href="#hw4">4</a></sup></td>
56-
<td>✅</td>
57-
<td>✅<sup><a href="#hw5">5</a></sup></td>
58+
<td>✅<sup><a href="#hw3">3</a></sup></td>
59+
<td>✅<sup><a href="#hw3">3</a></sup></td>
5860
</tr>
5961
</tbody>
6062
</table>
6163

6264
<br/><a name="hw1">1</a>. Offline access to glucose requires a Receiver with Share and the [Share2 app](https://itunes.apple.com/us/app/dexcom-share2/id834775275?mt=8) to be running on the same device. Internet-dependent access via Share servers is also supported.
6365
<br/><a name="hw2">2</a>. Pump must have a remote ID added in the [Remote Options](https://www.medtronicdiabetes.com/sites/default/files/library/download-library/workbooks/x22_menu_map.pdf) menu.
64-
<br/><a name="hw3">3</a>. Early firmware only available on select models is required for using Closed Loop and Bolus features.
66+
<br/><a name="hw3">3</a>. Early firmware (US <= 2.4A, AU/EUR <= 2.6A) is required for using Closed Loop and Bolus features.
6567
<br/><a name="hw4">4</a>. It's not impossible, but comms-heavy and there's some work to be done. File an issue if you're someone who's up for the challenge and can test this hardware configuration.
66-
<br/><a name="hw4">5</a>. Confirmed working with AU MM554 firmware 2.6A - unsuccessful reports from some, need to check individual pumps.
6768

6869
### RileyLink
6970

@@ -94,9 +95,9 @@ Loop optionally supports select third-party remote services, which are configure
9495
| Service | Description
9596
| ---------------------- | -------------
9697
| Dexcom Share | Downloads glucose data if a local G5 Transmitter or G4 Receiver with Share is not available.
97-
| Nightscout | Uploads treatments and other pump data. Note you will need to set "Nightscout history uploading" to "On" in Settings for treatments to be fetched from your pump and uploaded to Nightscout.
98+
| Nightscout | Uploads treatments and other pump data. Note that you will need to set "Nightscout history uploading" to "On" in Settings for treatments to be fetched from your pump and uploaded to Nightscout.
9899
| mLab | Uploads diagnostic data about each loop run, as well as app errors. At this time, it is strongly recommended that you configure this service in case retrospective analysis is needed.
99-
| Amplitude | Tracks private, single-user behavioral and system analytics
100+
| Amplitude | Tracks private, single-user behavioral and system analytics (no health data is sent)
100101

101102
# Making it Your Own
102103

0 commit comments

Comments
 (0)