Skip to content

Commit

Permalink
Fix #1
Browse files Browse the repository at this point in the history
  • Loading branch information
cmtjk committed Sep 6, 2022
1 parent 1a4a9cc commit 2892c92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ android {
minSdk 28
targetSdk 32
versionCode 1
versionName "1.3.0"
versionName "1.3.1"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,21 +176,21 @@ private void handleGraphResponse(JSONObject response, boolean xDripEnabled, bool
}

if (xDripEnabled) {
forwardToXDrip(sensorSerial, bloodGlucoseValue, measurementDateTime);
forwardToXDrip(sensorSerial, bloodGlucoseValueInMgDl, measurementDateTime);
}

} catch (JSONException e) {
sendToActivitiesLogView("Getting measurement failed: " + e.getMessage());
}
}

private void forwardToXDrip(String sensorSerial, double bloodGlucoseValue, LocalDateTime measurementDateTime) {
private void forwardToXDrip(String sensorSerial, int bloodGlucoseValueInMgPerDl, LocalDateTime measurementDateTime) {
Bundle bundle = new Bundle();
bundle.putString(xDripProperties.SENSOR_SERIAL.value, sensorSerial);

Intent intent = new Intent();
intent.setAction(xDripProperties.ACTION.value);
intent.putExtra(xDripProperties.GLUCOSE.value, bloodGlucoseValue);
intent.putExtra(xDripProperties.GLUCOSE.value, bloodGlucoseValueInMgPerDl);
intent.putExtra(xDripProperties.TIMESTAMP.value, measurementDateTime.atZone(ZoneId.of("Europe/Berlin")).toInstant().toEpochMilli());

intent.putExtra(xDripProperties.BLE_MANAGER.value, bundle);
Expand Down

0 comments on commit 2892c92

Please sign in to comment.