change the callerlogger
This commit is contained in:
@@ -8,11 +8,9 @@ import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.mogo.eagle.core.data.dispatch.DispatchAdasAutoPilotLocReceiverBean;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
|
||||
public class DispatchAirportDialog extends DispatchBaseDialog {
|
||||
|
||||
private static final String TAG = "DispatchAirportDialog";
|
||||
private IDispatchRemindClickListener mListener;
|
||||
|
||||
private final TextView tvStartLoc;
|
||||
@@ -67,7 +65,6 @@ public class DispatchAirportDialog extends DispatchBaseDialog {
|
||||
@Override
|
||||
public void addIDispatchRemindListener(IDispatchRemindClickListener listener) {
|
||||
if (listener == null) {
|
||||
Logger.d(TAG, "addIDispatchRemindListener listener is null");
|
||||
return;
|
||||
}
|
||||
this.mListener = listener;
|
||||
|
||||
@@ -8,9 +8,7 @@ import android.os.Message;
|
||||
import com.mogo.cloud.commons.utils.CoordinateUtils;
|
||||
import com.mogo.eagle.core.data.autopilot.ADASTrajectoryInfo;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotGuardianStatusInfo;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotRouteInfo;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStationInfo;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo;
|
||||
import com.mogo.eagle.core.data.dispatch.DispatchAdasAutoPilotLocReceiverBean;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
@@ -22,7 +20,7 @@ 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.CallerAutopilotPlanningListenerManager;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.map.navi.IMogoCarLocationChangedListener2;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.zhjt.dispatch.model.DispatchServiceModel;
|
||||
@@ -31,11 +29,11 @@ import com.mogo.service.cloud.socket.IMogoOnMessageListener;
|
||||
import com.zhjt.dispatch.model.IDispatch;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_DISPATCH;
|
||||
import static com.zhjt.dispatch.model.DispatchServiceModel.DISPATCH_RESULT_AFFIRM;
|
||||
import static com.zhjt.dispatch.model.DispatchServiceModel.DISPATCH_RESULT_MANUAL_CANCEL;
|
||||
import static com.zhjt.dispatch.model.DispatchServiceModel.DISPATCH_RESULT_TIMER_CANCEL;
|
||||
@@ -87,7 +85,6 @@ public class DispatchAutoPilotManager implements IMogoOnMessageListener<Dispatch
|
||||
super.handleMessage(msg);
|
||||
if (msg.what == MSG_TYPE_SHOW_DIALOG) {
|
||||
if (dispatchDialogManager.isShowing()) {
|
||||
Logger.d(TAG, "此时已经有调度,又收到调度信息");
|
||||
return;
|
||||
}
|
||||
isDispatch = true;
|
||||
@@ -175,7 +172,7 @@ public class DispatchAutoPilotManager implements IMogoOnMessageListener<Dispatch
|
||||
currentAutopilot.startLatLon = new AutopilotControlParameters.AutoPilotLonLat(receiverBean.getStartLat(), receiverBean.getStartLon());
|
||||
currentAutopilot.endLatLon = new AutopilotControlParameters.AutoPilotLonLat(receiverBean.getEndLat(), receiverBean.getEndLon());
|
||||
currentAutopilot.vehicleType = 10;
|
||||
Logger.d(TAG, "开启自动驾驶====" + currentAutopilot);
|
||||
CallerLogger.INSTANCE.d(M_DISPATCH + TAG, "开启自动驾驶====" + currentAutopilot);
|
||||
CallerAutoPilotManager.INSTANCE.startAutoPilot(currentAutopilot);
|
||||
}
|
||||
|
||||
@@ -233,7 +230,6 @@ public class DispatchAutoPilotManager implements IMogoOnMessageListener<Dispatch
|
||||
}
|
||||
|
||||
public void testEZhouStart() {
|
||||
Logger.d(TAG, "test to trigger mock testEZhouStart");
|
||||
DispatchAdasAutoPilotLocReceiverBean adasAutoPilotLocReceiverBean = new DispatchAdasAutoPilotLocReceiverBean(
|
||||
DispatchAdasAutoPilotLocReceiverBean.DISPATCH_SOURCE_EZHOU, DispatchAdasAutoPilotLocReceiverBean.DISPATCH_TYPE_START, "1",
|
||||
26.825571122, 112.5762410415, "起点---5号跑道",
|
||||
@@ -244,7 +240,6 @@ public class DispatchAutoPilotManager implements IMogoOnMessageListener<Dispatch
|
||||
}
|
||||
|
||||
public void testEZhouStop() {
|
||||
Logger.d(TAG, "test to trigger mock testEZhouStop");
|
||||
DispatchAdasAutoPilotLocReceiverBean adasAutoPilotLocReceiverBean = new DispatchAdasAutoPilotLocReceiverBean(
|
||||
DispatchAdasAutoPilotLocReceiverBean.DISPATCH_SOURCE_EZHOU, DispatchAdasAutoPilotLocReceiverBean.DISPATCH_TYPE_STOP, "1",
|
||||
0.0, 0.0, "",
|
||||
@@ -255,7 +250,6 @@ public class DispatchAutoPilotManager implements IMogoOnMessageListener<Dispatch
|
||||
}
|
||||
|
||||
public void testHengYangStart() {
|
||||
Logger.d(TAG, "test to trigger mock testHengYangStart");
|
||||
DispatchAdasAutoPilotLocReceiverBean adasAutoPilotLocReceiverBean = new DispatchAdasAutoPilotLocReceiverBean(
|
||||
DispatchAdasAutoPilotLocReceiverBean.DISPATCH_SOURCE_HENGYANG, DispatchAdasAutoPilotLocReceiverBean.DISPATCH_TYPE_START, "2",
|
||||
26.825571122, 112.5762410415, "衡阳科学城",
|
||||
@@ -313,7 +307,7 @@ public class DispatchAutoPilotManager implements IMogoOnMessageListener<Dispatch
|
||||
if (autopilotWayArrive == null) {
|
||||
return;
|
||||
}
|
||||
Logger.d(TAG, "onArriveAt data : " + autopilotWayArrive.toString());
|
||||
CallerLogger.INSTANCE.d(M_DISPATCH + TAG, "onArriveAt data : " + autopilotWayArrive.toString());
|
||||
if (autopilotWayArrive.getEndLocation() == null) {
|
||||
return;
|
||||
}
|
||||
@@ -322,9 +316,9 @@ public class DispatchAutoPilotManager implements IMogoOnMessageListener<Dispatch
|
||||
// 计算是不是到了终点
|
||||
float distanceFromSelf = CoordinateUtils.calculateLineDistance(receiverBean.getEndLon(), receiverBean.getEndLat()
|
||||
, endLon, endLat);
|
||||
Logger.d(TAG, "onArriveAt cal distance : " + distanceFromSelf);
|
||||
CallerLogger.INSTANCE.d(M_DISPATCH + TAG, "onArriveAt cal distance : " + distanceFromSelf);
|
||||
if (distanceFromSelf < 10) {
|
||||
Logger.d(TAG, "onArriveAt end location");
|
||||
CallerLogger.INSTANCE.d(M_DISPATCH + TAG, "onArriveAt end location");
|
||||
isDispatch = false;
|
||||
isArriveEnd = true;
|
||||
}
|
||||
|
||||
@@ -10,12 +10,10 @@ import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.mogo.eagle.core.data.dispatch.DispatchAdasAutoPilotLocReceiverBean;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
|
||||
|
||||
public class DispatchCarsDialog extends DispatchBaseDialog{
|
||||
public class DispatchCarsDialog extends DispatchBaseDialog {
|
||||
|
||||
private static final String TAG = "DispatchCarsDialog";
|
||||
private static final int MSG_TYPE_TIMER = 0;
|
||||
private static int TIMER = 10;
|
||||
private IDispatchRemindClickListener mListener;
|
||||
@@ -30,9 +28,8 @@ public class DispatchCarsDialog extends DispatchBaseDialog{
|
||||
if (msg.what == MSG_TYPE_TIMER) {
|
||||
if (TIMER > 0) {
|
||||
TIMER--;
|
||||
Logger.d(TAG,"timer : " + TIMER);
|
||||
tvTimer.setText(String.valueOf(TIMER));
|
||||
handler.sendEmptyMessageDelayed(MSG_TYPE_TIMER,1000L);
|
||||
handler.sendEmptyMessageDelayed(MSG_TYPE_TIMER, 1000L);
|
||||
} else {
|
||||
hideDialog();
|
||||
}
|
||||
@@ -70,7 +67,7 @@ public class DispatchCarsDialog extends DispatchBaseDialog{
|
||||
dismissDialog();
|
||||
}
|
||||
|
||||
private void dismissDialog(){
|
||||
private void dismissDialog() {
|
||||
handler.removeMessages(MSG_TYPE_TIMER);
|
||||
TIMER = 10;
|
||||
dismiss();
|
||||
@@ -79,7 +76,6 @@ public class DispatchCarsDialog extends DispatchBaseDialog{
|
||||
@Override
|
||||
public void addIDispatchRemindListener(IDispatchRemindClickListener listener) {
|
||||
if (listener == null) {
|
||||
Logger.d(TAG, "addIDispatchRemindListener listener is null");
|
||||
return;
|
||||
}
|
||||
this.mListener = listener;
|
||||
@@ -87,7 +83,7 @@ public class DispatchCarsDialog extends DispatchBaseDialog{
|
||||
|
||||
@Override
|
||||
public void showDialog(DispatchAdasAutoPilotLocReceiverBean dispatchContent) {
|
||||
if(TextUtils.isEmpty(dispatchContent.getEndLocAddress())){
|
||||
if (TextUtils.isEmpty(dispatchContent.getEndLocAddress())) {
|
||||
return;
|
||||
}
|
||||
show();
|
||||
|
||||
@@ -10,11 +10,9 @@ import android.content.Context;
|
||||
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.eagle.core.data.dispatch.DispatchAdasAutoPilotLocReceiverBean;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
|
||||
public class DispatchDialogManager {
|
||||
|
||||
private static final String TAG = "DispatchDialogManager";
|
||||
private static volatile DispatchDialogManager manager;
|
||||
private static final byte[] obj = new byte[0];
|
||||
private final Context mContext;
|
||||
@@ -38,7 +36,6 @@ public class DispatchDialogManager {
|
||||
|
||||
public void addIDispatchRemindListener(IDispatchRemindClickListener listener) {
|
||||
if (listener == null) {
|
||||
Logger.d(TAG, "addIDispatchRemindListener listener is null");
|
||||
return;
|
||||
}
|
||||
this.mListener = listener;
|
||||
|
||||
@@ -4,8 +4,6 @@ import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
|
||||
public class DispatchTestPanelBroadCastReceiver extends BroadcastReceiver {
|
||||
|
||||
private static final String TAG = "DispatchTestPanelBroadCastReceiver";
|
||||
@@ -19,7 +17,6 @@ public class DispatchTestPanelBroadCastReceiver extends BroadcastReceiver {
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
try {
|
||||
int sceneType = intent.getIntExtra(BROADCAST_TEST_PANEL_CONTROL_TYPE_EXTRA_KEY, 0);
|
||||
Logger.d(TAG, "textPanelOpenType:" + sceneType);
|
||||
// 分发场景
|
||||
dispatchSceneTest(sceneType);
|
||||
} catch (Exception e) {
|
||||
@@ -33,7 +30,6 @@ public class DispatchTestPanelBroadCastReceiver extends BroadcastReceiver {
|
||||
* @param sceneType 场景类型
|
||||
*/
|
||||
private void dispatchSceneTest(int sceneType) {
|
||||
Logger.d(TAG, "sceneType=" + sceneType);
|
||||
if (sceneType == 0) {
|
||||
DispatchAutoPilotManager.getInstance().testEZhouStart();
|
||||
} else if (sceneType == 1) {
|
||||
|
||||
@@ -12,7 +12,6 @@ import com.mogo.eagle.core.data.dispatch.ReportedRoute;
|
||||
import com.mogo.eagle.core.network.RequestOptions;
|
||||
import com.mogo.eagle.core.network.SubscribeImpl;
|
||||
import com.mogo.eagle.core.network.utils.GsonUtil;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
|
||||
import java.util.HashMap;
|
||||
@@ -25,7 +24,6 @@ import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
public class DispatchServiceModel {
|
||||
|
||||
private static final String TAG = "DispatchServiceModel";
|
||||
private static volatile DispatchServiceModel instance;
|
||||
private static final byte[] obj = new byte[0];
|
||||
|
||||
@@ -73,13 +71,11 @@ public class DispatchServiceModel {
|
||||
@Override
|
||||
public void onNext(BaseData o) {
|
||||
super.onNext(o);
|
||||
//Logger.d(TAG, "uploadAutopilotStatus success");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
super.onError(e);
|
||||
Logger.d(TAG, "uploadAutopilotStatus error : " + e.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -107,13 +103,11 @@ public class DispatchServiceModel {
|
||||
@Override
|
||||
public void onNext(BaseData o) {
|
||||
super.onNext(o);
|
||||
Logger.d(TAG, "uploadAutopilotRoute success");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
super.onError(e);
|
||||
Logger.d(TAG, "uploadAutopilotRoute error : " + e.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -141,14 +135,12 @@ public class DispatchServiceModel {
|
||||
@Override
|
||||
public void onNext(BaseData o) {
|
||||
super.onNext(o);
|
||||
Logger.d(TAG, "dispatchResultUpload success");
|
||||
dispatch.onSuccess();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
super.onError(e);
|
||||
Logger.d(TAG, "dispatchResultUpload error : " + e.getMessage());
|
||||
dispatch.onError(e.getMessage());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user