Fix automatic careportal entries
This commit is contained in:
parent
2371034a49
commit
e3f45aa6be
|
@ -1189,6 +1189,7 @@ public class LocalInsightPlugin extends PluginBase implements PumpInterface, Con
|
|||
}
|
||||
|
||||
private void processCannulaFilledEvent(CannulaFilledEvent event) {
|
||||
if (!SP.getBoolean("insight_log_site_changes", false)) return;
|
||||
long timestamp = parseDate(event.getEventYear(), event.getEventMonth(), event.getEventDay(),
|
||||
event.getEventHour(), event.getEventMinute(), event.getEventSecond()) + timeOffset;
|
||||
uploadCareportalEvent(timestamp, CareportalEvent.SITECHANGE);
|
||||
|
@ -1216,7 +1217,7 @@ public class LocalInsightPlugin extends PluginBase implements PumpInterface, Con
|
|||
}
|
||||
|
||||
private void processSniffingDoneEvent(SniffingDoneEvent event) {
|
||||
if (!SP.getBoolean("insight_log_site_changes", false)) return;
|
||||
if (!SP.getBoolean("insight_log_reservoir_changes", false)) return;
|
||||
long timestamp = parseDate(event.getEventYear(), event.getEventMonth(), event.getEventDay(),
|
||||
event.getEventHour(), event.getEventMinute(), event.getEventSecond()) + timeOffset;
|
||||
uploadCareportalEvent(timestamp, CareportalEvent.INSULINCHANGE);
|
||||
|
|
|
@ -1253,6 +1253,7 @@
|
|||
<string name="mute_alert">Mute</string>
|
||||
<string name="pump_alert">Pump alert</string>
|
||||
<string name="log_site_changes">Log site changes</string>
|
||||
<string name="log_reservoir_changes">Log reservoir changes</string>
|
||||
<string name="log_tube_changes">Log tube changes</string>
|
||||
<string name="log_battery_changes">Log battery changes</string>
|
||||
<string name="log_operating_mode_changes">Log operating mode changes</string>
|
||||
|
|
|
@ -10,14 +10,19 @@
|
|||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="insight_log_site_changes"
|
||||
android:title="@string/log_site_changes" />
|
||||
android:key="insight_log_reservoir_changes"
|
||||
android:title="@string/log_reservoir_changes" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="insight_log_tube_changes"
|
||||
android:title="@string/log_tube_changes" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="insight_log_site_changes"
|
||||
android:title="@string/log_site_changes" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="insight_log_battery_changes"
|
||||
|
|
Loading…
Reference in a new issue