[led通讯添加日志]
This commit is contained in:
yangyakun
2024-08-13 12:02:54 +08:00
parent 0806383490
commit d5fbbf7028
11 changed files with 44 additions and 205 deletions

View File

@@ -12,7 +12,6 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.elegant.network.utils.GsonUtil;
import com.mogo.aicloud.services.socket.IMogoOnMessageListener;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.eagle.core.data.BaseData;
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
@@ -42,7 +41,6 @@ import com.mogo.och.bus.constant.BusConst;
import com.mogo.och.bus.net.OrderServiceManager;
import com.mogo.och.bus.presenter.BusModelLoopManager;
import com.mogo.och.bus.util.BusAnalyticsManager;
import com.mogo.och.bus.util.BusSendTripInfoManager;
import com.mogo.och.bus.util.BusTrajectoryManager;
import com.mogo.och.bus.util.BusVoiceManager;
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotManager;
@@ -51,9 +49,9 @@ import com.mogo.och.common.module.manager.socket.cloud.IOchOnMessageListener;
import com.mogo.och.common.module.manager.socket.cloud.action.OperateAction2;
import com.mogo.och.common.module.manager.socket.lan.ILanMessageListener;
import com.mogo.och.common.module.manager.socket.lan.LanSocketManager;
import com.mogo.och.common.module.manager.socket.lan.LedScreenManager;
import com.mogo.och.common.module.manager.socket.lan.bean.AppConnectMsg;
import com.mogo.och.common.module.manager.socket.cloud.OCHSocketMessageManager;
import com.mogo.och.common.module.manager.socket.cloud.data.OCHOperationalMessage;
import com.mogo.och.common.module.biz.login.LoginStatusManager;
import com.mogo.och.common.module.manager.socket.lan.bean.BusCacheKey;
import com.mogo.och.common.module.manager.socket.lan.bean.BusinessType;
@@ -623,7 +621,7 @@ public class OrderModel {
backgroundCurrentStationIndex = 0;
if (busRoutesResult != null) {
BusSendTripInfoManager.INSTANCE.sendBusTripInfo(BusSendTripInfoManager.END_TRIP
LedScreenManager.sendTripInfo2Led(LedScreenManager.END_TRIP
, busRoutesResult.getName()
, ""
, ""
@@ -650,7 +648,7 @@ public class OrderModel {
if (busRoutesResult != null) {
boolean isLastStop = leaveIndex + 1 == stationList.size() - 1;
//给bus外屏发送
BusSendTripInfoManager.INSTANCE.sendBusTripInfo(BusSendTripInfoManager.LEAVE_STATION
LedScreenManager.sendTripInfo2Led(LedScreenManager.LEAVE_STATION
, busRoutesResult.getName()
, leaveStation
, nextStation
@@ -827,7 +825,7 @@ public class OrderModel {
if (busRoutesResult != null) {
boolean isLastStop = arrivedStationIndex == busRoutesResult.getSites().size() - 1;
//给bus外屏发送
BusSendTripInfoManager.INSTANCE.sendBusTripInfo(BusSendTripInfoManager.ARRIVE_STATION
LedScreenManager.sendTripInfo2Led(LedScreenManager.ARRIVE_STATION
, busRoutesResult.getName()
, departureStopName
, arriveStation
@@ -975,7 +973,7 @@ public class OrderModel {
stationList.get(0).getDrivingStatus() == STATION_STATUS_STOPPED
&& !stationList.get(0).isLeaving()) { //默认是第一站到站查询
if (busRoutesResult != null) { // 第一站到站也是行程开始的时候
BusSendTripInfoManager.INSTANCE.sendBusTripInfo(BusSendTripInfoManager.START_TRIP
LedScreenManager.sendTripInfo2Led(LedScreenManager.START_TRIP
, busRoutesResult.getName(), "", "", false);
}

View File

@@ -1,36 +0,0 @@
package com.mogo.och.bus.util
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
/**
* @author: wangmingjun
* @date: 2022/10/24
*/
object BusSendTripInfoManager{
const val START_TRIP = 1
const val END_TRIP = 2
const val LEAVE_STATION = 3
const val ARRIVE_STATION = 4
/**
* 行程信息
* @param type 事件类型, 1:行程开始, 2:行程结束, 3:出站, 4:进站, 5:城市占道施工预警
* @param lineName 路线名, for type 1, 2
* @param departureStopName 出站站点名, for type 3, 4
* @param arrivalStopName 下一站到达站点名, for type 3, 4
* @param isLastStop 是否终点站(下一站或者要到达站)
* @return
*/
fun sendBusTripInfo(type: Int, lineName: String,
departureStopName: String,
arrivalStopName: String,
isLastStop: Boolean) {
d(SceneConstant.M_BUS + "BusSendTripInfoManager", "type: "+ type
+", lineName: "+ lineName +", departureStopName: "+ departureStopName
+ ", arrivalStopName: "+arrivalStopName+", isLastStop: "+isLastStop)
CallerAutoPilotControlManager.sendTripInfo(type,lineName,departureStopName, arrivalStopName, isLastStop)
}
}