Merge branch 'dev_robosweeper-d_app-module_221230_1.1.0' into dev_arch_opt_3.0

# Conflicts:
#	OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/utils/CallerLoggerUtils.kt
#	OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/ui/SweeperOperatePanelView.java
#	app/src/main/java/com/mogo/launcher/stageone/ConfigStartUp.kt
#	core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoAdasListenerImpl.kt
#	core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoHandAdasMsgManager.java
#	core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/AIDataCollectWindow.kt
#	core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/InitiativeBadCaseWindow.kt
#	core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SteeringWheelView.java
#	core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/TrafficDataView.java
#	core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmallMapFragment.java
#	core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotVehicleStateListener.kt
#	core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotVehicleStateListenerManager.kt
#	gradle.properties
#	libraries/mogo-map/src/main/java/com/mogo/map/CustomMapApiBuilder.java
This commit is contained in:
donghongyu
2023-01-09 18:42:03 +08:00
40 changed files with 854 additions and 128 deletions

View File

@@ -1,5 +1,7 @@
package com.mogo.eagle.core.function.smp;
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_MAP;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
@@ -16,8 +18,10 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
import com.mogo.eagle.core.function.api.map.smp.IMogoSmallMapProvider;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
import com.mogo.eagle.core.function.map.R;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
import org.jetbrains.annotations.NotNull;
@@ -67,6 +71,7 @@ public class SmallMapFragment extends BaseFragment
mSmallMapDirectionView = mRootView.findViewById(R.id.smallMapDirectionView);
mSmallMapDirectionView.onCreateView(savedInstanceState);
CallerPlanningRottingListenerManager.INSTANCE.addListener(TAG, this);
CallerAutoPilotStatusListenerManager.INSTANCE.addListener(TAG,this);
}
@Override
@@ -86,8 +91,13 @@ public class SmallMapFragment extends BaseFragment
@Override
public void drawablePolyline(List<MogoLatLng> coordinates) {
if (mSmallMapDirectionView != null) {
mSmallMapDirectionView.convert(coordinates);
UiThreadHandler.post(() -> mSmallMapDirectionView.drawablePolyline());
UiThreadHandler.post(new Runnable() {
@Override
public void run() {
mSmallMapDirectionView.convert(coordinates);
mSmallMapDirectionView.drawablePolyline();
}
});
}
}
@@ -127,9 +137,12 @@ public class SmallMapFragment extends BaseFragment
@Override
public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autoPilotStatusInfo) {
int tempStatus = autoPilotStatusInfo.getPilotmode();
CallerLogger.INSTANCE.i(M_MAP + TAG, "onAutopilotStatusResponse:"+tempStatus+" autoPilotStatus:"+autoPilotStatus);
if (tempStatus != 1) {
CallerLogger.INSTANCE.i(M_MAP + TAG, "onAutopilotStatusResponse:"+tempStatus+" clearPolyline");
clearPolyline();
}else if (tempStatus == 1 && autoPilotStatus == 0){
CallerLogger.INSTANCE.i(M_MAP + TAG, "onAutopilotStatusResponse:getGlobalPath");
CallerAutoPilotManager.INSTANCE.getGlobalPath();
}
autoPilotStatus = tempStatus;
@@ -156,16 +169,21 @@ public class SmallMapFragment extends BaseFragment
@Override
public void onAutopilotRotting(MessagePad.GlobalPathResp globalPathResp) {
CallerLogger.INSTANCE.i(M_MAP + TAG, "onAutopilotRotting");
if (globalPathResp == null || globalPathResp.getWayPointsList().size() == 0) {
return;
}
CallerLogger.INSTANCE.i(M_MAP + TAG, "onAutopilotRotting:"+globalPathResp.getWayPointsList().size());
List<MogoLatLng> latLngList = new ArrayList<>();
for (MessagePad.Location routeModel : globalPathResp.getWayPointsList()) {
latLngList.add(new MogoLatLng(routeModel.getLatitude(), routeModel.getLongitude()));
}
if (latLngList.size() > 0) {
CallerLogger.INSTANCE.i(M_MAP + TAG, "onAutopilotRotting:"+"drawablePolyline");
drawablePolyline(latLngList);
} else {
CallerLogger.INSTANCE.i(M_MAP + TAG, "onAutopilotRotting:"+"clearPolyline");
clearPolyline();
}
}