Skip to content

Commit

Permalink
Merge pull request #3319 from Navid200/Navid_2024_01_27
Browse files Browse the repository at this point in the history
Offer to stop a G7 in engineering mode only
  • Loading branch information
jamorham committed Feb 17, 2024
2 parents 3b76f96 + 2cb6d63 commit 3381fe9
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -18,13 +18,15 @@
import com.eveningoutpost.dexdrip.utilitymodels.CollectionServiceStarter;
import com.eveningoutpost.dexdrip.utilitymodels.Experience;
import com.eveningoutpost.dexdrip.stats.StatsActivity;
import com.eveningoutpost.dexdrip.utilitymodels.Pref;
import com.eveningoutpost.dexdrip.utils.DexCollectionType;
import com.eveningoutpost.dexdrip.utils.Preferences;

import java.util.ArrayList;
import java.util.List;

import static com.eveningoutpost.dexdrip.services.Ob1G5CollectionService.getTransmitterID;
import static com.eveningoutpost.dexdrip.utils.DexCollectionType.getBestCollectorHardwareName;

/**
* Created by Emma Black on 11/5/14.
Expand Down Expand Up @@ -101,8 +103,10 @@ public NavDrawerBuilder(final Context context) {
}
}
}
this.nav_drawer_options.add(context.getString(R.string.stop_sensor));
this.nav_drawer_intents.add(new Intent(context, StopSensor.class));
if (!getBestCollectorHardwareName().equals("G7") || Pref.getBooleanDefaultFalse("engineering_mode")) { // If we are using G7, offer the stop sensor option in engineering mode only
this.nav_drawer_options.add(context.getString(R.string.stop_sensor));
this.nav_drawer_intents.add(new Intent(context, StopSensor.class));
}
} else {
this.nav_drawer_options.add(context.getString(R.string.start_sensor));
this.nav_drawer_intents.add(new Intent(context, StartNewSensor.class));
Expand Down

0 comments on commit 3381fe9

Please sign in to comment.