Merge branch 'dev_robotaxi-d-app-module_2120_221017_2.12.0' of gitlab.zhidaoauto.com:zhjt/AndroidApp/MoGoEagleEye into dev_robotaxi-d-app-module_2120_221017_2.12.0

This commit is contained in:
xinfengkun
2022-11-09 14:22:11 +08:00
5 changed files with 30 additions and 7 deletions

View File

@@ -15,6 +15,7 @@ import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningListener;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
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.CallerAutopilotPlanningListenerManager;
import com.mogo.eagle.core.function.map.R;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
@@ -38,6 +39,7 @@ public class SmallMapFragment extends BaseFragment
IMoGoAutopilotStatusListener {
private final String TAG = "SmallMapFragment";
protected SmallMapDirectionView mSmallMapDirectionView;
private int autoPilotStatus = 0;
@Override
public void onAttach(Context context) {
@@ -139,9 +141,13 @@ public class SmallMapFragment extends BaseFragment
@Override
public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autoPilotStatusInfo) {
if (autoPilotStatusInfo.getPilotmode() != 1) {
int tempStatus = autoPilotStatusInfo.getPilotmode();
if (tempStatus != 1) {
clearPolyline();
}else if (tempStatus == 0 && autoPilotStatus == 1){
CallerAutoPilotManager.INSTANCE.getGlobalPath();
}
autoPilotStatus = tempStatus;
}
@Override
@@ -172,7 +178,7 @@ public class SmallMapFragment extends BaseFragment
for (MessagePad.Location routeModel : globalPathResp.getWayPointsList()) {
latLngList.add(new MogoLatLng(routeModel.getLatitude(), routeModel.getLongitude()));
}
if (latLngList.size() > 0) {
if (latLngList.size() > 0 && autoPilotStatus ==1) {
drawablePolyline(latLngList);
} else {
clearPolyline();