Merge remote-tracking branch 'origin/dev_robobus-m1-p-app-module_1.1.0_230112_1.1.0' into dev_robobus-m1-p-app-module_1.1.0_230112_1.1.0
@@ -104,7 +104,7 @@ class PM2DrivingModel private constructor() {
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, mAutoPilotStatusListener)
|
||||
|
||||
// 定位监听
|
||||
CallerChassisLocationGCJ02ListenerManager.addListener(TAG,20, mMapLocationListener)
|
||||
CallerChassisLocationGCJ02ListenerManager.addListener(TAG, mMapLocationListener)
|
||||
// CallerChassisLocationGCJ02ListenerManager.setListenerHz(TAG,2)//设置2hz, 1s返回2次
|
||||
|
||||
//司乘屏通信监听
|
||||
|
||||
@@ -156,7 +156,7 @@ public class OrderModel {
|
||||
mContext = AbsMogoApplication.getApp();
|
||||
loginService = (LoginService) ARouter.getInstance().build(OchCommonConst.LOGINSERVICE).navigation();
|
||||
// 定位监听
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG, 20,mMapLocationListener);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG,mMapLocationListener);
|
||||
// CallerChassisLocationGCJ02ListenerManager.INSTANCE.setListenerHz(TAG,2);//设置5hz, 1s返回一次
|
||||
|
||||
MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
|
||||
|
||||
@@ -64,8 +64,7 @@ public class CharterAnalyticsManager {
|
||||
}
|
||||
|
||||
private void removeWaitingCallback() {
|
||||
if (startAutopilotRunnable != null &&
|
||||
UiThreadHandler.getsUiHandler().hasCallbacks(startAutopilotRunnable)) {
|
||||
if (startAutopilotRunnable != null) {
|
||||
UiThreadHandler.removeCallbacks(startAutopilotRunnable);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ class BindingCarNetWorkManager private constructor() {
|
||||
override fun onSubscribe(d: Disposable) {}
|
||||
override fun onNext(info: BindingCarInfo) {
|
||||
if (info != null && info.getData() != null) {
|
||||
d(SceneConstant.M_BINDING + TAG, "getBindingCarInfo data =" + info.getData().toString())
|
||||
d(SceneConstant.M_BINDING + TAG, "getBindingCarInfo data =" + info.getData().toString() + "---getDefaultId() : ${getDefaultId()}")
|
||||
SharedPrefsMgr.getInstance(context).putString(
|
||||
SharedPrefsConstants.CAR_INFO,
|
||||
GsonUtils.toJson(info.getData())
|
||||
@@ -82,16 +82,16 @@ class BindingCarNetWorkManager private constructor() {
|
||||
"3" -> showModifyBindingCarDialog()
|
||||
"null" -> TipToast.shortTip("当前工控机没有入库")
|
||||
}
|
||||
updateCarVrIconRes(info.getData().brandId);
|
||||
updateCarVrIconRes(info.getData().brandId)
|
||||
} else {
|
||||
SharedPrefsMgr.getInstance(context).putString(SharedPrefsConstants.CAR_INFO, "")
|
||||
e(SceneConstant.M_BINDING + TAG, "getBindingCarInfo data = null ")
|
||||
e(SceneConstant.M_BINDING + TAG, "getBindingCarInfo data = null ---getDefaultId() : ${getDefaultId()} ")
|
||||
}
|
||||
}
|
||||
|
||||
override fun onError(e: Throwable) {
|
||||
SharedPrefsMgr.getInstance(context).putString(SharedPrefsConstants.CAR_INFO, "")
|
||||
e(SceneConstant.M_BINDING + TAG, "getBindingCarInfo onError e = " + e.toString() + "---e.getMessage = " + e.message)
|
||||
e(SceneConstant.M_BINDING + TAG, "getBindingCarInfo onError e = " + e.toString() + "---e.getMessage = " + e.message + "---getDefaultId() : ${getDefaultId()}")
|
||||
}
|
||||
|
||||
override fun onComplete() {}
|
||||
|
||||
@@ -9,6 +9,7 @@ import android.graphics.Color
|
||||
import android.os.Build
|
||||
import android.text.Html
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.annotation.RequiresApi
|
||||
@@ -67,6 +68,7 @@ import com.mogo.eagle.core.utilcode.kotlin.currentPadding
|
||||
import com.mogo.eagle.core.utilcode.kotlin.lifecycleOwner
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.LogLevel
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
@@ -540,15 +542,15 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
/**
|
||||
* 修改自车按钮(出租车、小巴车)
|
||||
*/
|
||||
// tbChangeCurrentCarIcon.setOnCheckedChangeListener { _, isChecked ->
|
||||
// if (!isChecked) {
|
||||
// // 替换为出租车图标
|
||||
// CallerMapUIServiceManager.getMapUIController()?.changeCurrentIcon(R.raw.chuzuche)
|
||||
// } else {
|
||||
// // 替换为小巴车图标
|
||||
// CallerMapUIServiceManager.getMapUIController()?.changeCurrentIcon(R.raw.xiaobache)
|
||||
// }
|
||||
// }
|
||||
tbChangeCurrentCarIcon.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (!isChecked) {
|
||||
// 替换为出租车图标
|
||||
CallerMapUIServiceManager.getMapUIController()?.changeCurrentIcon(R.raw.chuzuche)
|
||||
} else {
|
||||
// 替换为小巴车图标
|
||||
CallerMapUIServiceManager.getMapUIController()?.changeCurrentIcon(R.raw.xiaobache)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -814,9 +816,9 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
//初始化切换自车按钮文本(Bus版本默认显示:切换自车为出租车)
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
tbChangeCurrentCarIcon.isChecked = true
|
||||
}
|
||||
// if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
// tbChangeCurrentCarIcon.isChecked = true
|
||||
// }
|
||||
|
||||
//初始化ADAS日志开关状态
|
||||
tbADASLog.isChecked = CallerAutoPilotControlManager.isEnableLog()
|
||||
|
||||
@@ -1482,7 +1482,6 @@
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/btnDrawTrolley"
|
||||
app:layout_constraintTop_toBottomOf="@id/reset_changesight"
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
|
||||
<ToggleButton
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
全局路径规划的GSON格式的轨迹点数据放这里,然后使用PlanningDataUtils工具类解析一下
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.mogo.eagle.core.function.utils
|
||||
|
||||
import android.content.Context
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import org.json.JSONArray
|
||||
import org.json.JSONException
|
||||
import java.io.IOException
|
||||
import java.io.InputStream
|
||||
|
||||
object PlanningDataUtils {
|
||||
|
||||
@JvmStatic
|
||||
fun test(context: Context?): List<MessagePad.Location> {
|
||||
if (context == null) return emptyList()
|
||||
val list: MutableList<MessagePad.Location> = ArrayList()
|
||||
val jsonStr = getAssetsString(context, "planningDataTest.txt")
|
||||
try {
|
||||
val jsonElements = JSONArray(jsonStr)
|
||||
for (i in 0 until jsonElements.length()) {
|
||||
val s = jsonElements.getJSONObject(i)
|
||||
val builder = MessagePad.Location.newBuilder()
|
||||
builder.latitude = s.getDouble("latitude")
|
||||
builder.longitude = s.getDouble("longitude")
|
||||
list.add(builder.build())
|
||||
}
|
||||
} catch (e: JSONException) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
return list
|
||||
}
|
||||
|
||||
private fun getAssetsString(context: Context, fileName: String): String {
|
||||
var buffer: ByteArray? = null
|
||||
var istream: InputStream? = null
|
||||
try {
|
||||
istream = context.resources.assets.open(fileName)
|
||||
buffer = ByteArray(istream.available())
|
||||
istream.read(buffer)
|
||||
} catch (e: IOException) {
|
||||
e.printStackTrace()
|
||||
} finally {
|
||||
try {
|
||||
istream?.close()
|
||||
} catch (e: IOException) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
return String(buffer!!)
|
||||
}
|
||||
}
|
||||
@@ -153,14 +153,14 @@ enum class EventTypeEnumNew(
|
||||
TYPE_USECASE_ID_ICW(
|
||||
2009.toString(),
|
||||
"交叉路口碰撞预警",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_collision_warning,
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_crossroads_warning,
|
||||
content = "交叉路口碰撞预警",
|
||||
tts = "注意交叉路口车辆"
|
||||
),
|
||||
TYPE_USECASE_ID_LTA(
|
||||
2001.toString(),
|
||||
"左转辅助",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_collision_warning,
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_turn_left,
|
||||
content = "左转碰撞预警",
|
||||
tts = "注意路口对向来车"
|
||||
),
|
||||
@@ -196,7 +196,7 @@ enum class EventTypeEnumNew(
|
||||
TYPE_USECASE_ID_AVW(
|
||||
2006.toString(),
|
||||
"异常车辆提醒",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_abnormal_vehicle,
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_abnormal_car,
|
||||
content = "%s车异常",
|
||||
tts = "小心%s异常车辆"
|
||||
),
|
||||
@@ -269,7 +269,7 @@ enum class EventTypeEnumNew(
|
||||
TYPE_USECASE_ID_BREAKDOWN_WARNING( //故障车辆
|
||||
101.toString(),
|
||||
"车辆故障",
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_collision_warning,
|
||||
poiTypeSrcVr = R.drawable.icon_warning_v2x_car_breakdown,
|
||||
content = "前方%s米有故障车辆,影响路段%s米",
|
||||
tts = "前方%s米有故障车辆,影响路段%s米"
|
||||
),
|
||||
|
||||
@@ -112,13 +112,7 @@ object CallerChassisLocationGCJ02ListenerManager : CallerBase<IMoGoChassisLocati
|
||||
// 记录最后一次回调时间
|
||||
M_LISTENERS_HZ_LAST_SEND_TIME[tag] = TimeUtils.getNowMills()
|
||||
val listener = it.value
|
||||
if (DebugConfig.isDebug()) {
|
||||
val timeStampTemp = TimeUtils.getNowMills()
|
||||
listener.onChassisLocationGCJ02(mogoLocation)
|
||||
Logger.e(TAG, "Tag:${tag},其处理定位的时间为:${TimeUtils.getNowMills() - timeStampTemp}")
|
||||
} else {
|
||||
listener.onChassisLocationGCJ02(mogoLocation)
|
||||
}
|
||||
listener.onChassisLocationGCJ02(mogoLocation)
|
||||
// FileUtils.writeToFile(
|
||||
// "/sdcard/Download/",
|
||||
// "location_gcj02.txt",
|
||||
|
||||
|
After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 16 KiB |
@@ -4,6 +4,7 @@ import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_ALIAS_CODE
|
||||
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_ALIAS_CODE_INIT_ON_MAP_LOADED;
|
||||
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_LINK_INIT;
|
||||
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_LINK_LOG_CONNECT_STATUS;
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.Logger.d;
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_MAP;
|
||||
import static com.mogo.map.uicontroller.VisualAngleMode.MAP_STYLE_VR_ANGLE_300;
|
||||
import static com.mogo.map.uicontroller.VisualAngleMode.MAP_STYLE_VR_ANGLE_CROSS;
|
||||
@@ -40,6 +41,7 @@ import com.mogo.eagle.core.function.call.map.CallerMapDevaListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapRoadListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapStyleListenerManager;
|
||||
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.mogo.toast.TipToast;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.map.hdcache.IHdCacheListener;
|
||||
|
||||