Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jamorham committed Mar 10, 2024
2 parents d6d95db + bedcb2e commit e5113d9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1126,6 +1126,7 @@ public static boolean shortTxId() {
return getTransmitterID().length() < 6;
}


private static Ob1Work enqueueCommand(BaseMessage tm, String msg) {
if (tm != null) {
final Ob1Work item = new Ob1Work(tm, msg);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.eveningoutpost.dexdrip.utils;

import static com.eveningoutpost.dexdrip.utils.DexCollectionType.getBestCollectorHardwareName;
import static com.eveningoutpost.dexdrip.xdrip.gs;

import android.Manifest;
Expand Down Expand Up @@ -1731,6 +1732,16 @@ public boolean onPreferenceChange(Preference preference, Object newValue) {
}
}

if (getBestCollectorHardwareName().equals("G7")) { // Remove battery options, from G5/G6/Dex1/G7 Debug Settings, if we are using G7 or One+
try {
PreferenceScreen screen = (PreferenceScreen) findPreference("xdrip_plus_g5_extra_settings");
Preference pref = getPreferenceManager().findPreference("dex_battery_category");
screen.removePreference(pref);
} catch (Exception e) {
UserError.Log.wtf(TAG, "Failed to remove G7 battery options");
}
}

//Remove CL prefs for NON CLFollower
if (collectionType != DexCollectionType.CLFollow) {
try {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1390,7 +1390,7 @@
<string name="summary_ob1_initiate_bonding_flag">OB1 collector can initiate bonding.</string>
<string name="title_ob1_initiate_bonding_flag">Allow OB1 initiate bonding</string>
<string name="title_old_g5_options">Old G5 Collector Settings</string>
<string name="title_g5g6_battery_options">G5/G6/G7/1 battery options</string>
<string name="title_g5g6_battery_options">G5/G6/Dex1 battery options</string>
<string name="title_g5_battery_warning_level">Adjust battery warning level</string>
<string name="title_plugins_and_features">Plugins and Features</string>
<string name="title_color_heart_rate1">Heart rate monitor</string>
Expand Down

0 comments on commit e5113d9

Please sign in to comment.