Fixed Eversense reading

Integration of Eversense CGM was broken in AAPS 3.0.0. This fixes it.
This commit is contained in:
Bernhard 2022-02-06 18:44:11 +01:00
parent 36023e35db
commit 92d50ea9e5
2 changed files with 3 additions and 7 deletions

View file

@ -75,7 +75,7 @@ class MM640gPlugin @Inject constructor(
when (val type = jsonObject.getString("type")) {
"sgv" ->
glucoseValues += CgmSourceTransaction.TransactionGlucoseValue(
timestamp = jsonObject.getLong("sgv"),
timestamp = jsonObject.getLong("date"),
value = jsonObject.getDouble("sgv"),
raw = jsonObject.getDouble("sgv"),
noise = null,

View file

@ -55,12 +55,8 @@ open class DataReceiver : DaggerBroadcastReceiver() {
Intents.NS_EMULATOR ->
OneTimeWorkRequest.Builder(MM640gPlugin.MM640gWorker::class.java)
.setInputData(Data.Builder().also {
it.copyDouble(Intents.EXTRA_BG_ESTIMATE, bundle)
it.copyString(Intents.EXTRA_BG_SLOPE_NAME, bundle)
it.copyLong(Intents.EXTRA_TIMESTAMP, bundle)
it.copyDouble(Intents.EXTRA_RAW, bundle)
it.copyInt(Intents.EXTRA_SENSOR_BATTERY, bundle, -1)
it.copyString(Intents.XDRIP_DATA_SOURCE_DESCRIPTION, bundle)
it.copyString("collection", bundle)
it.copyString("data", bundle)
}.build()).build()
Telephony.Sms.Intents.SMS_RECEIVED_ACTION ->
OneTimeWorkRequest.Builder(SmsCommunicatorPlugin.SmsCommunicatorWorker::class.java)