Fix boolean stuff in accordance to code review with adrian
This commit is contained in:
parent
0d4e8772a9
commit
c6e8ab35b6
|
@ -208,7 +208,7 @@ public class MainApp extends Application {
|
||||||
engineeringMode = engineeringModeSemaphore.exists() && engineeringModeSemaphore.isFile();
|
engineeringMode = engineeringModeSemaphore.exists() && engineeringModeSemaphore.isFile();
|
||||||
devBranch = BuildConfig.VERSION.contains("dev");
|
devBranch = BuildConfig.VERSION.contains("dev");
|
||||||
|
|
||||||
if (devBranch && !engineeringMode) {
|
if (!isDevModeOrRelease()) {
|
||||||
Notification n = new Notification(Notification.TOAST_ALARM, gs(R.string.closed_loop_disabled_on_dev_branch), Notification.NORMAL);
|
Notification n = new Notification(Notification.TOAST_ALARM, gs(R.string.closed_loop_disabled_on_dev_branch), Notification.NORMAL);
|
||||||
bus().post(new EventNewNotification(n));
|
bus().post(new EventNewNotification(n));
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,7 +102,7 @@ public class SafetyPlugin implements PluginBase, ConstraintsInterface {
|
||||||
**/
|
**/
|
||||||
@Override
|
@Override
|
||||||
public boolean isClosedModeEnabled() {
|
public boolean isClosedModeEnabled() {
|
||||||
if (MainApp.devBranch && !MainApp.engineeringMode) return false;
|
if (!MainApp.isDevModeOrRelease()) return false;
|
||||||
String mode = SP.getString("aps_mode", "open");
|
String mode = SP.getString("aps_mode", "open");
|
||||||
return mode.equals("closed") && BuildConfig.CLOSEDLOOP;
|
return mode.equals("closed") && BuildConfig.CLOSEDLOOP;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue