Skip to content

Commit

Permalink
1. Add specific regional versions of Microtech and Ottai in companion…
Browse files Browse the repository at this point in the history
… mode.

2. Modify companion mode so that when an xDrip user selects mg/dL as the display unit, if the source reading is in mmol/L, it is multiplied by 18 to convert to mg/dL.
  • Loading branch information
Angus-repo committed Nov 3, 2024
1 parent fe9ec2e commit f7f8fcd
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ public class UiBasedCollector extends NotificationListenerService {
coOptedPackages.add("com.senseonics.androidapp");
coOptedPackages.add("com.microtech.aidexx.mgdl");
coOptedPackages.add("com.ottai.seas"); // Experiment
coOptedPackages.add("com.microtech.aidexx"); //for microtech china version
coOptedPackages.add("com.ottai.tag"); // //for ottai china version

coOptedPackagesAll.add("com.dexcom.dexcomone");
coOptedPackagesAll.add("com.dexcom.d1plus");
Expand All @@ -113,6 +115,8 @@ public class UiBasedCollector extends NotificationListenerService {
coOptedPackagesAll.add("com.senseonics.androidapp");
coOptedPackagesAll.add("com.microtech.aidexx.mgdl");
coOptedPackagesAll.add("com.ottai.seas"); // Experiment
coOptedPackagesAll.add("com.microtech.aidexx"); //for microtech china version
coOptedPackagesAll.add("com.ottai.tag"); // //for ottai china version

companionAppIoBPackages.add("com.insulet.myblue.pdm");

Expand Down Expand Up @@ -328,7 +332,11 @@ int tryExtractString(final String text) {
try {
val ftext = filterString(text);
if (Unitized.usingMgDl()) {
mgdl = Integer.parseInt(ftext);
if(isValidMmol(ftext)){
mgdl = (int) (Double.parseDouble(String.valueOf(ftext)) * 18);
}else{
mgdl = Integer.parseInt(String.valueOf(ftext));
}
} else {
if (isValidMmol(ftext)) {
val result = JoH.tolerantParseDouble(ftext, -1);
Expand Down

0 comments on commit f7f8fcd

Please sign in to comment.