[2.15.0-merge-master]
This commit is contained in:
@@ -41,6 +41,10 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@ class FuncBizProvider : IMoGoFuncBizProvider {
|
||||
&& AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode))){
|
||||
V2XEventManager.init(context)
|
||||
}
|
||||
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
LineUploadManager.getInstance(context)?.init()
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@ import com.mogo.eagle.function.biz.v2x.v2n.scenario.view.IV2XMarker;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
/**
|
||||
* author : donghongyu
|
||||
* e-mail : 1358506549@qq.com
|
||||
|
||||
@@ -44,6 +44,11 @@ android {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.eagle.core.function.chat.facade.consts
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
|
||||
//WebSocket发送数据相关
|
||||
const val SOCKET_HAND_SHAKE = 0
|
||||
@@ -60,10 +61,14 @@ class ChatHttp {
|
||||
}
|
||||
|
||||
fun getSocketServer(): String {
|
||||
return when (DebugConfig.getNetMode()) {
|
||||
DebugConfig.NET_MODE_DEV, DebugConfig.NET_MODE_QA, DebugConfig.NET_MODE_DEMO -> DEV_SOCKET_SERVER
|
||||
DebugConfig.NET_MODE_RELEASE -> SOCKET_SERVER
|
||||
else -> SOCKET_SERVER
|
||||
if(FunctionBuildConfig.urlJson.chartSocketUrl.isEmpty()){
|
||||
return when (DebugConfig.getNetMode()) {
|
||||
DebugConfig.NET_MODE_DEV, DebugConfig.NET_MODE_QA, DebugConfig.NET_MODE_DEMO -> DEV_SOCKET_SERVER
|
||||
DebugConfig.NET_MODE_RELEASE -> SOCKET_SERVER
|
||||
else -> SOCKET_SERVER
|
||||
}
|
||||
}else{
|
||||
return FunctionBuildConfig.urlJson.chartSocketUrl
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
android:id="@+id/module_carchatting_call_head"
|
||||
android:layout_width="@dimen/module_call_chat_incoming_aisdk_tag_width"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/module_carchatting_aicloud_incoming"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -26,7 +25,6 @@
|
||||
android:layout_marginEnd="@dimen/module_call_chat_calling_iv_hawk_eye_margin_left_right"
|
||||
android:layout_marginRight="@dimen/module_call_chat_state_incoming_hawk_eye_call_margin_right"
|
||||
android:clickable="true"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@mipmap/module_callchatting_launcher_incoming_answer"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/module_carchatting_incoming_hangUp"
|
||||
@@ -39,7 +37,6 @@
|
||||
android:layout_height="@dimen/module_call_chat_hawk_eye_incoming_circle_btn_size"
|
||||
android:layout_marginEnd="@dimen/module_call_chat_calling_iv_hawk_eye_margin_left_right"
|
||||
android:clickable="true"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@mipmap/module_callchatting_launcher_incoming_hangup"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@@ -40,6 +40,10 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -598,7 +598,6 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 清扫车后部摄像头视频 10Hz
|
||||
*
|
||||
@@ -615,11 +614,11 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
* @param header 头
|
||||
* @param roboSweeperTaskIndex 数据
|
||||
*/
|
||||
override fun onSweeperTaskIndexData(
|
||||
header: MessagePad.Header?,
|
||||
roboSweeperTaskIndex: RoboSweeperTaskIndexOuterClass.RoboSweeperTaskIndex?
|
||||
) {
|
||||
|
||||
override fun onSweeperTaskIndexData(header: MessagePad.Header?, roboSweeperTaskIndex: RoboSweeperTaskIndexOuterClass.RoboSweeperTaskIndex?) {
|
||||
roboSweeperTaskIndex?.let {
|
||||
//清扫车(福田)清扫控制系统状态
|
||||
CallerSweeperFutianCleanSystemListenerManager.invokeSweeperFutianCleanTaskIndexData(it)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -45,6 +45,10 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
freeCompilerArgs += [
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.zhjt.mogo_core_function_devatools.binding
|
||||
|
||||
import android.content.Context
|
||||
import android.text.TextUtils
|
||||
import android.util.Log
|
||||
import com.elegant.utils.UiThreadHandler
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.commons.constants.SharedPrefsConstants
|
||||
@@ -63,7 +62,6 @@ class BindingCarManager : IMoGoAutopilotCarConfigListener {
|
||||
|
||||
override fun onAutopilotCarConfig(carConfigResp: MessagePad.CarConfigResp) {
|
||||
if (carConfigResp != null && !TextUtils.isEmpty(carConfigResp.macAddress)) {
|
||||
Log.d("Upgrade", "MoGoHandAdasMsgManager address = " + carConfigResp.macAddress)
|
||||
CallerLogger.d(
|
||||
"$M_DEVA$TAG",
|
||||
"onAutopilotCarConfig carConfigResp.macAddress = ${carConfigResp.macAddress} "
|
||||
|
||||
@@ -10,7 +10,6 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import mogo_msg.MogoReportMsg
|
||||
|
||||
@@ -70,30 +69,29 @@ class IPCReportManager : IMoGoAutopilotStatusListener {
|
||||
*工控机监控节点上报
|
||||
*/
|
||||
override fun onAutopilotGuardian(guardianInfo: MogoReportMsg.MogoReportMessage?) {
|
||||
ThreadUtils.runOnUiThread {
|
||||
guardianInfo?.let{
|
||||
if(it.resultList.contains(RESULT_AUTOPILOT_DISABLE)
|
||||
|| it.resultList.contains(RESULT_AUTOPILOT_SYSTEM_UNSTARTED)
|
||||
|| it.resultList.contains(RESULT_REMOTEPILOT_DISABLE)
|
||||
|| it.resultList.contains(RESULT_AUTOPILOT_INFERIOR)
|
||||
|| it.resultList.contains(RESULT_SHOW_WARNING)
|
||||
|| it.resultList.contains(RESULT_REMOTEPILOT_INFERIOR)){
|
||||
val reportEntity = ReportEntity(TimeUtils.millis2String(System.currentTimeMillis()),
|
||||
it.src,it.level,it.msg,it.code,it.resultList,it.actionsList,false)
|
||||
CallerMsgBoxManager.saveMsgBox(MsgBoxBean(MsgBoxType.REPORT, reportEntity))
|
||||
}
|
||||
guardianInfo?.let{
|
||||
if(it.resultList.contains(RESULT_AUTOPILOT_DISABLE)
|
||||
|| it.resultList.contains(RESULT_AUTOPILOT_SYSTEM_UNSTARTED)
|
||||
|| it.resultList.contains(RESULT_REMOTEPILOT_DISABLE)
|
||||
|| it.resultList.contains(RESULT_AUTOPILOT_INFERIOR)
|
||||
|| it.resultList.contains(RESULT_SHOW_WARNING)
|
||||
|| it.resultList.contains(RESULT_REMOTEPILOT_INFERIOR)){
|
||||
val reportEntity = ReportEntity(TimeUtils.millis2String(System.currentTimeMillis()),
|
||||
it.src,it.level,it.msg,it.code,it.resultList,it.actionsList,false)
|
||||
CallerMsgBoxManager.saveMsgBox(MsgBoxBean(MsgBoxType.REPORT, reportEntity))
|
||||
}
|
||||
|
||||
if (reportList.size > 49) {
|
||||
reportList.removeLast()
|
||||
}
|
||||
reportList.add(
|
||||
0,
|
||||
ReportEntity(
|
||||
TimeUtils.millis2String(System.currentTimeMillis()),
|
||||
it.src, it.level, it.msg, it.code, it.resultList, it.actionsList
|
||||
,false)
|
||||
)
|
||||
reportListFloatWindow?.refreshData(reportList)
|
||||
if (reportList.size > 49) {
|
||||
reportList.removeLast()
|
||||
}
|
||||
reportList.add(
|
||||
0,
|
||||
ReportEntity(
|
||||
TimeUtils.millis2String(System.currentTimeMillis()),
|
||||
it.src, it.level, it.msg, it.code, it.resultList, it.actionsList
|
||||
,false)
|
||||
)
|
||||
reportListFloatWindow?.refreshData(reportList)
|
||||
|
||||
// //Error 弹窗并有提示音
|
||||
// if(it.resultList.contains(RESULT_AUTOPILOT_DISABLE)
|
||||
@@ -130,7 +128,6 @@ class IPCReportManager : IMoGoAutopilotStatusListener {
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -58,8 +58,8 @@ class SceneManager {
|
||||
sceneModuleTAG.map[DEVA] = SceneModule(false, M_DEVA)
|
||||
sceneModuleTAG.map[HMI] = SceneModule(false, M_HMI)
|
||||
sceneModuleTAG.map[OBU] = SceneModule(false, M_OBU)
|
||||
sceneModuleTAG.map[V2X] = SceneModule(false, M_V2X)
|
||||
sceneModuleTAG.map[MAP] = SceneModule(false, M_MAP)
|
||||
sceneModuleTAG.map[V2X] = SceneModule(true, M_V2X)
|
||||
sceneModuleTAG.map[MAP] = SceneModule(true, M_MAP)
|
||||
sceneModuleTAG.map[ROUTE] = SceneModule(true, M_OLD_ROUTE)
|
||||
sceneModuleTAG.map[NET] = SceneModule(true, M_NETWORK)
|
||||
sceneModuleTAG.map[BUS] = SceneModule(true, M_BUS)
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.zhjt.mogo_core_function_devatools.status.entity.CanStatus
|
||||
import com.zhjt.mogo_core_function_devatools.status.flow.IFlow
|
||||
import kotlinx.coroutines.Job
|
||||
import mogo_msg.MogoReportMsg.MogoReportMessage
|
||||
import planning.RoboSweeperTaskIndexOuterClass
|
||||
import system_master.SystemStatusInfo.StatusInfo
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
|
||||
@@ -94,10 +95,13 @@ internal class CanImpl(ctx: Context) :
|
||||
send(CanStatus(isCanEnabled()))
|
||||
}
|
||||
|
||||
|
||||
override fun onSweeperFutianCleanSystemState(cleanSystemState: ChassisStatesOuterClass.SweeperFuTianTaskSystemStates) {
|
||||
send(CanStatus(isCanEnabled()))
|
||||
}
|
||||
override fun onSweeperFutianTaskIndexData(roboSweeperTaskIndex: RoboSweeperTaskIndexOuterClass.RoboSweeperTaskIndex) {
|
||||
|
||||
}
|
||||
override fun onAutopilotGuardian(guardianInfo: MogoReportMessage?) {
|
||||
super.onAutopilotGuardian(guardianInfo)
|
||||
send(CanStatus(isCanEnabled()))
|
||||
|
||||
@@ -42,6 +42,10 @@ android {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -4,12 +4,14 @@ import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.appcompat.content.res.AppCompatResources
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxEventListener
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import kotlinx.android.synthetic.main.view_driver_msg_box_button.view.*
|
||||
import kotlinx.android.synthetic.main.view_driver_msg_box_button.view.cbMsgBoxDriver
|
||||
import kotlinx.android.synthetic.main.view_driver_msg_box_button.view.msgBoxTipView
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
@@ -20,7 +22,7 @@ class DriverMsgBoxButtonView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
):ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxEventListener {
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxEventListener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "DriverMsgBoxButtonView"
|
||||
@@ -28,21 +30,35 @@ class DriverMsgBoxButtonView @JvmOverloads constructor(
|
||||
|
||||
private var clickListener: ClickListener? = null
|
||||
|
||||
init{
|
||||
private val bgResources: Int
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_driver_msg_box_button, this, true)
|
||||
val a = context.obtainStyledAttributes(
|
||||
attrs,
|
||||
R.styleable.DriverMsgBoxButtonView,
|
||||
defStyleAttr,
|
||||
0
|
||||
)
|
||||
bgResources = a.getResourceId(
|
||||
R.styleable.DriverMsgBoxButtonView_bgDrawable,
|
||||
R.drawable.selector_msg_box
|
||||
)
|
||||
initView()
|
||||
}
|
||||
|
||||
private fun initView(){
|
||||
private fun initView() {
|
||||
cbMsgBoxDriver.setOnCheckedChangeListener { _, isChecked ->
|
||||
clickListener?.showMsgBoxList(isChecked)
|
||||
msgBoxTipView.visibility = View.GONE
|
||||
}
|
||||
|
||||
cbMsgBoxDriver.background = AppCompatResources.getDrawable(context, bgResources)
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerMsgBoxEventListenerManager.addListener(TAG,this)
|
||||
CallerMsgBoxEventListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
@@ -59,9 +75,9 @@ class DriverMsgBoxButtonView @JvmOverloads constructor(
|
||||
* @param isShow true:展示;false:不展示
|
||||
*/
|
||||
override fun onUpdateTipEvent(isShow: Boolean) {
|
||||
if(isShow){
|
||||
if (isShow) {
|
||||
msgBoxTipView.visibility = View.VISIBLE
|
||||
}else{
|
||||
} else {
|
||||
msgBoxTipView.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
@@ -82,7 +98,7 @@ class DriverMsgBoxButtonView @JvmOverloads constructor(
|
||||
this.clickListener = clickListener
|
||||
}
|
||||
|
||||
interface ClickListener{
|
||||
interface ClickListener {
|
||||
fun showMsgBoxList(show: Boolean)
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import com.mogo.commons.constants.SharedPrefsConstants
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.commons.module.status.MogoStatusManager
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.autopilot.*
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
import com.mogo.eagle.core.data.constants.MoGoConfig
|
||||
@@ -84,8 +84,14 @@ import kotlinx.android.synthetic.main.view_sop_setting.view.*
|
||||
import kotlinx.coroutines.*
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo_msg.MogoReportMsg
|
||||
import planning.RoboSweeperTaskIndexOuterClass
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
import kotlin.collections.component1
|
||||
import kotlin.collections.component2
|
||||
import kotlin.collections.component3
|
||||
import kotlin.collections.component4
|
||||
import kotlin.collections.set
|
||||
import kotlin.math.abs
|
||||
|
||||
|
||||
@@ -289,6 +295,16 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
private fun initView() {
|
||||
post {
|
||||
val maxHeight = ScreenUtils.getScreenHeight()-BarUtils.getStatusBarHeight()
|
||||
val height = clDebugContain.height
|
||||
if(height>maxHeight){
|
||||
val layoutParamsOther = clDebugContain.layoutParams
|
||||
layoutParamsOther.height = maxHeight
|
||||
clDebugContain.layoutParams = layoutParamsOther
|
||||
}
|
||||
}
|
||||
|
||||
val iconDown = ContextCompat.getDrawable(context, R.drawable.icon_down)
|
||||
iconDown?.setBounds(0, 0, iconDown.minimumWidth, iconDown.minimumHeight)
|
||||
val iconRight = ContextCompat.getDrawable(context, R.drawable.icon_right)
|
||||
@@ -2003,7 +2019,9 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
override fun onSweeperFutianCleanSystemState(cleanSystemState: ChassisStatesOuterClass.SweeperFuTianTaskSystemStates) {
|
||||
|
||||
}
|
||||
override fun onSweeperFutianTaskIndexData(roboSweeperTaskIndex: RoboSweeperTaskIndexOuterClass.RoboSweeperTaskIndex) {
|
||||
|
||||
}
|
||||
/**
|
||||
* 吐司提示
|
||||
*/
|
||||
|
||||
@@ -256,14 +256,31 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
CallerDevaToolsFuncConfigListenerManager.registerDevaToolsFuncConfigListener(
|
||||
FuncBizConfig.FOUNDATION, TAG, true, this
|
||||
)
|
||||
// 开启定时查询速度
|
||||
// Timer().schedule(timerTaskRefresh, Date(), 500)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
// 移除 业务配置监听
|
||||
CallerDevaToolsFuncConfigListenerManager.unRegisterDevaToolsFuncConfigListener(FuncBizConfig.FOUNDATION, TAG)
|
||||
// try {
|
||||
// timerTaskRefresh.cancel()
|
||||
// } catch (e: Exception) {
|
||||
// e.printStackTrace()
|
||||
// }
|
||||
}
|
||||
|
||||
// private val timerTaskRefresh = object : TimerTask(){
|
||||
// override fun run() {
|
||||
// UiThreadHandler.post{
|
||||
// tbDemoMode.isChecked = FunctionBuildConfig.isDemoMode
|
||||
// tbRainMode.isChecked = FunctionBuildConfig.isRainMode
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
override fun updateBizView(type: String, lock: Boolean) {
|
||||
when (type) {
|
||||
FuncBizConfig.BIZ_BEAUTY_MODE -> {
|
||||
|
||||
@@ -7,11 +7,13 @@ import android.view.View
|
||||
import android.view.WindowManager
|
||||
import android.view.animation.OvershootInterpolator
|
||||
import com.mogo.eagle.core.data.enums.SidePattern
|
||||
import com.mogo.eagle.core.data.deva.report.ReportEntity
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.hmi.notification.WarningFloat
|
||||
import com.mogo.eagle.core.function.hmi.notification.anim.DefaultAnimator
|
||||
import com.mogo.eagle.core.utilcode.util.BarUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ScreenUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
|
||||
class ToggleDebugView private constructor() : IMoGoAutopilotStatusListener {
|
||||
@@ -47,13 +49,16 @@ class ToggleDebugView private constructor() : IMoGoAutopilotStatusListener {
|
||||
}
|
||||
})
|
||||
}
|
||||
val height = AutoSizeUtils.dp2px(context, 1100f)
|
||||
val maxHeight = ScreenUtils.getScreenHeight() - BarUtils.getStatusBarHeight()
|
||||
val currentHeight = if(height>maxHeight) maxHeight else height
|
||||
mDebugSettingViewFloat = WarningFloat.with(context)
|
||||
.setTag("DebugSettingView")
|
||||
.setLayout(mDebugSettingView!!)
|
||||
.setSidePattern(sidePattern)
|
||||
.setGravity(gravity, offsetY = 70)
|
||||
.setImmersionStatusBar(true)
|
||||
.setWindowHeight(AutoSizeUtils.dp2px(context, 1100f))
|
||||
.setWindowHeight(currentHeight)
|
||||
.setWindowWidth(AutoSizeUtils.dp2px(context, 800f))
|
||||
.setAnimator(object : DefaultAnimator() {
|
||||
override fun enterAnim(
|
||||
|
||||
@@ -10,7 +10,6 @@ import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.FrameLayout
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.data.deva.bindingcar.IPCUpgradeStateInfo
|
||||
@@ -32,6 +31,7 @@ import mogo.telematics.pad.MessagePad
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import kotlin.system.exitProcess
|
||||
|
||||
|
||||
/**
|
||||
* @author ChenFufeng
|
||||
* 设置自动驾驶速度和检测页入口
|
||||
@@ -241,19 +241,6 @@ internal class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
}
|
||||
actvLoginout.visibility = View.VISIBLE
|
||||
toolBusOperationView.showBusOperation()
|
||||
|
||||
// TODO 这里判断方式可以替换为使用 AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)等进行替换
|
||||
when (DebugConfig.getProductFlavor()) {
|
||||
"fPadLenovoOchTaxi" -> {
|
||||
//出租车司机
|
||||
}
|
||||
"fPadLenovoOchBus" ->{
|
||||
//小巴车司机
|
||||
}
|
||||
else -> {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun killApp() {
|
||||
|
||||
@@ -31,14 +31,27 @@ class BusOperationView @JvmOverloads constructor(
|
||||
actvAccountPhone.text = phoneMask(SharedPrefs.getInstance(it).getString("och_account",""))
|
||||
}
|
||||
clickPersonalRightView()
|
||||
clickQRBtn()
|
||||
}
|
||||
|
||||
private fun clickQRBtn() {
|
||||
actvAccountQR.onClick {
|
||||
EventBus.getDefault().post(EventLogout(EventLogout.SHOW_QR_TYPE))
|
||||
}
|
||||
}
|
||||
|
||||
private fun initPersonalIcon() {
|
||||
if(AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)){
|
||||
ivGotoPersonalInfo.visibility = VISIBLE
|
||||
}else{
|
||||
ivGotoPersonalInfo.visibility = GONE
|
||||
}
|
||||
|
||||
if (AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)) {
|
||||
actvAccountQR.visibility = VISIBLE
|
||||
}else{
|
||||
actvAccountQR.visibility = GONE
|
||||
}
|
||||
}
|
||||
|
||||
private fun clickPersonalRightView() {
|
||||
|
||||
@@ -68,7 +68,7 @@ class PncActionsView @JvmOverloads constructor(
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
(tvHmiPncActions.layoutParams as MarginLayoutParams).topMargin = topMargin.toInt()
|
||||
tvHmiPncActions.setTextSize(COMPLEX_UNIT_PX, txtSize)
|
||||
tvHmiPncActions.setTextSize(COMPLEX_UNIT_PX, txtSize.toFloat())
|
||||
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
CallerPlanningActionsListenerManager.addListener(TAG, this)
|
||||
|
||||
@@ -12,7 +12,6 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLamplightListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLamplightListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.*
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
|
||||
@@ -78,7 +78,7 @@ class TakeOverView @JvmOverloads constructor(
|
||||
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_PLANNING,
|
||||
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_LOCATION,
|
||||
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_CHASSIS,
|
||||
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_DISTANCE ->{
|
||||
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_DISTANCE -> {
|
||||
CallerHmiManager.warningV2X(
|
||||
EventTypeEnumNew.TAKE_OVER_EVENT.poiType,
|
||||
EventTypeEnumNew.TAKE_OVER_EVENT.content,
|
||||
|
||||
@@ -16,7 +16,7 @@ import kotlinx.android.synthetic.main.view_blue_tooth.view.*
|
||||
* 魔戒蓝牙控件
|
||||
* 放置于StatusBar右侧位置
|
||||
*/
|
||||
class BlueToothView @JvmOverloads constructor(
|
||||
open class BlueToothView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
|
||||
@@ -19,6 +19,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisGearStateListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisSteeringStateListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils.isBus
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils.isTaxi
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
@@ -46,10 +47,12 @@ class SteeringWheelView : ConstraintLayout, IMoGoChassisSteeringStateListener,
|
||||
|
||||
constructor(context: Context) : super(context) {}
|
||||
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) {
|
||||
if (isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
LayoutInflater.from(context).inflate(R.layout.hmi_steering_wheel_bus, this)
|
||||
} else {
|
||||
LayoutInflater.from(context).inflate(R.layout.hmi_steering_wheel_taxi, this)
|
||||
when (AppIdentityModeUtils.getProduct(FunctionBuildConfig.appIdentityMode)) {
|
||||
AppIdentityModeUtils.Product.BUS -> LayoutInflater.from(context).inflate(R.layout.hmi_steering_wheel_bus, this)
|
||||
AppIdentityModeUtils.Product.TAXI -> LayoutInflater.from(context).inflate(R.layout.hmi_steering_wheel_taxi, this)
|
||||
AppIdentityModeUtils.Product.SWEEPER -> LayoutInflater.from(context).inflate(R.layout.hmi_steering_wheel_bus, this)
|
||||
AppIdentityModeUtils.Product.SHUTTLE -> LayoutInflater.from(context).inflate(R.layout.hmi_steering_wheel_bus, this)
|
||||
AppIdentityModeUtils.Product.CHARTER -> LayoutInflater.from(context).inflate(R.layout.hmi_steering_wheel_bus, this)
|
||||
}
|
||||
initView()
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, mGoAutopilotStatusListener)
|
||||
|
||||
@@ -39,7 +39,7 @@ public class TapPositionView extends ConstraintLayout {
|
||||
tabN = findViewById(R.id.tap_n);
|
||||
tabD = findViewById(R.id.tap_d);
|
||||
typedArray = context.obtainStyledAttributes(attrs, R.styleable.TapPositionView);
|
||||
if(AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)){
|
||||
if(AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)||AppIdentityModeUtils.isSweeper(FunctionBuildConfig.appIdentityMode)){
|
||||
tabP.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,8 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import chassis.Chassis;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import chassis.ChassisStatesOuterClass;
|
||||
import planning.RoboSweeperTaskIndexOuterClass;
|
||||
|
||||
/**
|
||||
* @author Jing
|
||||
|
||||
@@ -46,10 +46,10 @@ class VersionNameView @JvmOverloads constructor(
|
||||
showCurrentMapVersion()
|
||||
|
||||
// 调试入口,应对M1、M2没有安装Launcher的情况
|
||||
setOnLongClickListener {
|
||||
ActivityUtils.startActivity(AppListActivity::class.java)
|
||||
true
|
||||
}
|
||||
// setOnLongClickListener {
|
||||
// ActivityUtils.startActivity(AppListActivity::class.java)
|
||||
// true
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -25,6 +25,7 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiFloatViewManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager.getMapUIController
|
||||
import com.mogo.eagle.core.function.call.startup.CallerStartUpManager.initStageTwo
|
||||
@@ -97,18 +98,20 @@ open class MainActivity : MvpActivity<MainView?, MainPresenter?>(), MainView,
|
||||
decorView.clipToPadding = false
|
||||
var statusBarView = decorView.findViewWithTag<View>("status_bar")
|
||||
if (statusBarView == null) {
|
||||
statusBarView = statusBar
|
||||
statusBarView.tag = "status_bar"
|
||||
val params = FrameLayout.LayoutParams(
|
||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
)
|
||||
params.topMargin = 0
|
||||
params.gravity = Gravity.TOP
|
||||
decorView.addView(statusBarView, params)
|
||||
val statusBar = CallerHmiFloatViewManager.getView(this)
|
||||
statusBarView = statusBar?:StatusBarView(this)
|
||||
statusBarView.setTag("status_bar")
|
||||
}
|
||||
val statusBarLP = FrameLayout.LayoutParams(
|
||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
)
|
||||
statusBarLP.topMargin = 0
|
||||
statusBarLP.gravity = Gravity.TOP
|
||||
decorView.addView(statusBarView, statusBarLP)
|
||||
}
|
||||
|
||||
|
||||
// todo 优化 车聊聊
|
||||
private fun injectFloatView() {
|
||||
val decorView = this.window.decorView as? FrameLayout ?: return
|
||||
@@ -129,19 +132,6 @@ open class MainActivity : MvpActivity<MainView?, MainPresenter?>(), MainView,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改statusBar重新赋值
|
||||
* @return StatusBarView
|
||||
*/
|
||||
protected var statusBar: View?=null
|
||||
get() {
|
||||
return if (field == null) {
|
||||
StatusBarView(this)
|
||||
}else{
|
||||
field
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
calculateStartTime()
|
||||
@@ -208,6 +198,7 @@ open class MainActivity : MvpActivity<MainView?, MainPresenter?>(), MainView,
|
||||
override fun onMapLoaded() {
|
||||
// 延时加载其他模块
|
||||
window.decorView.post {
|
||||
MogoStatusManager.getInstance().setScreenCoverMode(TAG,true)
|
||||
HdMapBuildConfig.isMapLoaded = true
|
||||
mPresenter!!.delayOperations()
|
||||
loadFunctionFragment()
|
||||
|
||||
@@ -123,27 +123,17 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
.build("/noop/api")
|
||||
.navigation(getContext());
|
||||
}
|
||||
}
|
||||
// TODO 董宏宇 目前处于测试阶段,处理一个机器多个屏幕方案
|
||||
else {
|
||||
ochProvider = (IMoGoFunctionProvider) ARouter.getInstance()
|
||||
.build("/driver/api")
|
||||
.navigation(getContext());
|
||||
// 启动乘客端Act
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) ||
|
||||
AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
|
||||
MultiDisplayUtils.INSTANCE.startActWithSecond(
|
||||
this,
|
||||
PassengerLauncherActivity.class);
|
||||
} else {
|
||||
// 目前只有金旅星辰乘客屏是连接的双屏
|
||||
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
ochProvider = (IMoGoFunctionProvider) ARouter.getInstance()
|
||||
.build("/passenger/api")
|
||||
.navigation(getContext());
|
||||
} else {
|
||||
ochProvider = (IMoGoFunctionProvider) ARouter.getInstance()
|
||||
.build("/noop/api")
|
||||
.navigation(getContext());
|
||||
}
|
||||
|
||||
// // 启动广告视频Atc
|
||||
// if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) ||
|
||||
// AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
|
||||
// MultiDisplayUtils.INSTANCE.startActWithSecond(
|
||||
// this,
|
||||
// VideoAdAtc.class);
|
||||
// }
|
||||
}
|
||||
|
||||
if (ochProvider != null) {
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 6.3 KiB |
@@ -2,6 +2,7 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/clDebugContain"
|
||||
android:layout_width="@dimen/dp_800"
|
||||
android:layout_height="@dimen/dp_1100"
|
||||
android:background="#FFFFFF">
|
||||
@@ -1558,7 +1559,8 @@
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/btnDrawTrolley"
|
||||
app:layout_constraintTop_toBottomOf="@id/reset_changesight" />
|
||||
app:layout_constraintTop_toBottomOf="@id/reset_changesight"
|
||||
/>
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/btnDrawFusion"
|
||||
|
||||
@@ -60,6 +60,16 @@
|
||||
android:textColor="@android:color/white"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/actvAccountQR"
|
||||
android:layout_width="@dimen/dp_84"
|
||||
android:layout_height="@dimen/dp_84"
|
||||
android:src="@drawable/icon_bind_driver_qrcode"
|
||||
android:layout_marginLeft="@dimen/dp_32"
|
||||
app:layout_constraintLeft_toRightOf="@+id/actvAccountPhone"
|
||||
app:layout_constraintTop_toTopOf="@+id/actvAccountPhone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/actvAccountPhone"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/ivGotoPersonalInfo"
|
||||
|
||||
@@ -76,8 +76,12 @@
|
||||
|
||||
<declare-styleable name="PncActionsView">
|
||||
<attr name="background_resource" format="reference"/>
|
||||
<attr name="pnc_top_margin" format="reference"/>
|
||||
<attr name="pnc_size" format="reference"/>
|
||||
<attr name="pnc_top_margin" format="dimension"/>
|
||||
<attr name="pnc_size" format="dimension"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="DriverMsgBoxButtonView">
|
||||
<attr name="bgDrawable" format="reference"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="RomaPassengerView">
|
||||
|
||||
@@ -40,6 +40,11 @@ android {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -61,5 +61,9 @@ class IdentifyBeautifyDataDrawer : Identify {
|
||||
TrackManager.getInstance().clearAll()
|
||||
}
|
||||
|
||||
override fun getIdentifyObj(uuid: String): TrackedObject? {
|
||||
return TrackManager.getInstance().getIdentifyObj(uuid)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -166,4 +166,13 @@ public class TrackManager {
|
||||
mMarkersCaches.clear();
|
||||
}
|
||||
|
||||
public MessagePad.TrackedObject getIdentifyObj(String uuid) {
|
||||
TrackObj trackObj = mMarkersCaches.get(uuid);
|
||||
if (trackObj != null && trackObj.getCache() != null) {
|
||||
return trackObj.getCache();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ object TrafficMarkerDrawer {
|
||||
fun updateITrafficThreatLevelInfo(trafficData: TrafficData) {
|
||||
CallerLogger.d(TAG,
|
||||
"trafficData.type = " + trafficData.type + "---trafficData.threatLevel = " + trafficData.threatLevel + "----FunctionBuildConfig.debugTrackerProvider = " + FunctionBuildConfig.debugTrackerProvider)
|
||||
if (FunctionBuildConfig.debugTrackerProvider != 1) {
|
||||
if (FunctionBuildConfig.debugTrackerProvider != 1) {
|
||||
return
|
||||
}
|
||||
if (trafficData != null && !TextUtils.isEmpty(trafficData.uuid)) {
|
||||
@@ -128,6 +128,10 @@ object TrafficMarkerDrawer {
|
||||
fun removeCvxRvInfoIndInfo(key: String) {
|
||||
if (mTrafficMap.containsKey(key)) {
|
||||
mTrafficMap.remove(key)
|
||||
mMarkersCaches.get(key)?.let {
|
||||
it.remove()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ object MarkerDrawerManager {
|
||||
|
||||
fun startLoopCalCarLocation() {
|
||||
routeWipeDisposable = CompositeDisposable()
|
||||
getLoopCalCarObservable().delay(1000L, TimeUnit.MILLISECONDS, true)
|
||||
getLoopCalCarObservable().delay(500L, TimeUnit.MILLISECONDS, true)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.repeat()
|
||||
.retry()
|
||||
|
||||
@@ -176,7 +176,9 @@ class SmallMapView @JvmOverloads constructor(
|
||||
// 关闭显示实时路况图层,aMap是地图控制器对象。
|
||||
mAMap?.isTrafficEnabled = false
|
||||
// 设置 锚点 图标
|
||||
mCarMarker = if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
mCarMarker = if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)
|
||||
|| AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)
|
||||
|| AppIdentityModeUtils.isCharter(FunctionBuildConfig.appIdentityMode)) {
|
||||
mAMap?.addMarker(
|
||||
MarkerOptions()
|
||||
.icon(BitmapDescriptorFactory.fromResource(R.drawable.map_bus_icon))
|
||||
|
||||
@@ -153,6 +153,7 @@ class OverMapView @JvmOverloads constructor(
|
||||
topPadding = typedArray.getInt(R.styleable.OverMapView_topPadding, 100)
|
||||
rightPadding = typedArray.getInt(R.styleable.OverMapView_rightPadding, 100)
|
||||
bottomPadding = typedArray.getInt(R.styleable.OverMapView_bottomPadding, 100)
|
||||
mTilt = typedArray.getFloat(R.styleable.OverMapView_mapTilt, 30f)
|
||||
typedArray.recycle()
|
||||
initView(context)
|
||||
} catch (e: Exception) {
|
||||
@@ -223,6 +224,25 @@ class OverMapView @JvmOverloads constructor(
|
||||
siteMarkerList = mAMap!!.addMarkers(markerOptionsList, false)
|
||||
}
|
||||
|
||||
@MainThread
|
||||
fun drawSiteMarkers(
|
||||
siteMarkers: List<SiteMarkerBean>?,
|
||||
) {
|
||||
if (siteMarkers.isNullOrEmpty()) return
|
||||
clearSiteMarkers()
|
||||
val markerOptionsList = ArrayList<MarkerOptions>()
|
||||
for (siteMarkerBean in siteMarkers) {
|
||||
val markerOption = MarkerOptions()
|
||||
markerOption.position(siteMarkerBean.latLng)
|
||||
markerOption.anchor(siteMarkerBean.anchorX, siteMarkerBean.anchorY)
|
||||
markerOption.icon(
|
||||
BitmapDescriptorFactory.fromBitmap(siteMarkerBean.bitmap)
|
||||
)
|
||||
markerOptionsList.add(markerOption)
|
||||
}
|
||||
siteMarkerList = mAMap!!.addMarkers(markerOptionsList, false)
|
||||
}
|
||||
|
||||
@MainThread
|
||||
fun clearSiteMarkers() {
|
||||
if (siteMarkerList != null) {
|
||||
@@ -285,7 +305,6 @@ class OverMapView @JvmOverloads constructor(
|
||||
|
||||
private fun initAMapView(context: Context) {
|
||||
Log.d(TAG, "initAMapView")
|
||||
mTilt = 30f
|
||||
mCameraUpdate = CameraUpdateFactory.zoomTo(zoomLevel.toFloat())
|
||||
mAMap = mMapView!!.map
|
||||
mCustomMapStyleOptions = CustomMapStyleOptions()
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.mogo.eagle.core.function.view
|
||||
|
||||
import android.graphics.Bitmap
|
||||
import com.amap.api.maps.model.LatLng
|
||||
|
||||
data class SiteMarkerBean(var latLng: LatLng, var bitmap: Bitmap, var anchorX: Float, var anchorY: Float)
|
||||
@@ -25,8 +25,8 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overLayer"
|
||||
android:layout_width="@dimen/dp_116"
|
||||
android:layout_height="@dimen/dp_116"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="centerInside"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
|
||||
@@ -29,5 +29,7 @@
|
||||
<attr name="topPadding" format="integer" />
|
||||
<attr name="rightPadding" format="integer" />
|
||||
<attr name="bottomPadding" format="integer" />
|
||||
<!-- 倾斜角 -->
|
||||
<attr name="mapTilt" format="float" />
|
||||
</declare-styleable>
|
||||
</resources>
|
||||
@@ -34,6 +34,10 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -102,9 +102,11 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
clientConfig.isUseOriginSocket = true
|
||||
// 设置是否输出网络日志
|
||||
clientConfig.isShowNetDebugLog = false
|
||||
// clientConfig.passportUrl //todo 亚坤
|
||||
// clientConfig.socketBaseUrl
|
||||
// clientConfig.socketTechUrl
|
||||
|
||||
clientConfig.passportUrl = FunctionBuildConfig.urlJson.passportUrl
|
||||
clientConfig.socketBaseUrl = FunctionBuildConfig.urlJson.socketBaseUrl
|
||||
clientConfig.socketTechUrl = FunctionBuildConfig.urlJson.socketTechUrl
|
||||
|
||||
// 设置是否是直播推流的主播
|
||||
clientConfig.isAnchor = true
|
||||
when (DebugConfig.getCarMachineType()) {
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
syntax = "proto2";
|
||||
|
||||
package roadwork;
|
||||
|
||||
message RW_PB {
|
||||
required Roadwork_PB roadwork =1;
|
||||
optional Header header = 2;
|
||||
}
|
||||
|
||||
message Roadwork_PB{
|
||||
optional string id = 1; // 对应id
|
||||
required int32 score = 2; // 置信度
|
||||
required int64 detect_time = 3; // 发送时间
|
||||
required int32 poi_type = 4; // poi 类型
|
||||
optional int32 type = 5; // 事件类型
|
||||
required Center_PB center = 6; // 中心点坐标
|
||||
repeated GPSPoint_PB polygon = 7; // 多边形范围
|
||||
repeated Road_PB road = 8; // 车道集合信息
|
||||
}
|
||||
|
||||
message GPSPoint_PB {
|
||||
required double lat = 1; // 纬度
|
||||
required double lon = 2; // 经度
|
||||
optional double hgt = 3; // 高程
|
||||
}
|
||||
|
||||
message Road_PB{
|
||||
required string road_id = 1; // 路段id
|
||||
required string lane_no = 2; // 车道号
|
||||
required string tile_id = 3; // 瓦片id
|
||||
required int32 bearing = 4; // 方向角,正北是0度 顺时针
|
||||
}
|
||||
|
||||
message Center_PB{
|
||||
required Road_PB road = 1; // 道路信息
|
||||
required GPSPoint_PB point = 2; // 坐标
|
||||
}
|
||||
|
||||
// header
|
||||
|
||||
message Time {
|
||||
optional uint32 sec = 1; // 秒
|
||||
optional uint32 nsec = 2; // 纳秒
|
||||
}
|
||||
|
||||
message Header {
|
||||
// Sequence number for each message. Each module maintains its own counter for
|
||||
// sequence_num, always starting from 1 on boot.
|
||||
optional uint32 seq = 1;
|
||||
|
||||
// Message publishing time in seconds.
|
||||
optional Time stamp = 2;
|
||||
|
||||
// frame id
|
||||
optional string frame_id = 3;
|
||||
|
||||
// Module name.
|
||||
optional string module_name = 4;
|
||||
}
|
||||
@@ -46,6 +46,10 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
protobuf {
|
||||
protoc {
|
||||
artifact = rootProject.ext.dependencies.protoc
|
||||
|
||||
@@ -4,5 +4,21 @@ import com.google.gson.annotations.SerializedName
|
||||
|
||||
data class UrlConfig(
|
||||
@SerializedName("och_url")
|
||||
val ochUrl: String
|
||||
val ochUrl: String,
|
||||
@SerializedName("shuttle_url")
|
||||
val shuttleUrl: String,
|
||||
@SerializedName("passport_url")
|
||||
val passportUrl: String,
|
||||
@SerializedName("socket_base_url")
|
||||
val socketBaseUrl: String,
|
||||
@SerializedName("socket_tech_url")
|
||||
val socketTechUrl: String,
|
||||
@SerializedName("eagle_mis_url")
|
||||
val eagleMisUrl: String,
|
||||
@SerializedName("eagle_dns_url")
|
||||
val eagleDnsUrl: String,
|
||||
@SerializedName("bind_driver_qr_url")
|
||||
val bindDriverQRUrl: String,
|
||||
@SerializedName("chart_socket_url")
|
||||
val chartSocketUrl: String
|
||||
)
|
||||
@@ -47,7 +47,7 @@ open class AutopilotStatusInfo : Serializable, Cloneable {
|
||||
var satelliteTime = 0.0
|
||||
|
||||
/**
|
||||
* 自动驾驶状态 0是不可用 1是ready 2是自动驾驶start
|
||||
* 自动驾驶状态 0是不可用 1是ready 2是自动驾驶start 7:平行驾驶中
|
||||
*/
|
||||
var state = 0
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ class PncActionsHelper {
|
||||
}
|
||||
// 车道保持 driving_action: 1:车道保持状态,2:跟车状态
|
||||
LANKE_KEEP_VALUE -> {
|
||||
if(driveAction == 2) "正在跟随车辆行驶" else ""
|
||||
if (driveAction == 2) "正在跟随车辆行驶" else ""
|
||||
}
|
||||
// 红绿灯通行状态 driving_action:1 表示停止动作;driving_action:2 表示通行动作
|
||||
TRAFFIC_LIGHT_VALUE -> {
|
||||
@@ -79,6 +79,18 @@ class PncActionsHelper {
|
||||
PULL_OVER_VALUE -> {
|
||||
if (driveAction == 1) "正在进站" else if (driveAction == 2) "正在等待进站" else ""
|
||||
}
|
||||
// 同 AUTO_LANE_CHANGE_LEFT_VALUE 、AUTO_LANE_CHANGE_RIGHT_VALUE
|
||||
AUTO_LANE_CHANGE_LEFT_V2N_VALUE, AUTO_LANE_CHANGE_RIGHT_V2N_VALUE -> {
|
||||
if (driveAction == 2) "正在绕过前方道路事件" else ""
|
||||
}
|
||||
// 同 LANE_AVOID_LEFT_VALUE 、LANE_AVOID_RIGHT_VALUE
|
||||
LANE_AVOID_LEFT_V2N_VALUE, LANE_AVOID_RIGHT_V2N_VALUE -> {
|
||||
if (driveAction == 2) "正在避让前方道路事件" else ""
|
||||
}
|
||||
// 正在等待变道避让施工场景 driving_action:1 表示正在等待;driving_action:2 表示等待超时请求平行驾驶;
|
||||
WAITING_V2N_VALUE -> {
|
||||
if (driveAction == 1) "正在尝试绕过前方道路事件" else if (driveAction == 2) "正在请求远程协助" else ""
|
||||
}
|
||||
else -> ""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,6 +100,16 @@ object FunctionBuildConfig {
|
||||
@JvmField
|
||||
var appIdentityMode = "Taxi_Driver_Base"
|
||||
|
||||
/**
|
||||
* 临时配置json
|
||||
* 广告json
|
||||
*
|
||||
*/
|
||||
@Volatile
|
||||
@JvmField
|
||||
var tempConfig = ""
|
||||
|
||||
|
||||
/**
|
||||
* 配置连接工控机的IP地址
|
||||
* 小巴车 192.168.8.102
|
||||
|
||||
@@ -35,6 +35,12 @@ public class MogoServicePaths {
|
||||
@Deprecated
|
||||
public static final String PATH_FLOAT_VIEW_MANAGER = "/floatview/api";
|
||||
|
||||
/**
|
||||
* Status View
|
||||
*/
|
||||
@Keep
|
||||
public static final String PATH_STATUS_VIEW_MANAGER = "/statusview/api";
|
||||
|
||||
/**
|
||||
* obu-mogo 模块
|
||||
*/
|
||||
@@ -93,6 +99,7 @@ public class MogoServicePaths {
|
||||
@Keep
|
||||
public static final String PATH_DATA_CENTER_MODULE = "/data_center/api";
|
||||
|
||||
|
||||
@Keep
|
||||
public static final String PATH_VISUAL_ANGLE = "/map/angle_change";
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.mogo.eagle.core.data.msgbox
|
||||
|
||||
enum class DataSourceType {
|
||||
DEFAULT,
|
||||
OBU,
|
||||
TELEMATIC,
|
||||
AICLOUD,
|
||||
SUMMARY// V2X事件汇总
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.mogo.eagle.core.data.telematic
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2023/3/3
|
||||
* 供网约车司乘屏通信使用
|
||||
*/
|
||||
class TelematicConstant {
|
||||
companion object {
|
||||
const val BUSINESS_STRING = 100
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ public class EventLogout {
|
||||
private int messgaeType;
|
||||
public final static int LOGOUT_TYPE = 100001;
|
||||
public final static int PERSONAL_TYPE = 100002;
|
||||
public final static int SHOW_QR_TYPE = 100003;
|
||||
|
||||
public EventLogout(int messgaeType) {
|
||||
this.messgaeType = messgaeType;
|
||||
|
||||
@@ -37,6 +37,11 @@ android {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -10,5 +10,4 @@ interface IMoGoAutopilotVehicleStateListener {
|
||||
* 没有自车状态数据
|
||||
*/
|
||||
fun onAutopilotDataException(timestamp: Long) {}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.eagle.core.function.api.autopilot
|
||||
|
||||
import chassis.ChassisStatesOuterClass
|
||||
import planning.RoboSweeperTaskIndexOuterClass
|
||||
|
||||
/**
|
||||
* 清扫车(福田)清扫控制系统状态
|
||||
@@ -10,4 +11,10 @@ interface IMoGoSweeperFutianCleanSystemListener {
|
||||
* 清扫车(福田)清扫控制系统状态
|
||||
*/
|
||||
fun onSweeperFutianCleanSystemState(cleanSystemState: ChassisStatesOuterClass.SweeperFuTianTaskSystemStates)
|
||||
|
||||
|
||||
/**
|
||||
* 清扫车(福田)指标数据 贴边数据
|
||||
*/
|
||||
fun onSweeperFutianTaskIndexData(roboSweeperTaskIndex: RoboSweeperTaskIndexOuterClass.RoboSweeperTaskIndex)
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.mogo.eagle.core.function.api.hmi.view
|
||||
|
||||
import android.content.Context
|
||||
import android.view.View
|
||||
import android.widget.FrameLayout
|
||||
import com.alibaba.android.arouter.facade.template.IProvider
|
||||
|
||||
/**
|
||||
* 设置状态栏View
|
||||
*/
|
||||
interface IStatusViewLayout : IProvider{
|
||||
|
||||
/**
|
||||
* 提供状态栏View
|
||||
*/
|
||||
fun getStatusView(context: Context):View
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.mogo.eagle.core.function.api.obucombine
|
||||
|
||||
import mogo.v2x.ObuWarningEvent
|
||||
|
||||
/**
|
||||
* obu和dc 通道打通融合
|
||||
*/
|
||||
interface IMoGoObuDcCombineListener {
|
||||
|
||||
/**
|
||||
* obu透传v2i数据,(标牌,弱势交通,红绿灯,限速,道路危险状况)
|
||||
* @param obuWarningData
|
||||
*/
|
||||
fun onMoGoObuDcCombineData(obuWarningData: ObuWarningEvent.ObuWarningData?)
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.mogo.eagle.core.function.api.v2x
|
||||
|
||||
import com.mogo.eagle.core.function.api.base.IMoGoFunctionServerProvider
|
||||
|
||||
interface IV2XEventProvider: IMoGoFunctionServerProvider {
|
||||
fun queryWholeRoadEvents()
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.mogo.eagle.core.function.api.v2x
|
||||
|
||||
/**
|
||||
* 限速信息
|
||||
*/
|
||||
interface ObuLimitingSpeedListener {
|
||||
fun onObuLimitingSpeedChange(limitingSpeed: Int)
|
||||
}
|
||||
@@ -36,6 +36,10 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -51,6 +55,7 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.mogocommons
|
||||
} else {
|
||||
compileOnly project(':core:mogo-core-data')
|
||||
compileOnly project(':foudations:mogo-commons')
|
||||
compileOnly project(':libraries:mogo-obu')
|
||||
api project(':libraries:mogo-map-api')
|
||||
api project(':core:mogo-core-function-api')
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotVehicleStateListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import planning.RoboSweeperTaskIndexOuterClass
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
|
||||
/**
|
||||
* 车辆底盘数据 回调监听
|
||||
@@ -31,4 +33,5 @@ object CallerAutopilotVehicleStateListenerManager : CallerBase<IMoGoAutopilotVeh
|
||||
listener.onAutopilotDataException(timestamp)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import android.util.Log
|
||||
import chassis.Chassis
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLamplightListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import chassis.ChassisStatesOuterClass
|
||||
import chassis.VehicleStateOuterClass
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoSweeperFutianCleanSystemListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import planning.RoboSweeperTaskIndexOuterClass
|
||||
|
||||
/**
|
||||
* 清扫车(福田)清扫控制系统状态
|
||||
@@ -19,4 +19,14 @@ object CallerSweeperFutianCleanSystemListenerManager : CallerBase<IMoGoSweeperFu
|
||||
listener.onSweeperFutianCleanSystemState(cleanSystemState)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*清扫车(福田)指标数据 贴边数据
|
||||
*/
|
||||
fun invokeSweeperFutianCleanTaskIndexData(roboSweeperTaskIndex: RoboSweeperTaskIndexOuterClass.RoboSweeperTaskIndex) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onSweeperFutianTaskIndexData(roboSweeperTaskIndex)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,13 @@
|
||||
package com.mogo.eagle.core.function.call.hmi
|
||||
|
||||
import android.content.Context
|
||||
import android.view.View
|
||||
import android.widget.FrameLayout
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths.PATH_FLOAT_VIEW_MANAGER
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths.PATH_STATUS_VIEW_MANAGER
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IStatusViewLayout
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewLayoutSet
|
||||
|
||||
/**
|
||||
@@ -14,6 +18,9 @@ object CallerHmiFloatViewManager {
|
||||
private val floatViewProviderApi
|
||||
get() = ARouter.getInstance().build(PATH_FLOAT_VIEW_MANAGER)
|
||||
.navigation() as? IViewLayoutSet
|
||||
private val statusViewProviderApi
|
||||
get() = ARouter.getInstance().build(PATH_STATUS_VIEW_MANAGER)
|
||||
.navigation() as? IStatusViewLayout
|
||||
|
||||
fun addView(view: View, params: FrameLayout.LayoutParams, movable: Boolean) {
|
||||
floatViewProviderApi?.addView(view, params, movable)
|
||||
@@ -22,4 +29,12 @@ object CallerHmiFloatViewManager {
|
||||
fun removeView(view: View) {
|
||||
floatViewProviderApi?.removeView(view)
|
||||
}
|
||||
|
||||
fun getView(context:Context):View?{
|
||||
return if (DebugConfig.isReplaceStatusview()){
|
||||
statusViewProviderApi?.getStatusView(context)
|
||||
}else{
|
||||
null
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.eagle.core.function.call.msgbox
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxProvider
|
||||
|
||||
@@ -37,6 +37,10 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -37,6 +37,10 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
res.srcDirs = [
|
||||
|
||||
@@ -18,7 +18,6 @@ package com.mogo.eagle.core.widget;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.SurfaceTexture;
|
||||
import android.media.AudioManager;
|
||||
import android.media.MediaPlayer;
|
||||
@@ -33,7 +32,6 @@ import android.view.accessibility.AccessibilityEvent;
|
||||
import android.view.accessibility.AccessibilityNodeInfo;
|
||||
import android.widget.MediaController.MediaPlayerControl;
|
||||
|
||||
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
BIN
core/mogo-core-res/src/main/res/drawable-xhdpi/operation_order_icon.png
Executable file
BIN
core/mogo-core-res/src/main/res/drawable-xhdpi/operation_order_icon.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
BIN
core/mogo-core-res/src/main/res/drawable-xhdpi/pnc_icon.png
Executable file
BIN
core/mogo-core-res/src/main/res/drawable-xhdpi/pnc_icon.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
BIN
core/mogo-core-res/src/main/res/raw/cuzuche.nt3d
Normal file
BIN
core/mogo-core-res/src/main/res/raw/cuzuche.nt3d
Normal file
Binary file not shown.
BIN
core/mogo-core-res/src/main/res/raw/m1.nt3d
Normal file
BIN
core/mogo-core-res/src/main/res/raw/m1.nt3d
Normal file
Binary file not shown.
BIN
core/mogo-core-res/src/main/res/raw/m2.nt3d
Normal file
BIN
core/mogo-core-res/src/main/res/raw/m2.nt3d
Normal file
Binary file not shown.
@@ -45,6 +45,10 @@ android {
|
||||
kapt.includeCompileClasspath = false
|
||||
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -2,10 +2,19 @@ package com.mogo.eagle.core.utilcode.mogo
|
||||
|
||||
fun AppIdentityModeUtils.getMisChannelCode(appIdentityMode: String): Int {
|
||||
return when {
|
||||
isTaxi(appIdentityMode) && isPassenger(appIdentityMode) -> 1
|
||||
isTaxi(appIdentityMode) && isDriver(appIdentityMode) -> 2
|
||||
isBus(appIdentityMode) && isPassenger(appIdentityMode) -> 3
|
||||
isBus(appIdentityMode) && isDriver(appIdentityMode) -> 4
|
||||
isTaxi(appIdentityMode) && isPassenger(appIdentityMode) -> 1 // 出租乘客端
|
||||
isTaxi(appIdentityMode) && isDriver(appIdentityMode) -> 2 // 出租司机端
|
||||
|
||||
isBus(appIdentityMode) && isPassenger(appIdentityMode) -> 3 // 公交乘客端
|
||||
isBus(appIdentityMode) && isDriver(appIdentityMode) -> 4 // 公交司机端
|
||||
|
||||
isCharter(appIdentityMode) && isPassenger(appIdentityMode) -> 8 // 包车乘客端
|
||||
isCharter(appIdentityMode) && isDriver(appIdentityMode) -> 9 // 包车司机端
|
||||
|
||||
isShuttle(appIdentityMode) && isPassenger(appIdentityMode) -> 10 // 接驳乘客端
|
||||
isShuttle(appIdentityMode) && isDriver(appIdentityMode) -> 11 // 接驳司机端
|
||||
|
||||
isSweeper(appIdentityMode) && isDriver(appIdentityMode) -> 12 // 清扫车司机端
|
||||
else -> 0
|
||||
}
|
||||
}
|
||||
@@ -23,6 +32,14 @@ object AppIdentityModeUtils {
|
||||
private const val TAXI = "Taxi"
|
||||
private const val BUS = "Bus"
|
||||
private const val SWEEPER = "Sweeper"
|
||||
private const val SHUTTLE = "Shuttle"
|
||||
private const val CHARTER = "Charter"
|
||||
|
||||
// 车型
|
||||
private const val M1 = "M1"
|
||||
private const val M2 = "M2"
|
||||
private const val JL = "JL"
|
||||
|
||||
|
||||
|
||||
private fun getInfo(appIdentityMode: String): Array<String> {
|
||||
@@ -86,6 +103,49 @@ object AppIdentityModeUtils {
|
||||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否是 接驳车(这里不细分具体是:司机、乘客等类型)
|
||||
*
|
||||
* @param appIdentityMode productFlavors 配置的类型
|
||||
* @return true - 是小巴车端 false - 不是小巴车端
|
||||
*/
|
||||
@JvmStatic
|
||||
fun isShuttle(appIdentityMode: String): Boolean {
|
||||
val (bussness, _, _) = getInfo(appIdentityMode)
|
||||
if (bussness.isNotEmpty()) {
|
||||
return bussness == SHUTTLE
|
||||
}
|
||||
return false
|
||||
}
|
||||
/**
|
||||
* 是否是 接驳车(这里不细分具体是:司机、乘客等类型)
|
||||
*
|
||||
* @param appIdentityMode productFlavors 配置的类型
|
||||
* @return true - 是小巴车端 false - 不是小巴车端
|
||||
*/
|
||||
@JvmStatic
|
||||
fun isShuttlePassenger(appIdentityMode: String): Boolean {
|
||||
return isShuttle(appIdentityMode) && isPassenger(appIdentityMode)
|
||||
}
|
||||
@JvmStatic
|
||||
fun isM2(appIdentityMode: String): Boolean {
|
||||
val (_, _, model) = getInfo(appIdentityMode)
|
||||
if (model.isNotEmpty()) {
|
||||
return model == M2
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun isJL(appIdentityMode: String): Boolean {
|
||||
val (_, _, model) = getInfo(appIdentityMode)
|
||||
if (model.isNotEmpty()) {
|
||||
return model == JL
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 是否是 清扫车(这里不细分具体是:司机、乘客等类型)
|
||||
*
|
||||
@@ -161,6 +221,45 @@ object AppIdentityModeUtils {
|
||||
return isTaxi(appIdentityMode) && isPassenger(appIdentityMode)
|
||||
}
|
||||
|
||||
fun isBusPassengerM1(appIdentityMode: String): Boolean {
|
||||
return isBus(appIdentityMode) && isPassenger(appIdentityMode) && isM1(appIdentityMode)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 是否包车
|
||||
*/
|
||||
@JvmStatic
|
||||
fun isCharter(appIdentityMode: String): Boolean {
|
||||
val (bussness, _, _) = getInfo(appIdentityMode)
|
||||
if (bussness.isNotEmpty()) {
|
||||
return bussness == CHARTER
|
||||
}
|
||||
return false
|
||||
}
|
||||
@JvmStatic
|
||||
fun isM1(appIdentityMode: String): Boolean {
|
||||
val (_, _, model) = getInfo(appIdentityMode)
|
||||
if (model.isNotEmpty()) {
|
||||
return model == M1
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
fun getProduct(appIdentityMode: String): Product {
|
||||
val (bussness, _, _) = getInfo(appIdentityMode)
|
||||
return when (bussness) {
|
||||
TAXI -> Product.TAXI
|
||||
BUS -> Product.BUS
|
||||
SWEEPER -> Product.SWEEPER
|
||||
SHUTTLE -> Product.SHUTTLE
|
||||
CHARTER -> Product.CHARTER
|
||||
else -> Product.TAXI
|
||||
}
|
||||
}
|
||||
|
||||
enum class Product{
|
||||
BUS,TAXI,SWEEPER,SHUTTLE,CHARTER
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,5 +41,7 @@ class SceneConstant {
|
||||
//清扫车
|
||||
const val M_SWEEPER = "M_SWEEPER-"
|
||||
|
||||
//M1司机端
|
||||
const val M_CHARTER_D = "M_CHARTER_D-"
|
||||
}
|
||||
}
|
||||
@@ -118,6 +118,7 @@ public final class NetworkUtils {
|
||||
if ( infoWifi != null ) {
|
||||
NetworkInfo.State wifi = infoWifi.getState();
|
||||
if ( wifi == NetworkInfo.State.CONNECTED ) {
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -129,6 +130,10 @@ public final class NetworkUtils {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (isEthernet()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,5 +26,19 @@ public final class TimeTransformUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static String stringForTimeWithHours(int timeMs) {
|
||||
if (timeMs <= 0 || timeMs >= 24 * 60 * 60 * 1000) {
|
||||
return "00:00";
|
||||
}
|
||||
int totalSeconds = timeMs / 1000;
|
||||
int seconds = totalSeconds % 60;
|
||||
int minutes = (totalSeconds / 60) % 60;
|
||||
int hours = totalSeconds / 3600;
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
Formatter mFormatter = new Formatter(stringBuilder, Locale.getDefault());
|
||||
return mFormatter.format("%d:%02d:%02d", hours, minutes, seconds).toString();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user