diff --git a/app/release/app-release.apk b/app/release/app-release.apk index 3aeeeed..cfbb781 100644 Binary files a/app/release/app-release.apk and b/app/release/app-release.apk differ diff --git a/app/src/main/java/com/github/gidabotapp/repository/QNode.java b/app/src/main/java/com/github/gidabotapp/repository/QNode.java index 619c148..be2c499 100644 --- a/app/src/main/java/com/github/gidabotapp/repository/QNode.java +++ b/app/src/main/java/com/github/gidabotapp/repository/QNode.java @@ -4,7 +4,6 @@ import androidx.lifecycle.MutableLiveData; -import com.github.gidabotapp.data.MultiNavPhase; import com.github.gidabotapp.data.PhaseMessage; import com.github.gidabotapp.domain.Floor; import com.github.gidabotapp.domain.MapPosition; @@ -51,14 +50,12 @@ public class QNode extends AbstractNodeMain { // Node subscribers private HashMap> positionSubHM; private HashMap> pendingReqSubHM; - private Subscriber subNavPhase; private Subscriber subDialogMessage; // All MutableLiveData to expose ROS system's current data private final HashMap> currentPositionsHM; private final HashMap>> pendingRequestsHM; private final MutableLiveData phaseMessageLD; - private final MutableLiveData multiNavPhaseLD; // ConnectedNode will be injected through MainActivity (RosActivity) private ConnectedNode connectedNode; @@ -87,7 +84,6 @@ private QNode() { } }}; this.phaseMessageLD = new MutableLiveData<>(); - this.multiNavPhaseLD = new MutableLiveData<>(); } // Singleton lazy initialization @@ -151,17 +147,6 @@ public void onNewMessage(PendingGoals message) { }}; - // Nav Phase subscriber connection - subNavPhase = connectedNode.newSubscriber("/nav_phase", Int8._TYPE); - subNavPhase.addMessageListener(new MessageListener() { - @Override - public void onNewMessage(Int8 message) { - int i = message.getData(); - MultiNavPhase currentNavPhase = MultiNavPhase.values()[i]; - multiNavPhaseLD.postValue(currentNavPhase); - } - }); - // Dialog QT message subscriber connection subDialogMessage = connectedNode.newSubscriber("/dialog_qt_message", Int8._TYPE); subDialogMessage.addMessageListener(new MessageListener() { @@ -282,7 +267,6 @@ public void shutdown() { } subDialogMessage.shutdown(); - subNavPhase.shutdown(); pubCancel.shutdown(); pubGoal.shutdown(); @@ -302,9 +286,6 @@ public void shutdown() { public MutableLiveData getPhaseMessageLD(){ return this.phaseMessageLD; } - public MutableLiveData getMultiNavPhaseLD(){ - return this.multiNavPhaseLD; - } public HashMap> getCurrentPositionsHM(){ return this.currentPositionsHM; } diff --git a/app/src/main/java/com/github/gidabotapp/repository/Repository.java b/app/src/main/java/com/github/gidabotapp/repository/Repository.java index 16a5d52..173c9ed 100644 --- a/app/src/main/java/com/github/gidabotapp/repository/Repository.java +++ b/app/src/main/java/com/github/gidabotapp/repository/Repository.java @@ -132,9 +132,6 @@ public void qNodeShutdown() { public LiveData getAlertLD(){ return this.alertLD; } - public MutableLiveData getMultiNavPhaseLD(){ - return qNode.getMultiNavPhaseLD(); - } public MutableLiveData getToastLD(){ return this.toastLD; } diff --git a/app/src/main/java/com/github/gidabotapp/view/RouteSelectActivity.java b/app/src/main/java/com/github/gidabotapp/view/RouteSelectActivity.java index 069b328..512a197 100644 --- a/app/src/main/java/com/github/gidabotapp/view/RouteSelectActivity.java +++ b/app/src/main/java/com/github/gidabotapp/view/RouteSelectActivity.java @@ -300,7 +300,6 @@ public void onDestroy() { viewModel.getPositionLD(floor).removeObservers(this); } viewModel.getCurrentFloorRoomsLD().removeObservers(this); - viewModel.getMultiNavPhaseLD().removeObservers(this); // Shut down robot query Node (qNode) viewModel.shutdownNode(); diff --git a/app/src/main/java/com/github/gidabotapp/viewmodel/MapViewModel.java b/app/src/main/java/com/github/gidabotapp/viewmodel/MapViewModel.java index b91b4dd..cb2aaf5 100644 --- a/app/src/main/java/com/github/gidabotapp/viewmodel/MapViewModel.java +++ b/app/src/main/java/com/github/gidabotapp/viewmodel/MapViewModel.java @@ -194,9 +194,6 @@ public void selectFloor(Floor floor) { public LiveData getToastLD() { return this.toastLD; } - public MutableLiveData getMultiNavPhaseLD(){ - return repository.getMultiNavPhaseLD(); - } public MutableLiveData getPositionLD(Floor f){ return repository.getCurrentPositionsHM().get(f); }