Merge branch 'dev_minibus-d_230425_3.2.0' of gitlab.zhidaoauto.com:SCA/L4HA/AndroidApp/MoGoEagleEye into dev_minibus-d_230425_3.2.0
@@ -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;
|
||||
}
|
||||
|
||||
@@ -439,9 +439,10 @@ public class BusPassengerRouteFragment extends
|
||||
dis = NumberFormatUtil.formatLong((double)meters / 1000);
|
||||
}
|
||||
}
|
||||
String strHtml2 = "<font color=\"#2D3E5F\">距离 </font>" + "<b><font color=\"#0043FF\">" + dis + "</font></b>" + "<font color=\"#2D3E5F\"> "+disUnit+"</font>"
|
||||
+ "<font color=\"#2D3E5F\">   剩余 </font>" + "<b><font color=\"#0043FF\">" + (int)Math.ceil((double)timeInSecond/ 60f) + "</font></b>" + "<font color=\"#2D3E5F\"> 分钟</font>";
|
||||
mCurrentArriveTip.setText(Html.fromHtml(strHtml2));
|
||||
// String strHtml2 = "<font color=\"#2D3E5F\">距离 </font>" + "<b><font color=\"#0043FF\">" + dis + "</font></b>" + "<font color=\"#2D3E5F\"> "+disUnit+"</font>"
|
||||
// + "<font color=\"#2D3E5F\">   剩余 </font>" + "<b><font color=\"#0043FF\">" + (int)Math.ceil((double)timeInSecond/ 60f) + "</font></b>" + "<font color=\"#2D3E5F\"> 分钟</font>";
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
|
||||
}
|
||||
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 844 B |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 855 B |
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#C9E0F4" />
|
||||
<corners android:radius="@dimen/dp_30" />
|
||||
</shape>
|
||||
@@ -119,7 +119,7 @@
|
||||
app:layout_constraintLeft_toLeftOf="@+id/bus_p_speed_tv"
|
||||
app:layout_constraintTop_toBottomOf="@+id/bus_p_speed_tv" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.vehicle.TurnLightViewStatus
|
||||
<com.mogo.och.bus.passenger.ui.widget.BusPTurnLightView
|
||||
android:layout_width="@dimen/dp_104"
|
||||
android:layout_height="@dimen/dp_58"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="@dimen/dp_104"
|
||||
android:layout_height="@dimen/dp_58"
|
||||
android:visibility="visible">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/turn_light_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/brakelight_background_daytime"
|
||||
android:layout_gravity="top|center_horizontal"
|
||||
android:paddingLeft="@dimen/dp_10"
|
||||
android:paddingRight="@dimen/dp_10"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/left_nor_image"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:layout_gravity="left|center_vertical"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:src="@drawable/bus_p_zuozhuan_un_open" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/right_nor_image"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:layout_gravity="right|center_vertical"
|
||||
android:layout_marginRight="@dimen/dp_5"
|
||||
android:src="@drawable/bus_p_youzhuan_un_open" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/left_select_image"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_gravity="left|center_vertical"
|
||||
android:src="@drawable/bus_p_zuozhuan_open"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/right_select_image"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_gravity="right|center_vertical"
|
||||
android:src="@drawable/bus_p_youzhuan_open"
|
||||
android:visibility="gone"/>
|
||||
</FrameLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -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<BaseData> {
|
||||
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<BaseData> {
|
||||
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<OrderInfoResponse.OrderInfo?,Long?,Long?>{
|
||||
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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,6 @@ class GoViewWithArrive @JvmOverloads constructor(
|
||||
ToastUtils.showShort("设备未就绪请稍等")
|
||||
}
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE -> {//
|
||||
ToastUtils.showShort("启动自动驾驶中")
|
||||
CallerAutoPilotControlManager.sendPlanningCmd(2)
|
||||
CharterPassengerModel.startAutopilot()
|
||||
onceRegisterAutoStatus()
|
||||
|
||||
|
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.0 MiB |
|
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.0 MiB |
|
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.0 MiB |
|
After Width: | Height: | Size: 188 KiB |
@@ -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"
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -390,9 +390,10 @@ public class BusPassengerRouteFragment extends
|
||||
dis = NumberFormatUtil.formatLong((double)meters / 1000);
|
||||
}
|
||||
}
|
||||
String strHtml2 = "<font color=\"#2D3E5F\">距离 </font>" + "<b><font color=\"#0043FF\">" + dis + "</font></b>" + "<font color=\"#2D3E5F\"> "+disUnit+"</font>"
|
||||
+ "<font color=\"#2D3E5F\">   剩余 </font>" + "<b><font color=\"#0043FF\">" + (int)Math.ceil((double)timeInSecond/ 60f) + "</font></b>" + "<font color=\"#2D3E5F\"> 分钟</font>";
|
||||
mCurrentArriveTip.setText(Html.fromHtml(strHtml2));
|
||||
// String strHtml2 = "<font color=\"#2D3E5F\">距离 </font>" + "<b><font color=\"#0043FF\">" + dis + "</font></b>" + "<font color=\"#2D3E5F\"> "+disUnit+"</font>"
|
||||
// + "<font color=\"#2D3E5F\">   剩余 </font>" + "<b><font color=\"#0043FF\">" + (int)Math.ceil((double)timeInSecond/ 60f) + "</font></b>" + "<font color=\"#2D3E5F\"> 分钟</font>";
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
|
||||
}
|
||||
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 844 B |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 855 B |
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#C9E0F4" />
|
||||
<corners android:radius="@dimen/dp_30" />
|
||||
</shape>
|
||||
@@ -110,7 +110,7 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/bus_p_speed_tv" />
|
||||
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.vehicle.TurnLightViewStatus
|
||||
<com.mogo.och.bus.passenger.ui.widget.BusPTurnLightView
|
||||
android:layout_width="@dimen/dp_104"
|
||||
android:layout_height="@dimen/dp_58"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="@dimen/dp_104"
|
||||
android:layout_height="@dimen/dp_58"
|
||||
android:visibility="visible">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/turn_light_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/brakelight_background_daytime"
|
||||
android:layout_gravity="top|center_horizontal"
|
||||
android:paddingLeft="@dimen/dp_10"
|
||||
android:paddingRight="@dimen/dp_10"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/left_nor_image"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:layout_gravity="left|center_vertical"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:src="@drawable/bus_p_zuozhuan_un_open" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/right_nor_image"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:layout_gravity="right|center_vertical"
|
||||
android:layout_marginRight="@dimen/dp_5"
|
||||
android:src="@drawable/bus_p_youzhuan_un_open" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/left_select_image"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_gravity="left|center_vertical"
|
||||
android:src="@drawable/bus_p_zuozhuan_open"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/right_select_image"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_gravity="right|center_vertical"
|
||||
android:src="@drawable/bus_p_youzhuan_open"
|
||||
android:visibility="gone"/>
|
||||
</FrameLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -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
|
||||
|
||||
@@ -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] =
|
||||
|
||||
@@ -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<String, Any>().also { itx -> itx.putAll(it) } })
|
||||
MogoAnalyticUtils.track("AppUpgradeRecord", TreeMap<String, Any>().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()
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||