Skip to content

Commit

Permalink
Revert "Wrong device type may occur in CareLink, try to extract actua…
Browse files Browse the repository at this point in the history
…l device type from data uploads for patient accounts."

This reverts commit a1c2853.
  • Loading branch information
benceszasz committed May 26, 2023
1 parent a1c2853 commit 0497244
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ static synchronized void processData(final RecentData recentData, final boolean
// Only Guardian Connect, NGP has all in notifications
if (recentData.isGM() && recentData.lastAlarm != null) {
//Add notification from alarm
if (recentData.lastAlarm.datetimeAsDate != null && recentData.lastAlarm.kind != null)
addNotification(recentData.lastAlarm.datetimeAsDate, recentData.getDeviceFamily(), recentData.lastAlarm);
if (recentData.lastAlarm.datetime != null && recentData.lastAlarm.kind != null)
addNotification(recentData.lastAlarm.datetime, recentData.getDeviceFamily(), recentData.lastAlarm);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -645,15 +645,9 @@ protected void correctTimeInRecentData(RecentData recentData) {

timezoneMissing = true;

//Try get TZ offset string: lastSG or lastAlarm
if(recentData.lastSG != null && recentData.lastSG.datetime != null)
offsetString = this.getZoneOffset(recentData.lastSG.datetime);
else
offsetString = this.getZoneOffset(recentData.lastAlarm.datetime);

//Set last alarm datetime as date
if(recentData.lastAlarm != null && recentData.lastAlarm.datetime != null)
recentData.lastAlarm.datetimeAsDate = parseDateString(recentData.lastAlarm.datetime);
//offset = this.getZonedDate(recentData.lastSG.datetime).getOffset();
offsetString = this.getZoneOffset(recentData.lastSG.datetime);

//Build correct dates with timezone
recentData.sMedicalDeviceTime = recentData.sMedicalDeviceTime + offsetString;
recentData.medicalDeviceTimeAsString = recentData.medicalDeviceTimeAsString + offsetString;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ public String getMessageAlarmCode() {
}

public int code;
public String datetime;
public Date datetimeAsDate;
public Date datetime;
public String type;
public boolean flash;
public String kind;
Expand Down

0 comments on commit 0497244

Please sign in to comment.