Skip to content

Commit

Permalink
Offer to stop a G7 in engineering mode only
Browse files Browse the repository at this point in the history
  • Loading branch information
Navid200 committed Jan 27, 2024
1 parent 2db9aa6 commit f6f7f01
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
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() != "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 f6f7f01

Please sign in to comment.