diff --git a/OCH/mogo-och-bus-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java b/OCH/mogo-och-bus-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java
index 8158d0d0ec..9e2bd8577a 100644
--- a/OCH/mogo-och-bus-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java
+++ b/OCH/mogo-och-bus-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java
@@ -464,21 +464,22 @@ public class BusPassengerModel {
int state = autopilotStatusInfo.getState();
if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
//2022.7.20 自动驾驶更换成带档位的
-// if (mADASStatusCallback != null) mADASStatusCallback.onAutopilotRunning();
+ if (mADASStatusCallback != null) mADASStatusCallback.onAutopilotRunning();
} else if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE) {
if(state != mPreAutoStatus){
mTwoStationsRouts.clear();
}
-// if (mADASStatusCallback != null) mADASStatusCallback.onAutopilotEnable();
+ if (mADASStatusCallback != null) mADASStatusCallback.onAutopilotEnable();
} else if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE) {
if(state != mPreAutoStatus){
mTwoStationsRouts.clear();
}
-// if (mADASStatusCallback != null) mADASStatusCallback.onAutopilotDisable();
+ if (mADASStatusCallback != null) mADASStatusCallback.onAutopilotDisable();
}else if (state == IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING){
if(state != mPreAutoStatus){
mTwoStationsRouts.clear();
}
+ if (mADASStatusCallback != null) mADASStatusCallback.onAutopilotRunning();
}
mPreAutoStatus = state;
}
diff --git a/OCH/mogo-och-bus-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.java b/OCH/mogo-och-bus-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.java
index baef2025d1..dd5398ace9 100644
--- a/OCH/mogo-och-bus-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.java
+++ b/OCH/mogo-och-bus-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.java
@@ -439,9 +439,10 @@ public class BusPassengerRouteFragment extends
dis = NumberFormatUtil.formatLong((double)meters / 1000);
}
}
- String strHtml2 = "距离 " + "" + dis + "" + " "+disUnit+""
- + "   剩余 " + "" + (int)Math.ceil((double)timeInSecond/ 60f) + "" + " 分钟";
- mCurrentArriveTip.setText(Html.fromHtml(strHtml2));
+// String strHtml2 = "距离 " + "" + dis + "" + " "+disUnit+""
+// + "   剩余 " + "" + (int)Math.ceil((double)timeInSecond/ 60f) + "" + " 分钟";
+ String str = dis+disUnit+" | "+(int)Math.ceil((double)timeInSecond/ 60f)+"分钟";
+ mCurrentArriveTip.setText(str);
}
public void onAutopilotStatusChanged(int status) {
@@ -456,11 +457,11 @@ public class BusPassengerRouteFragment extends
public void AutopilotStatusChanged(int status) {
if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING == status) {
- mAutopilotIv.setImageResource(R.drawable.bus_p_auto_nor);
+ mAutopilotIv.setImageResource(R.drawable.auto_open);
} else if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE == status){
- mAutopilotIv.setImageResource(R.drawable.bus_p_un_auto_nor);
+ mAutopilotIv.setImageResource(R.drawable.auto_close);
} else {
- mAutopilotIv.setImageResource(R.drawable.bus_p_un_auto_nor);
+ mAutopilotIv.setImageResource(R.drawable.auto_close);
}
}
}
diff --git a/OCH/mogo-och-bus-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/ui/widget/BusPTurnLightView.kt b/OCH/mogo-och-bus-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/ui/widget/BusPTurnLightView.kt
new file mode 100644
index 0000000000..a822623d22
--- /dev/null
+++ b/OCH/mogo-och-bus-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/ui/widget/BusPTurnLightView.kt
@@ -0,0 +1,16 @@
+package com.mogo.och.bus.passenger.ui.widget
+
+import android.content.Context
+import android.util.AttributeSet
+import com.mogo.eagle.core.function.hmi.ui.vehicle.TurnLightViewStatus
+
+/**
+ * @author: wangmingjun
+ * @date: 2023/2/13
+ */
+class BusPTurnLightView @JvmOverloads constructor(
+ context: Context, attrs: AttributeSet? = null
+) : TurnLightViewStatus(context, attrs) {
+
+
+}
\ No newline at end of file
diff --git a/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_youzhuan_open.png b/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_youzhuan_open.png
new file mode 100644
index 0000000000..fb728e515e
Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_youzhuan_open.png differ
diff --git a/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_youzhuan_un_open.png b/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_youzhuan_un_open.png
new file mode 100644
index 0000000000..4de98ca6dd
Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_youzhuan_un_open.png differ
diff --git a/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_zuozhuan_open.png b/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_zuozhuan_open.png
new file mode 100644
index 0000000000..5762da6053
Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_zuozhuan_open.png differ
diff --git a/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_zuozhuan_un_open.png b/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_zuozhuan_un_open.png
new file mode 100644
index 0000000000..ae29f98f34
Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_zuozhuan_un_open.png differ
diff --git a/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable/brakelight_background_daytime.xml b/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable/brakelight_background_daytime.xml
new file mode 100644
index 0000000000..6409baca2f
--- /dev/null
+++ b/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable/brakelight_background_daytime.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/OCH/mogo-och-bus-passenger/src/jinlvvan/res/layout/bus_p_route_fragment.xml b/OCH/mogo-och-bus-passenger/src/jinlvvan/res/layout/bus_p_route_fragment.xml
index a3259e0e51..197c0bc4fb 100644
--- a/OCH/mogo-och-bus-passenger/src/jinlvvan/res/layout/bus_p_route_fragment.xml
+++ b/OCH/mogo-och-bus-passenger/src/jinlvvan/res/layout/bus_p_route_fragment.xml
@@ -119,7 +119,7 @@
app:layout_constraintLeft_toLeftOf="@+id/bus_p_speed_tv"
app:layout_constraintTop_toBottomOf="@+id/bus_p_speed_tv" />
-
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/model/CharterPassengerModel.kt b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/model/CharterPassengerModel.kt
index ceb97a05e8..5d2d4086e2 100644
--- a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/model/CharterPassengerModel.kt
+++ b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/model/CharterPassengerModel.kt
@@ -844,71 +844,88 @@ object CharterPassengerModel {
@Synchronized
fun arriveDest() {
- orderInfo?.let { order->
- order.lineId?.let {lineId->
- order.siteId?.let { siteId ->
- if (order.arriveStatus == OrderInfoResponse.ARRIVING) {
- if (broadcastList["${siteId}$endKey"] == null || broadcastList["${siteId}$endKey"] == false) {
- val currentTimeStamp = DateTimeUtil.getCurrentTimeStamp()
- BusPassengerServiceManager.arriveDest(
- mContext,
- lindId = lineId,
- writtenVersion = currentTimeStamp,
- object : OchCommonServiceCallback {
- override fun onSuccess(data: BaseData?) {
- if (null != data && 0 == data.code) {
- VoiceManager.arrivedStation(
- order.siteName!!,
- order.siteNameKr ?: "",
- VoiceFocusManager.getVoiceCmdCallBack()
- )
- broadcastList["${siteId}$endKey"] = true
- // 给司机端
+ val (order, lineId, siteId) = getOrderInfo()
+ if(order!=null&&lineId!=null&&siteId!=null){
+ if (order.arriveStatus == OrderInfoResponse.ARRIVING) {
+ if (broadcastList["${siteId}$endKey"] == null || broadcastList["${siteId}$endKey"] == false) {
+ val currentTimeStamp = DateTimeUtil.getCurrentTimeStamp()
+ BusPassengerServiceManager.arriveDest(
+ mContext,
+ lindId = lineId,
+ writtenVersion = currentTimeStamp,
+ object : OchCommonServiceCallback {
+ override fun onSuccess(data: BaseData?) {
+ if (null != data && 0 == data.code) {
+ arrivedDeskSuccess(currentTimeStamp,true)
+ }
+ }
- val msg = ChangeDestMsg(
- order.orderNo?:":",
- lineId.toInt(),
- order.lineName?:"",
- order.startSiteId?:0,
- order.startSiteName?:"",
- siteId.toInt(),
- order.siteName,
- true,
- 2,
- currentTimeStamp
- )
- CallerTelematicManager.sendMsgToServer(
- OchCommonConst.BUSINESS_STRING,
- GsonUtils.toJson(msg).toByteArray()
- )
- CallerLogger.d(M_BUS_P + BaseDPMsg.TAG, "到站发送数据${msg}")
-
- switchLine5minWait?.let {
- if (!it.isDisposed) {
- it.dispose()
- }
- }
-
- // 到站结束自驾
- CallerAutoPilotControlManager.cancelAutoPilot()
- // 结束路距计算
- endCalculateDistanceLoop()
- // 到站置距离位0
- invokeStationDistanceListener(-1,-1)
-
- }
- }
-
- override fun onFail(code: Int, msg: String) {
- ToastUtils.showShort("$code:$msg")
- }
- })
- }
- }
+ override fun onFail(code: Int, msg: String) {
+ ToastUtils.showShort("$code:$msg")
+ }
+ })
}
}
}
+ }
+ fun arrivedDeskSuccess(
+ currentTimeStamp: Long,
+ needSendDriver:Boolean
+ ) {
+ val (order, lineId, siteId) = getOrderInfo()
+ if(order!=null&&lineId!=null&&siteId!=null){
+ VoiceManager.arrivedStation(
+ order.siteName!!,
+ order.siteNameKr ?: "",
+ VoiceFocusManager.getVoiceCmdCallBack()
+ )
+ broadcastList["${siteId}$endKey"] = true
+ // 给司机端
+ if (needSendDriver) {
+ val msg = ChangeDestMsg(
+ order.orderNo ?: ":",
+ lineId.toInt(),
+ order.lineName ?: "",
+ order.startSiteId ?: 0,
+ order.startSiteName ?: "",
+ siteId.toInt(),
+ order.siteName,
+ true,
+ OrderInfoResponse.ARRIVED,
+ currentTimeStamp
+ )
+ CallerTelematicManager.sendMsgToServer(
+ OchCommonConst.BUSINESS_STRING,
+ GsonUtils.toJson(msg).toByteArray()
+ )
+ CallerLogger.d(M_BUS_P + BaseDPMsg.TAG, "到站发送数据${msg}")
+ }
+
+ switchLine5minWait?.let {
+ if (!it.isDisposed) {
+ it.dispose()
+ }
+ }
+
+ // 到站结束自驾
+ CallerAutoPilotControlManager.cancelAutoPilot()
+ // 结束路距计算
+ endCalculateDistanceLoop()
+ // 到站置距离位0
+ invokeStationDistanceListener(-1, -1)
+ }
+ }
+
+ private fun getOrderInfo():Triple{
+ this.orderInfo?.let { order->
+ this.orderInfo?.lineId?.let { lineId ->
+ this.orderInfo?.siteId?.let { siteId ->
+ return Triple(order,lineId,siteId)
+ }
+ }
+ }
+ return Triple(null,null,null)
}
@Synchronized
@@ -917,8 +934,9 @@ object CharterPassengerModel {
order.siteId?.let { siteId ->
if (order.arriveStatus == OrderInfoResponse.ARRIVING) {
if (broadcastList["${siteId}$ending100Key"] == null || broadcastList["${siteId}$ending100Key"] == false) {
- val string = mContext.getString(R.string.arrived_station_left_100)
+ val string = mContext.getString(R.string.arrived_station_left_100,order.siteName)
VoiceNotice.showNotice(string)
+ broadcastList["${siteId}$ending100Key"] = true
}
}
}
@@ -961,9 +979,11 @@ object CharterPassengerModel {
}
val parameters = initAutopilotControlParameters()
if (null == parameters) {
+ ToastUtils.showShort("请选择站点")
CallerLogger.e(SceneConstant.M_BUS + TAG, "行程日志-AutopilotControlParameters is empty.")
return
}
+ ToastUtils.showShort("启动自动驾驶中")
startAutoPilot(parameters)
CallerLogger.d(
SceneConstant.M_BUS + TAG,
diff --git a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionOrderPresenter.kt b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionOrderPresenter.kt
index ff00e03a79..13422731e7 100644
--- a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionOrderPresenter.kt
+++ b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionOrderPresenter.kt
@@ -180,10 +180,14 @@ class BusPassengerFunctionOrderPresenter(view: M1OrderLineFragment?) :
if (type == OchCommonConst.BUSINESS_STRING) {
val msg = GsonUtils.fromJson(
String(byteArray),
- ChangeDestMsg::class.java
- ) as ChangeDestMsg
- CallerLogger.d(M_BUS_P + BaseDPMsg.TAG, "接受数据:切换站点${msg}")
+ BaseDPMsg::class.java
+ ) as BaseDPMsg
if (msg.type == DPMsgType.TYPE_CHANGE_DEST.type) {
+ val msg = GsonUtils.fromJson(
+ String(byteArray),
+ ChangeDestMsg::class.java
+ ) as ChangeDestMsg
+ CallerLogger.d(M_BUS_P + BaseDPMsg.TAG, "接受数据:切换站点${msg}")
if (msg.isConfirmed) {
ToastUtils.showShort("站点确定")
mView?.setEnableSiteStatus(true)
diff --git a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/presenter/BusPassengerPresenter.kt b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/presenter/BusPassengerPresenter.kt
index 4bf0aac8e7..f72bd59518 100644
--- a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/presenter/BusPassengerPresenter.kt
+++ b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/presenter/BusPassengerPresenter.kt
@@ -109,6 +109,7 @@ class BusPassengerPresenter(view: MainFragment?) :
override fun setDistancecAndTime(meters: Long, timeInSecond: Long) {
if (meters < 0 && timeInSecond < 0) {
setDistanceAndTime("--", context.getString(R.string.m1_distance_unit_km), "--", "--")
+ return
}
var dis: String? = "0"
var disUnit = "KM"
diff --git a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/receive/DriverMessage.kt b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/receive/DriverMessage.kt
index bd16acb41d..b1f3cbf364 100644
--- a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/receive/DriverMessage.kt
+++ b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/receive/DriverMessage.kt
@@ -5,13 +5,16 @@ import com.mogo.commons.voice.AIAssist
import com.mogo.eagle.core.function.api.telematic.IReceivedMsgListener
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
+import com.mogo.eagle.core.utilcode.util.ActivityUtils
import com.mogo.eagle.core.utilcode.util.GsonUtils
+import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.mogo.och.bus.passenger.R
-import com.mogo.och.common.module.bean.dpmsg.AppConnectMsg
-import com.mogo.och.common.module.bean.dpmsg.BaseDPMsg
-import com.mogo.och.common.module.bean.dpmsg.DPCommonOperationMsg
-import com.mogo.och.common.module.bean.dpmsg.DPMsgType
+import com.mogo.och.bus.passenger.bean.response.OrderInfoResponse
+import com.mogo.och.bus.passenger.model.CharterPassengerModel
+import com.mogo.och.bus.passenger.net.BusPassengerModelLoopManager
+import com.mogo.och.bus.passenger.presenter.BusPassengerFunctionOrderPresenter
+import com.mogo.och.common.module.bean.dpmsg.*
import com.mogo.och.common.module.biz.common.socketmessage.OCHSocketMessageManager
import com.mogo.och.common.module.biz.constant.OchCommonConst
import com.mogo.och.common.module.manager.devicemanage.LightAirconditionDoorManager
@@ -19,6 +22,7 @@ import com.mogo.och.common.module.manager.devicemanage.LightAirconditionDoorStat
import com.mogo.och.common.module.utils.DateTimeUtil
import com.mogo.och.common.module.utils.RxUtils
import com.mogo.och.common.module.utils.SoundPoolHelper
+import com.mogo.och.common.module.voice.VoiceNotice
object DriverMessage: IReceivedMsgListener {
override fun onReceivedMsg(type: Int, byteArray: ByteArray) {
@@ -59,15 +63,23 @@ object DriverMessage: IReceivedMsgListener {
)
}
if(msg.isPlay){
- AIAssist.getInstance(AbsMogoApplication.getApp()).speakTTSVoiceWithLevel(msg.msg, AIAssist.LEVEL1)
+ VoiceNotice.showNotice(msg.msg, AIAssist.LEVEL1)
if(msg.msg.contains("核销成功")){
- RxUtils.createSubscribe(15_000) {
- val string = AbsMogoApplication.getApp().getString(R.string.m1_welcome_tts)
- AIAssist.getInstance(AbsMogoApplication.getApp()).speakTTSVoiceWithLevel(string, AIAssist.LEVEL1)
- }
+ val string = AbsMogoApplication.getApp().getString(R.string.m1_welcome_tts)
+ VoiceNotice.showNotice(string, AIAssist.LEVEL1,15_000)
}
}
}
+ DPMsgType.TYPE_CHANGE_DEST.type -> {
+ val msg = GsonUtils.fromJson(
+ String(byteArray),
+ ChangeDestMsg::class.java
+ ) as ChangeDestMsg
+ if (msg.isConfirmed&&msg.arriveStatus== OrderInfoResponse.ARRIVED) {
+ CallerLogger.d(SceneConstant.M_BUS_P + BaseDPMsg.TAG, "接受数据:到站${msg}")
+ CharterPassengerModel.arrivedDeskSuccess(msg.writtenVersion?:0,false)
+ }
+ }
else -> {}
}
}
@@ -80,7 +92,7 @@ object DriverMessage: IReceivedMsgListener {
}
private fun playDI() {
- SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(AbsMogoApplication.getApp(), R.raw.m1_voice_di)
+ SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(ActivityUtils.getTopActivity(), R.raw.m1_voice_di)
}
diff --git a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/ui/MainFragment.kt b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/ui/MainFragment.kt
index 4b0a45b090..012c15cf9f 100644
--- a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/ui/MainFragment.kt
+++ b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/ui/MainFragment.kt
@@ -162,13 +162,13 @@ class MainFragment :
arriveTime:String
) {
tv_distance.text = distance
- tv_distance_unit.text = "距离(${distanceUnit})"
+ tv_distance_unit.text = distanceUnit
tv_distance_surplus_time.text = leftTime
tv_distance_arrive_time.text = arriveTime
}
fun setCarModle(rawInfo: Int){
- CallerMapUIServiceManager.getMapUIController()?.changeCurrentIcon(rawInfo)
+ getMapUIController()?.changeCurrentIcon(rawInfo)
HdMapBuildConfig.currentCarVrIconRes = rawInfo
}
diff --git a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/ui/view/bottom/impl/GoViewWithArrive.kt b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/ui/view/bottom/impl/GoViewWithArrive.kt
index 94fc93bf6c..cb20a12286 100644
--- a/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/ui/view/bottom/impl/GoViewWithArrive.kt
+++ b/OCH/mogo-och-charter-passenger/src/main/java/com/mogo/och/bus/passenger/ui/view/bottom/impl/GoViewWithArrive.kt
@@ -82,7 +82,6 @@ class GoViewWithArrive @JvmOverloads constructor(
ToastUtils.showShort("设备未就绪请稍等")
}
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE -> {//
- ToastUtils.showShort("启动自动驾驶中")
CallerAutoPilotControlManager.sendPlanningCmd(2)
CharterPassengerModel.startAutopilot()
onceRegisterAutoStatus()
diff --git a/OCH/mogo-och-charter-passenger/src/main/res/drawable-nodpi/charter_p_guidace_2.png b/OCH/mogo-och-charter-passenger/src/main/res/drawable-nodpi/charter_p_guidace_2.png
index 2ad2bbc3f8..be354f9b64 100644
Binary files a/OCH/mogo-och-charter-passenger/src/main/res/drawable-nodpi/charter_p_guidace_2.png and b/OCH/mogo-och-charter-passenger/src/main/res/drawable-nodpi/charter_p_guidace_2.png differ
diff --git a/OCH/mogo-och-charter-passenger/src/main/res/drawable-nodpi/charter_p_guidace_3.png b/OCH/mogo-och-charter-passenger/src/main/res/drawable-nodpi/charter_p_guidace_3.png
index ed9cff148b..a1b3eb1041 100644
Binary files a/OCH/mogo-och-charter-passenger/src/main/res/drawable-nodpi/charter_p_guidace_3.png and b/OCH/mogo-och-charter-passenger/src/main/res/drawable-nodpi/charter_p_guidace_3.png differ
diff --git a/OCH/mogo-och-charter-passenger/src/main/res/drawable-nodpi/charter_p_guidace_4.png b/OCH/mogo-och-charter-passenger/src/main/res/drawable-nodpi/charter_p_guidace_4.png
index ca8f4969c8..01f5efeae8 100644
Binary files a/OCH/mogo-och-charter-passenger/src/main/res/drawable-nodpi/charter_p_guidace_4.png and b/OCH/mogo-och-charter-passenger/src/main/res/drawable-nodpi/charter_p_guidace_4.png differ
diff --git a/OCH/mogo-och-charter-passenger/src/main/res/drawable-nodpi/charter_p_select_line_bg.png b/OCH/mogo-och-charter-passenger/src/main/res/drawable-nodpi/charter_p_select_line_bg.png
new file mode 100644
index 0000000000..c8c472a681
Binary files /dev/null and b/OCH/mogo-och-charter-passenger/src/main/res/drawable-nodpi/charter_p_select_line_bg.png differ
diff --git a/OCH/mogo-och-charter-passenger/src/main/res/layout/m1_order_fragment.xml b/OCH/mogo-och-charter-passenger/src/main/res/layout/m1_order_fragment.xml
index a24a4b8b59..cc7bf855a6 100644
--- a/OCH/mogo-och-charter-passenger/src/main/res/layout/m1_order_fragment.xml
+++ b/OCH/mogo-och-charter-passenger/src/main/res/layout/m1_order_fragment.xml
@@ -11,7 +11,7 @@
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="@dimen/dp_286"
- android:background="@drawable/bus_p_function_setting_soft_b_shape"
+ android:background="@drawable/charter_p_select_line_bg"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="936:500"
app:layout_constraintStart_toStartOf="parent"
diff --git a/OCH/mogo-och-shuttle-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java b/OCH/mogo-och-shuttle-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java
index 31fda8ee1e..5ca3230d04 100644
--- a/OCH/mogo-och-shuttle-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java
+++ b/OCH/mogo-och-shuttle-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java
@@ -473,21 +473,22 @@ public class BusPassengerModel {
int state = autopilotStatusInfo.getState();
if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
//2022.7.20 自动驾驶更换成带档位的
-// if (mADASStatusCallback != null) mADASStatusCallback.onAutopilotRunning();
+ if (mADASStatusCallback != null) mADASStatusCallback.onAutopilotRunning();
} else if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE) {
if(state != mPreAutoStatus){
mTwoStationsRouts.clear();
}
-// if (mADASStatusCallback != null) mADASStatusCallback.onAutopilotEnable();
+ if (mADASStatusCallback != null) mADASStatusCallback.onAutopilotEnable();
} else if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE) {
if(state != mPreAutoStatus){
mTwoStationsRouts.clear();
}
-// if (mADASStatusCallback != null) mADASStatusCallback.onAutopilotDisable();
+ if (mADASStatusCallback != null) mADASStatusCallback.onAutopilotDisable();
}else if (state == IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING){
if(state != mPreAutoStatus){
mTwoStationsRouts.clear();
}
+ if (mADASStatusCallback != null) mADASStatusCallback.onAutopilotRunning();
}
mPreAutoStatus = state;
}
diff --git a/OCH/mogo-och-shuttle-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.java b/OCH/mogo-och-shuttle-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.java
index b44de31ac4..00834c42d4 100644
--- a/OCH/mogo-och-shuttle-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.java
+++ b/OCH/mogo-och-shuttle-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.java
@@ -390,9 +390,10 @@ public class BusPassengerRouteFragment extends
dis = NumberFormatUtil.formatLong((double)meters / 1000);
}
}
- String strHtml2 = "距离 " + "" + dis + "" + " "+disUnit+""
- + "   剩余 " + "" + (int)Math.ceil((double)timeInSecond/ 60f) + "" + " 分钟";
- mCurrentArriveTip.setText(Html.fromHtml(strHtml2));
+// String strHtml2 = "距离 " + "" + dis + "" + " "+disUnit+""
+// + "   剩余 " + "" + (int)Math.ceil((double)timeInSecond/ 60f) + "" + " 分钟";
+ String str = dis+disUnit+" | "+(int)Math.ceil((double)timeInSecond/ 60f)+"分钟";
+ mCurrentArriveTip.setText(Html.fromHtml(str));
}
public void onAutopilotStatusChanged(int status) {
@@ -407,11 +408,11 @@ public class BusPassengerRouteFragment extends
public void AutopilotStatusChanged(int status) {
if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING == status) {
- mAutopilotIv.setImageResource(R.drawable.bus_p_auto_nor);
+ mAutopilotIv.setImageResource(R.drawable.auto_open);
} else if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE == status){
- mAutopilotIv.setImageResource(R.drawable.bus_p_un_auto_nor);
+ mAutopilotIv.setImageResource(R.drawable.auto_close);
} else {
- mAutopilotIv.setImageResource(R.drawable.bus_p_un_auto_nor);
+ mAutopilotIv.setImageResource(R.drawable.auto_close);
}
}
}
diff --git a/OCH/mogo-och-shuttle-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/ui/widget/BusPTurnLightView.kt b/OCH/mogo-och-shuttle-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/ui/widget/BusPTurnLightView.kt
new file mode 100644
index 0000000000..a822623d22
--- /dev/null
+++ b/OCH/mogo-och-shuttle-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/ui/widget/BusPTurnLightView.kt
@@ -0,0 +1,16 @@
+package com.mogo.och.bus.passenger.ui.widget
+
+import android.content.Context
+import android.util.AttributeSet
+import com.mogo.eagle.core.function.hmi.ui.vehicle.TurnLightViewStatus
+
+/**
+ * @author: wangmingjun
+ * @date: 2023/2/13
+ */
+class BusPTurnLightView @JvmOverloads constructor(
+ context: Context, attrs: AttributeSet? = null
+) : TurnLightViewStatus(context, attrs) {
+
+
+}
\ No newline at end of file
diff --git a/OCH/mogo-och-shuttle-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_youzhuan_open.png b/OCH/mogo-och-shuttle-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_youzhuan_open.png
new file mode 100644
index 0000000000..fb728e515e
Binary files /dev/null and b/OCH/mogo-och-shuttle-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_youzhuan_open.png differ
diff --git a/OCH/mogo-och-shuttle-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_youzhuan_un_open.png b/OCH/mogo-och-shuttle-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_youzhuan_un_open.png
new file mode 100644
index 0000000000..4de98ca6dd
Binary files /dev/null and b/OCH/mogo-och-shuttle-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_youzhuan_un_open.png differ
diff --git a/OCH/mogo-och-shuttle-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_zuozhuan_open.png b/OCH/mogo-och-shuttle-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_zuozhuan_open.png
new file mode 100644
index 0000000000..5762da6053
Binary files /dev/null and b/OCH/mogo-och-shuttle-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_zuozhuan_open.png differ
diff --git a/OCH/mogo-och-shuttle-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_zuozhuan_un_open.png b/OCH/mogo-och-shuttle-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_zuozhuan_un_open.png
new file mode 100644
index 0000000000..ae29f98f34
Binary files /dev/null and b/OCH/mogo-och-shuttle-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_zuozhuan_un_open.png differ
diff --git a/OCH/mogo-och-shuttle-passenger/src/jinlvvan/res/drawable/brakelight_background_daytime.xml b/OCH/mogo-och-shuttle-passenger/src/jinlvvan/res/drawable/brakelight_background_daytime.xml
new file mode 100644
index 0000000000..6409baca2f
--- /dev/null
+++ b/OCH/mogo-och-shuttle-passenger/src/jinlvvan/res/drawable/brakelight_background_daytime.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/OCH/mogo-och-shuttle-passenger/src/jinlvvan/res/layout/bus_p_route_fragment.xml b/OCH/mogo-och-shuttle-passenger/src/jinlvvan/res/layout/bus_p_route_fragment.xml
index d4070a3de1..ce9bcdbc7e 100644
--- a/OCH/mogo-och-shuttle-passenger/src/jinlvvan/res/layout/bus_p_route_fragment.xml
+++ b/OCH/mogo-och-shuttle-passenger/src/jinlvvan/res/layout/bus_p_route_fragment.xml
@@ -110,7 +110,7 @@
app:layout_constraintTop_toBottomOf="@+id/bus_p_speed_tv" />
-
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoAdasListenerImpl.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoAdasListenerImpl.kt
index 2bf5aa76aa..ea44139ef5 100644
--- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoAdasListenerImpl.kt
+++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/adapter/MoGoAdasListenerImpl.kt
@@ -108,15 +108,15 @@ class MoGoAdasListenerImpl : OnAdasListener {
}
}
- //感知物体
- @ChainLog(
- linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_DATA_TRACKED,
- linkCode = CHAIN_LINK_ADAS,
- endpoint = PAD,
- nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_RECT_DATA,
- paramIndexes = [0, 1],
- clientPkFileName = "sn"
- )
+ //感知物体 注解暂时关闭,通过调试面板查看数量,此注解暂时用于aiCloud显示感知物
+// @ChainLog(
+// linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_DATA_TRACKED,
+// linkCode = CHAIN_LINK_ADAS,
+// endpoint = PAD,
+// nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_RECT_DATA,
+// paramIndexes = [0, 1],
+// clientPkFileName = "sn"
+// )
override fun onTrackedObjects(
header: MessagePad.Header,
trackedObjects: MessagePad.TrackedObjects
diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/trace/TraceManager.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/trace/TraceManager.kt
index 330c6ccc73..c2fcbd8793 100644
--- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/trace/TraceManager.kt
+++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/trace/TraceManager.kt
@@ -54,7 +54,7 @@ class TraceManager : IMoGoCloudListener, IMoGoAutopilotCarConfigListener {
fwBuildMap[ChainConstant.CHAIN_LINK_LOG_WEB_SOCKET_AUTOPILOT] =
FwBuild(true, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_ADAS_AUTO)
fwBuildMap[ChainConstant.CHAIN_LINK_LOG_WEB_SOCKET_DATA_TRACKED] =
- FwBuild(false, 30, pkgName + ChainConstant.CHAIN_LINK_LOG_ADAS_DATA_TRACK)
+ FwBuild(true, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_ADAS_DATA_TRACK)
fwBuildMap[ChainConstant.CHAIN_LINK_LOG_WEB_SOCKET_TRAJECTORY] =
FwBuild(false, 30, pkgName + ChainConstant.CHAIN_LINK_LOG_ADAS_TRAJECTORY)
fwBuildMap[ChainConstant.CHAIN_LINK_LOG_WEB_SOCKET_VEHICLE] =
@@ -82,7 +82,7 @@ class TraceManager : IMoGoCloudListener, IMoGoAutopilotCarConfigListener {
traceInfoCache[ChainConstant.CHAIN_LINK_LOG_WEB_SOCKET_AUTOPILOT] =
ChainLogParam(true, "ADAS自动驾驶链路(包含: 自动驾驶状态交互,全局路径,到站提醒,节点状态,异常上报)")
traceInfoCache[ChainConstant.CHAIN_LINK_LOG_WEB_SOCKET_DATA_TRACKED] =
- ChainLogParam(false, "ADAS感知物体")
+ ChainLogParam(true, "ADAS感知物体")
traceInfoCache[ChainConstant.CHAIN_LINK_LOG_WEB_SOCKET_TRAJECTORY] =
ChainLogParam(false, "ADAS车前引导线")
traceInfoCache[ChainConstant.CHAIN_LINK_LOG_WEB_SOCKET_VEHICLE] =
diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/upgrade/UpgradeAppNetWorkManager.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/upgrade/UpgradeAppNetWorkManager.kt
index ec176f37c3..e2b79cd036 100644
--- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/upgrade/UpgradeAppNetWorkManager.kt
+++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/upgrade/UpgradeAppNetWorkManager.kt
@@ -43,12 +43,18 @@ class UpgradeAppNetWorkManager private constructor() {
scope.launch {
val sn = MoGoAiCloudClientConfig.getInstance().sn //null
val macAddress = mac //"48:b0:2d:4d:31:7f"
- val type = screenType //10
+ val type = screenType //"10"
SharedPrefsMgr.getInstance(context!!).putString(SharedPrefsConstants.HOST_ADDRESS, HostConst.getHost())
try {
val records = provider?.getUpgradeRecords()?.also {
- MogoAnalyticUtils.track("AppUpgradeRecord", it.let { TreeMap().also { itx -> itx.putAll(it) } })
+ MogoAnalyticUtils.track("AppUpgradeRecord", TreeMap().also { itx ->
+ it.entries.forEach { entry ->
+ itx[entry.key] = entry.value.joinToString(",") {
+ "${ it.first } -> ${ it.second }"
+ }
+ }
+ })
}
Log.d(TAG, "getAppUpgradeInfo: -> records:" + records?.entries?.joinToString(",") { itx -> "key:${itx.key} -> value:[${itx.value.joinToString(",") { "${it.first},${it.second}" } }]"})
val versionCode = AppUtils.getAppVersionCode()
diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/upgrade/UpgradeManager.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/upgrade/UpgradeManager.kt
index 727f2395ee..038c36ce71 100644
--- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/upgrade/UpgradeManager.kt
+++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/upgrade/UpgradeManager.kt
@@ -166,6 +166,7 @@ class UpgradeManager : IDownloadListener {
}
} else {
val apk = File(localPath)
+ upgradeProvider?.recordInstallStart()
withContext(Dispatchers.Main) {
ApkInstaller.installApp(Utils.getApp(), apk) { code, reason ->
if (code != PackageInstaller.STATUS_SUCCESS) {
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiProvider.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiProvider.kt
index 53668b88a6..74b91eeb29 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiProvider.kt
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiProvider.kt
@@ -127,14 +127,13 @@ class MoGoHmiProvider : IMoGoHmiProvider {
"--- show v2x dialog 1 ---: info -> v2x-type: $v2xType : expireTime: $expireTime"
)
lastShowV2XJob?.safeCancel()
- ProcessLifecycleOwner.get().lifecycleScope.launch(Dispatchers.Default) {
+ ProcessLifecycleOwner.get().lifecycleScope.launch {
delay(expireTime)
}.also { itx ->
lastShowV2XJob = itx
}.invokeOnCompletion {
listener?.onDismiss()
}
-
Log.d("CODE", "---- 00 ------ tts_content: $ttsContent")
if (ttsContent != null && !TextUtils.isEmpty(ttsContent) && playTTS) {
val last = lastSpeakJob.get()
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/vehicle/TakeOverView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/vehicle/TakeOverView.kt
index 57fa22d3a5..13bc2b42ab 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/vehicle/TakeOverView.kt
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/vehicle/TakeOverView.kt
@@ -79,32 +79,38 @@ class TakeOverView @JvmOverloads constructor(
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_LOCATION,
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_CHASSIS,
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_DISTANCE -> {
- CallerHmiManager.warningV2X(
- EventTypeEnumNew.TAKE_OVER_EVENT.poiType,
- EventTypeEnumNew.TAKE_OVER_EVENT.content,
- EventTypeEnumNew.TAKE_OVER_EVENT.tts,
- object : IMoGoWarningStatusListener {
- override fun onShow() {
- takeOver = true
- visibility = View.VISIBLE
- //加入消息盒子
- saveMsgBox(
- MsgBoxBean(
- MsgBoxType.V2X, V2XMsg(
- EventTypeEnumNew.TAKE_OVER_EVENT.poiType,
- EventTypeEnumNew.TAKE_OVER_EVENT.content,
- EventTypeEnumNew.TAKE_OVER_EVENT.tts
+ if(!isParallel){
+ CallerHmiManager.warningV2X(
+ EventTypeEnumNew.TAKE_OVER_EVENT.poiType,
+ EventTypeEnumNew.TAKE_OVER_EVENT.content,
+ EventTypeEnumNew.TAKE_OVER_EVENT.tts,
+ object : IMoGoWarningStatusListener {
+ override fun onShow() {
+ takeOver = true
+ ThreadUtils.runOnUiThread{
+ visibility = View.VISIBLE
+ }
+ //加入消息盒子
+ saveMsgBox(
+ MsgBoxBean(
+ MsgBoxType.V2X, V2XMsg(
+ EventTypeEnumNew.TAKE_OVER_EVENT.poiType,
+ EventTypeEnumNew.TAKE_OVER_EVENT.content,
+ EventTypeEnumNew.TAKE_OVER_EVENT.tts
+ )
+ )
)
- )
- )
- }
+ }
- override fun onDismiss() {
- takeOver = false
- visibility = View.GONE
- }
- }
- ,isFromObu = false)
+ override fun onDismiss() {
+ takeOver = false
+ ThreadUtils.runOnUiThread{
+ visibility = View.GONE
+ }
+ }
+ }
+ ,isFromObu = false)
+ }
}
//弱网
MogoReport.Code.Error.EPARALLEL.AICLOUD_NETWORK_WEAK,
@@ -118,7 +124,9 @@ class TakeOverView @JvmOverloads constructor(
object : IMoGoWarningStatusListener {
override fun onShow() {
takeOver = true
- visibility = View.VISIBLE
+ ThreadUtils.runOnUiThread{
+ visibility = View.VISIBLE
+ }
//加入消息盒子
saveMsgBox(
MsgBoxBean(
@@ -133,7 +141,9 @@ class TakeOverView @JvmOverloads constructor(
override fun onDismiss() {
takeOver = false
- visibility = View.GONE
+ ThreadUtils.runOnUiThread{
+ visibility = View.GONE
+ }
}
}
,isFromObu = false)
diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/ai/AiCloudIdentifyDataManager.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/ai/AiCloudIdentifyDataManager.kt
index 4c9d09af54..4752d743b3 100644
--- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/ai/AiCloudIdentifyDataManager.kt
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/ai/AiCloudIdentifyDataManager.kt
@@ -4,21 +4,20 @@ import android.content.Context
import com.mogo.aicloud.services.socket.IMogoOnMessageListener
import com.mogo.aicloud.services.socket.MogoAiCloudSocketManager
import com.mogo.commons.debug.DebugConfig
+import com.mogo.commons.module.status.MogoStatusManager
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.deva.chain.ChainConstant
-import com.mogo.eagle.core.data.multidisplay.TelematicConstant
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener
import com.mogo.eagle.core.function.business.ai.net.AiCloudIdentifyNetWorkModel.Companion.aiCloudIdentifyNetWorkModel
import com.mogo.eagle.core.function.business.identify.MapIdentifySubscriber
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
+import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager
import com.mogo.eagle.core.function.call.map.CallerMapRomaListener
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.updateLongSightLevel
-import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
-import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager.sendMsgToServer
import com.mogo.eagle.core.function.utils.MapBizTrace
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.map.MogoMapUIController
@@ -47,7 +46,6 @@ class AiCloudIdentifyDataManager : IMogoMapListener,
}
private var showAiCloud = AtomicBoolean(false)
- private var serverSn = ""
fun initServer(mContext: Context) {
MogoMapListenerHandler.mogoMapListenerHandler.registerHostMapListener(TAG, this)
@@ -125,8 +123,10 @@ class AiCloudIdentifyDataManager : IMogoMapListener,
// CallerMapRomaListener.invokeMapRoma(false)
// sendMsgToServer(TelematicConstant.OPEN_ROMA_STATUS, "4".toByteArray())
// }
- MapBizTrace.log(TAG,"开启请求,data:$dataReceive")
- aiCloudIdentifyNetWorkModel.requestIdentifyRange(dataReceive, serverSn, {
+ val status = MogoStatusManager.getInstance().isSocketOnLine
+ val gnss = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84().gnssInfo
+ MapBizTrace.log(TAG,"开启请求,data:$dataReceive , socketStatus:$status , lon:${gnss.longitude} , lat:${gnss.latitude}")
+ aiCloudIdentifyNetWorkModel.requestIdentifyRange(dataReceive, gnss.longitude,gnss.latitude,{
MapBizTrace.log(
TAG,
"requestIdentifyRange ok startRange:$START_METRE, endRange:$END_METRE , dataReceive:$dataReceive"
@@ -156,7 +156,7 @@ class AiCloudIdentifyDataManager : IMogoMapListener,
when {
// 解除漫游限制
visualAngleMode.isRoma -> {
- MapBizTrace.log(TAG, "onMapVisualAngleChanged, invoke roma")
+ MapBizTrace.log(TAG, "onMapVisualAngleChanged, invoke roma , socketStatus: ${ MogoStatusManager.getInstance().isSocketOnLine}")
showAiCloud.set(true)
FunctionBuildConfig.isDrawIdentifyData = false
}
diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/ai/net/AiCloudIdentifyNetWorkModel.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/ai/net/AiCloudIdentifyNetWorkModel.kt
index 57f6e064f3..61a48f2c0b 100644
--- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/ai/net/AiCloudIdentifyNetWorkModel.kt
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/ai/net/AiCloudIdentifyNetWorkModel.kt
@@ -2,7 +2,6 @@ package com.mogo.eagle.core.function.business.ai.net
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
import com.mogo.commons.constants.HostConst.getEagleHost
-import com.mogo.commons.debug.DebugConfig
import com.mogo.eagle.core.data.BaseResponse
import com.mogo.eagle.core.function.business.ai.AiCloudIdentifyDataManager.Companion.END_METRE
import com.mogo.eagle.core.function.business.ai.AiCloudIdentifyDataManager.Companion.START_METRE
@@ -10,7 +9,7 @@ import com.mogo.eagle.core.network.MoGoRetrofitFactory
import com.mogo.eagle.core.network.apiCall
import com.mogo.eagle.core.network.request
-class AiCloudIdentifyNetWorkModel private constructor(){
+class AiCloudIdentifyNetWorkModel private constructor() {
companion object {
val aiCloudIdentifyNetWorkModel by lazy(LazyThreadSafetyMode.SYNCHRONIZED) {
@@ -25,7 +24,7 @@ class AiCloudIdentifyNetWorkModel private constructor(){
fun requestIdentifyRange(
dataReceive: Boolean,
- serverSn:String,
+ lon: Double, lat: Double,
onSuccess: (() -> Unit),
onError: ((String) -> Unit)
) {
@@ -37,7 +36,12 @@ class AiCloudIdentifyNetWorkModel private constructor(){
map["startMetre"] = START_METRE
map["endMetre"] = END_METRE
map["type"] = 1
- map["relationSn"] = serverSn
+ if (lon != 0.0) {
+ map["lon"] = lon
+ }
+ if (lat != 0.0) {
+ map["lat"] = lat
+ }
}
loader {
apiCall {