Merge branch 'dev_robotaxi-d-app-module_280_220608_2.8.0' of gitlab.zhidaoauto.com:zhjt/AndroidApp/MoGoEagleEye into dev_robotaxi-d-app-module_280_220608_2.8.0
This commit is contained in:
@@ -47,8 +47,8 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.kotlinstdlibjdk7
|
||||
implementation rootProject.ext.dependencies.androidxappcompat
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
||||
implementation 'com.google.android.material:material:1.2.1'
|
||||
implementation rootProject.ext.dependencies.androidxrecyclerview
|
||||
implementation rootProject.ext.dependencies.material
|
||||
annotationProcessor rootProject.ext.dependencies.aroutercompiler
|
||||
implementation rootProject.ext.dependencies.rxandroid
|
||||
implementation rootProject.ext.dependencies.androidxconstraintlayout
|
||||
|
||||
@@ -49,10 +49,11 @@ public class BusPassengerTrafficLightView extends IViewTrafficLight {
|
||||
* 展示红绿灯预警
|
||||
*
|
||||
* @param checkLightId 0-都是默认,1-红,2-黄,3-绿
|
||||
* @param lightSource 1:云端下发;2:自车感知
|
||||
*/
|
||||
@Override
|
||||
public void showWarningTrafficLight(int checkLightId) {
|
||||
super.showWarningTrafficLight(checkLightId);
|
||||
public void showWarningTrafficLight(int checkLightId,int lightSource) {
|
||||
super.showWarningTrafficLight(checkLightId,lightSource);
|
||||
mCurrentLightId = checkLightId;
|
||||
updateTrafficLightIcon(checkLightId);
|
||||
}
|
||||
|
||||
@@ -46,10 +46,11 @@ public class BusTrafficLightView extends IViewTrafficLight {
|
||||
* 展示红绿灯预警
|
||||
*
|
||||
* @param checkLightId 0-都是默认,1-红,2-黄,3-绿
|
||||
* @param lightSource 1:云端下发;2:自车感知
|
||||
*/
|
||||
@Override
|
||||
public void showWarningTrafficLight(int checkLightId) {
|
||||
super.showWarningTrafficLight(checkLightId);
|
||||
public void showWarningTrafficLight(int checkLightId,int lightSource) {
|
||||
super.showWarningTrafficLight(checkLightId,lightSource);
|
||||
mCurrentLightId = checkLightId;
|
||||
updateTrafficLightIcon(checkLightId);
|
||||
}
|
||||
|
||||
@@ -27,9 +27,9 @@ android {
|
||||
dependencies {
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation 'androidx.core:core-ktx:1.1.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
implementation 'com.google.android.material:material:1.2.1'
|
||||
implementation rootProject.ext.dependencies.androidxccorektx
|
||||
implementation rootProject.ext.dependencies.androidxappcompat
|
||||
implementation rootProject.ext.dependencies.material
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
||||
|
||||
@@ -47,8 +47,8 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.kotlinstdlibjdk7
|
||||
implementation rootProject.ext.dependencies.androidxappcompat
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
||||
implementation 'com.google.android.material:material:1.2.1'
|
||||
implementation rootProject.ext.dependencies.androidxrecyclerview
|
||||
implementation rootProject.ext.dependencies.material
|
||||
annotationProcessor rootProject.ext.dependencies.aroutercompiler
|
||||
implementation rootProject.ext.dependencies.rxandroid
|
||||
implementation rootProject.ext.dependencies.androidxconstraintlayout
|
||||
|
||||
@@ -49,10 +49,11 @@ public class TaxiPassengerTrafficLightView extends IViewTrafficLight {
|
||||
* 展示红绿灯预警
|
||||
*
|
||||
* @param checkLightId 0-都是默认,1-红,2-黄,3-绿
|
||||
* @param lightSource 1:云端下发;2:自车感知
|
||||
*/
|
||||
@Override
|
||||
public void showWarningTrafficLight(int checkLightId) {
|
||||
super.showWarningTrafficLight(checkLightId);
|
||||
public void showWarningTrafficLight(int checkLightId,int lightSource) {
|
||||
super.showWarningTrafficLight(checkLightId,lightSource);
|
||||
mCurrentLightId = checkLightId;
|
||||
updateTrafficLightIcon(checkLightId);
|
||||
}
|
||||
|
||||
@@ -47,8 +47,8 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.kotlinstdlibjdk7
|
||||
implementation rootProject.ext.dependencies.androidxappcompat
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
||||
implementation 'com.google.android.material:material:1.2.1'
|
||||
implementation rootProject.ext.dependencies.androidxrecyclerview
|
||||
implementation rootProject.ext.dependencies.material
|
||||
annotationProcessor rootProject.ext.dependencies.aroutercompiler
|
||||
implementation rootProject.ext.dependencies.rxandroid
|
||||
implementation rootProject.ext.dependencies.androidxconstraintlayout
|
||||
|
||||
@@ -46,10 +46,11 @@ public class TaxiTrafficLightView extends IViewTrafficLight {
|
||||
* 展示红绿灯预警
|
||||
*
|
||||
* @param checkLightId 0-都是默认,1-红,2-黄,3-绿
|
||||
* @param lightSource 1:云端下发;2:自车感知
|
||||
*/
|
||||
@Override
|
||||
public void showWarningTrafficLight(int checkLightId) {
|
||||
super.showWarningTrafficLight(checkLightId);
|
||||
public void showWarningTrafficLight(int checkLightId,int lightSource) {
|
||||
super.showWarningTrafficLight(checkLightId,lightSource);
|
||||
mCurrentLightId = checkLightId;
|
||||
updateTrafficLightIcon(checkLightId);
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
// 加入启动统计
|
||||
val mStartParams: HashMap<String, Any> = HashMap()
|
||||
mStartParams["start_time"] = TimeUtils.getNowMills()
|
||||
mStartParams["app_version"] = AppUtils.getAppVersionCode()
|
||||
mStartParams["app_version"] = AppUtils.getAppVersionName()
|
||||
mStartParams["app_identity_mode"] = FunctionBuildConfig.appIdentityMode
|
||||
|
||||
AnalyticsManager.track("app_start_time", mStartParams)
|
||||
|
||||
@@ -63,7 +63,7 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.material
|
||||
implementation rootProject.ext.dependencies.androidxconstraintlayout
|
||||
implementation rootProject.ext.dependencies.androidxappcompat
|
||||
implementation 'androidx.recyclerview:recyclerview:1.2.0'
|
||||
implementation rootProject.ext.dependencies.androidxrecyclerview
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||
|
||||
@@ -103,7 +103,7 @@ dependencies {
|
||||
api rootProject.ext.dependencies.mogo_core_function_api
|
||||
|
||||
implementation project(':libraries:map-usbcamera')
|
||||
|
||||
implementation project(':libraries:mogo-adas-other')
|
||||
} else {
|
||||
api project(':foudations:mogo-aicloud-services-sdk')
|
||||
api project(':foudations:mogo-commons')
|
||||
@@ -137,6 +137,7 @@ dependencies {
|
||||
api project(':core:mogo-core-function-api')
|
||||
|
||||
api project(':libraries:map-usbcamera')
|
||||
api project(':libraries:mogo-adas-other')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ class V2XTrafficLightBroadcastReceiver : BroadcastReceiver() {
|
||||
* @param trafficLightCountDown 对应交通灯倒计时,如果倒计时为0,则disable
|
||||
*/
|
||||
private fun dispatchShowWaring(trafficLightCheckType: Int, trafficLightCountDown: Int) {
|
||||
CallerHmiManager.showWarningTrafficLight(trafficLightCheckType)
|
||||
CallerHmiManager.showWarningTrafficLight(trafficLightCheckType,1)
|
||||
when(trafficLightCheckType){
|
||||
1 -> CallerHmiManager.changeCountdownRed(trafficLightCountDown)
|
||||
2 -> CallerHmiManager.changeCountdownYellow(trafficLightCountDown)
|
||||
|
||||
@@ -78,7 +78,7 @@ import kotlin.collections.ArrayList
|
||||
* 预警图层
|
||||
*/
|
||||
@Route(path = MoGoFragmentPaths.PATH_FRAGMENT_HMI)
|
||||
class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
IMoGoWaringProvider,
|
||||
IMoGoHmiViewProxy,
|
||||
MoGoHmiContract.View,
|
||||
@@ -618,9 +618,10 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
* 展示红绿灯预警
|
||||
*
|
||||
* @param checkLightId 0-都是默认不亮起,1-红,2-黄,3-绿
|
||||
* @param lightSource 1:云端下发;2:自车感知
|
||||
*/
|
||||
override fun showWarningTrafficLight(checkLightId: Int) {
|
||||
mViewTrafficLight?.showWarningTrafficLight(checkLightId)
|
||||
override fun showWarningTrafficLight(checkLightId: Int,lightSource: Int) {
|
||||
mViewTrafficLight?.showWarningTrafficLight(checkLightId,lightSource)
|
||||
}
|
||||
|
||||
override fun isWarningTrafficLightShow(): Boolean {
|
||||
|
||||
@@ -6,7 +6,6 @@ import android.content.ClipData
|
||||
import android.content.ClipboardManager
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.media.RingtoneManager
|
||||
import android.os.Build
|
||||
import android.text.Html
|
||||
import android.util.AttributeSet
|
||||
@@ -65,8 +64,8 @@ import com.mogo.map.MogoMap
|
||||
import com.mogo.map.uicontroller.VisualAngleMode
|
||||
import com.mogo.map.uicontroller.VisualAngleMode.*
|
||||
import com.mogo.module.service.routeoverlay.*
|
||||
import com.tencent.liteav.basic.datareport.a.B
|
||||
import com.zhidao.easysocket.utils.L
|
||||
import com.zhidao.support.adas.high.other.permission.BackgrounderPermission
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.*
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo_msg.MogoReportMsg
|
||||
@@ -74,6 +73,7 @@ import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
import kotlin.math.abs
|
||||
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
* @date 2021/9/30 8:46 下午
|
||||
@@ -741,6 +741,25 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
ToastUtils.showLong("经纬度复制成功")
|
||||
}
|
||||
|
||||
//状态中心-后台优化状态
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N){
|
||||
val backgroundStatus = "后台运行:" + if (BackgrounderPermission.getInstance()
|
||||
.isPermissionLongBackgroundRunning(context)
|
||||
) "<font color='green'>已优化</font>" else "<font color='red'>未优化</font>"
|
||||
tvBackgroundOperation.text = Html.fromHtml(backgroundStatus, Html.FROM_HTML_MODE_LEGACY)
|
||||
tvBackgroundOperation.setOnClickListener {
|
||||
BackgrounderPermission.getInstance().showPermissionLongBackgroundRunningDialog(context)
|
||||
}
|
||||
BackgrounderPermission.getInstance().setListener {
|
||||
val str =
|
||||
"后台运行:" + if (it) "<font color='green'>已优化</font>" else "<font color='red'>未优化</font>"
|
||||
tvBackgroundOperation.text = Html.fromHtml(str, Html.FROM_HTML_MODE_LEGACY)
|
||||
}
|
||||
}else {
|
||||
tvBackgroundOperation.visibility = GONE
|
||||
}
|
||||
//设置工控机连接状态
|
||||
setAutopilotConnectStatus()
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -786,6 +805,10 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
tbReportWarning.setOnCheckedChangeListener { _, isChecked ->
|
||||
FunctionBuildConfig.isReportWarning = isChecked
|
||||
}
|
||||
//异常上报开关只在司机端展示
|
||||
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)){
|
||||
tbReportWarning.visibility = GONE
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1547,49 +1570,6 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}"
|
||||
)
|
||||
|
||||
tvAutopilotConnectStatus.text = Html.fromHtml(
|
||||
"工控机连接状态:${
|
||||
if (AppConfigInfo.isConnectAutopilot) {
|
||||
"<font color='blue'>正常"
|
||||
} else {
|
||||
"<font color='red'>异常 原因:${
|
||||
if (AppConfigInfo.connectStatusDescribe.isNullOrEmpty()) {
|
||||
"主动断开连接"
|
||||
} else {
|
||||
AppConfigInfo.connectStatusDescribe
|
||||
}
|
||||
}"
|
||||
}
|
||||
}"
|
||||
)
|
||||
|
||||
if (AppConfigInfo.isConnectAutopilot) {
|
||||
tvIpcConnectStatus.minLines = 1
|
||||
} else {
|
||||
tvIpcConnectStatus.minLines = 4
|
||||
}
|
||||
|
||||
tvIpcConnectStatus.text = Html.fromHtml(
|
||||
"工控机连接状态:${
|
||||
if (AppConfigInfo.isConnectAutopilot) {
|
||||
"<font color='blue'>正常"
|
||||
} else {
|
||||
"<font color='red'>异常 原因:${
|
||||
if (AppConfigInfo.connectStatusDescribe.isNullOrEmpty()) {
|
||||
"主动断开连接"
|
||||
} else {
|
||||
AppConfigInfo.connectStatusDescribe
|
||||
}
|
||||
}"
|
||||
}
|
||||
}"
|
||||
)
|
||||
//如果是乘客端,则不显示工控机连接状态
|
||||
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
tvIpcConnectStatus.visibility = View.GONE
|
||||
tvAutopilotConnectStatus.visibility = View.GONE
|
||||
}
|
||||
|
||||
tvObuConnectStatus.text = Html.fromHtml(
|
||||
"OBU连接状态:${
|
||||
if (AppConfigInfo.isConnectObu) {
|
||||
@@ -1708,7 +1688,57 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
mAutoPilotStatusInfo = autoPilotStatusInfo
|
||||
AppConfigInfo.isConnectAutopilot = autoPilotStatusInfo.connectStatus
|
||||
AppConfigInfo.connectStatusDescribe = autoPilotStatusInfo.connectStatusDescribe
|
||||
setAutopilotConnectStatus()
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置工控机连接状态
|
||||
*/
|
||||
private fun setAutopilotConnectStatus(){
|
||||
ThreadUtils.runOnUiThread{
|
||||
tvAutopilotConnectStatus.text = Html.fromHtml(
|
||||
"工控机连接状态:${
|
||||
if (AppConfigInfo.isConnectAutopilot) {
|
||||
"<font color='blue'>正常"
|
||||
} else {
|
||||
"<font color='red'>异常 原因:${
|
||||
if (AppConfigInfo.connectStatusDescribe.isNullOrEmpty()) {
|
||||
"主动断开连接"
|
||||
} else {
|
||||
AppConfigInfo.connectStatusDescribe
|
||||
}
|
||||
}"
|
||||
}
|
||||
}"
|
||||
)
|
||||
|
||||
if (AppConfigInfo.isConnectAutopilot) {
|
||||
tvIpcConnectStatus.minLines = 1
|
||||
} else {
|
||||
tvIpcConnectStatus.minLines = 4
|
||||
}
|
||||
|
||||
tvIpcConnectStatus.text = Html.fromHtml(
|
||||
"工控机连接状态:${
|
||||
if (AppConfigInfo.isConnectAutopilot) {
|
||||
"<font color='blue'>正常"
|
||||
} else {
|
||||
"<font color='red'>异常 原因:${
|
||||
if (AppConfigInfo.connectStatusDescribe.isNullOrEmpty()) {
|
||||
"主动断开连接"
|
||||
} else {
|
||||
AppConfigInfo.connectStatusDescribe
|
||||
}
|
||||
}"
|
||||
}
|
||||
}"
|
||||
)
|
||||
//如果是乘客端,则不显示工控机连接状态
|
||||
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
tvIpcConnectStatus.visibility = View.GONE
|
||||
tvAutopilotConnectStatus.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAutopilotCarStateData(gnssInfo: MessagePad.GnssInfo?) {
|
||||
|
||||
@@ -5,9 +5,11 @@ import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import androidx.core.view.marginLeft
|
||||
import android.widget.TextView
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewTrafficLight
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
|
||||
/**
|
||||
@@ -21,6 +23,8 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
private var mLightIconIV: ImageView? = null
|
||||
private var mLightIconBG: ImageView? = null
|
||||
private var mLightTimeTV: GradientTextView? = null
|
||||
private var mLightSourceTV: TextView? = null
|
||||
private var mLightSourceDivider: View? = null
|
||||
private var mCurrentLightId = 0
|
||||
|
||||
init {
|
||||
@@ -32,17 +36,20 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
mLightIconIV = findViewById(R.id.hmi_traffic_light_iv)
|
||||
mLightIconBG = findViewById(R.id.hmi_traffic_light_bg)
|
||||
mLightTimeTV = findViewById(R.id.hmi_traffic_light_time_tv)
|
||||
mLightSourceTV = findViewById(R.id.hmi_traffic_light_source)
|
||||
mLightSourceDivider = findViewById(R.id.hmi_traffic_light_divider)
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示红绿灯预警
|
||||
*
|
||||
* @param checkLightId 0-都是默认,1-红,2-黄,3-绿
|
||||
* @param lightSource 1:云端下发;2:自车感知
|
||||
*/
|
||||
override fun showWarningTrafficLight(checkLightId: Int) {
|
||||
super.showWarningTrafficLight(checkLightId)
|
||||
override fun showWarningTrafficLight(checkLightId: Int,lightSource: Int) {
|
||||
super.showWarningTrafficLight(checkLightId,lightSource)
|
||||
mCurrentLightId = checkLightId
|
||||
updateTrafficLightIcon(checkLightId)
|
||||
updateTrafficLightIcon(checkLightId,lightSource)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -59,11 +66,26 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
override fun disableCountdown() {
|
||||
super.disableCountdown()
|
||||
UiThreadHandler.post {
|
||||
val lp = this.layoutParams as MarginLayoutParams
|
||||
lp.width = context.resources.getDimension(R.dimen.hmi_traffic_light_icon_size).toInt()
|
||||
this.layoutParams = lp
|
||||
mLightTimeTV!!.visibility = GONE
|
||||
mLightIconBG!!.layoutParams.width = context.resources.getDimension(R.dimen.dp_124).toInt()
|
||||
// 小巴车的司机端需要展示红绿灯信号来源
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)
|
||||
&& AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)){
|
||||
val lp = this.layoutParams as MarginLayoutParams
|
||||
lp.width = context.resources.getDimension(R.dimen.dp_325).toInt()
|
||||
this.layoutParams = lp
|
||||
mLightSourceTV!!.visibility = VISIBLE
|
||||
mLightSourceDivider!!.visibility = VISIBLE
|
||||
mLightTimeTV!!.visibility = GONE
|
||||
mLightSourceTV!!.setPadding(0,0,75,0)
|
||||
mLightIconBG!!.layoutParams.width = context.resources.getDimension(R.dimen.dp_310).toInt()
|
||||
}else{
|
||||
val lp = this.layoutParams as MarginLayoutParams
|
||||
lp.width = context.resources.getDimension(R.dimen.hmi_traffic_light_icon_size).toInt()
|
||||
this.layoutParams = lp
|
||||
mLightTimeTV!!.visibility = GONE
|
||||
mLightSourceDivider!!.visibility = View.GONE
|
||||
mLightSourceTV!!.visibility = View.GONE
|
||||
mLightIconBG!!.layoutParams.width = context.resources.getDimension(R.dimen.dp_124).toInt()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,8 +171,9 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
* 更新红绿灯icon
|
||||
*
|
||||
* @param lightId 0-都是默认,1-红,2-黄,3-绿
|
||||
* @param lightSource 1:云端下发;2:自车感知
|
||||
*/
|
||||
private fun updateTrafficLightIcon(lightId: Int) {
|
||||
private fun updateTrafficLightIcon(lightId: Int,lightSource: Int) {
|
||||
UiThreadHandler.post {
|
||||
when (lightId) {
|
||||
1 -> {
|
||||
@@ -167,15 +190,41 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
}
|
||||
else -> this@SingleTrafficLightView.visibility = GONE
|
||||
}
|
||||
when(lightSource){
|
||||
1 -> {
|
||||
mLightSourceTV!!.text = "云端下发"
|
||||
}
|
||||
2 -> {
|
||||
mLightSourceTV!!.text = "自车感知"
|
||||
}
|
||||
else -> {
|
||||
mLightSourceTV!!.visibility = GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun resetView(){
|
||||
val lp = this.layoutParams as MarginLayoutParams
|
||||
lp.width = context.resources.getDimension(R.dimen.hmi_traffic_light_layout_width).toInt()
|
||||
this.layoutParams = lp
|
||||
mLightTimeTV!!.visibility = View.VISIBLE
|
||||
mLightIconBG!!.layoutParams.width = context.resources.getDimension(R.dimen.hmi_traffic_light_bg_width).toInt()
|
||||
// 小巴车的司机端需要展示红绿灯信号来源
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)
|
||||
&& AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)){
|
||||
val lp = this.layoutParams as MarginLayoutParams
|
||||
lp.width = context.resources.getDimension(R.dimen.hmi_traffic_light_bus_layout_width).toInt()
|
||||
this.layoutParams = lp
|
||||
mLightTimeTV!!.visibility = View.VISIBLE
|
||||
mLightSourceDivider!!.visibility = View.VISIBLE
|
||||
mLightSourceTV!!.visibility = View.VISIBLE
|
||||
mLightSourceTV!!.setPadding(0,0,0,0)
|
||||
mLightIconBG!!.layoutParams.width = context.resources.getDimension(R.dimen.hmi_traffic_light_bus_bg_width).toInt()
|
||||
}else{
|
||||
val lp = this.layoutParams as MarginLayoutParams
|
||||
lp.width = context.resources.getDimension(R.dimen.hmi_traffic_light_layout_width).toInt()
|
||||
this.layoutParams = lp
|
||||
mLightTimeTV!!.visibility = View.VISIBLE
|
||||
mLightSourceDivider!!.visibility = View.GONE
|
||||
mLightSourceTV!!.visibility = View.GONE
|
||||
mLightIconBG!!.layoutParams.width = context.resources.getDimension(R.dimen.hmi_traffic_light_bg_width).toInt()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -30,8 +30,9 @@ class TrafficLightView @JvmOverloads constructor(
|
||||
* 展示红绿灯预警
|
||||
*
|
||||
* @param checkLightId 0-都是默认,1-红,2-黄,3-绿
|
||||
* @param lightSource 1:云端下发;2:自车感知
|
||||
*/
|
||||
override fun showWarningTrafficLight(checkLightId: Int) {
|
||||
override fun showWarningTrafficLight(checkLightId: Int,lightSource: Int) {
|
||||
UiThreadHandler.post {
|
||||
visibility = View.VISIBLE
|
||||
when (checkLightId) {
|
||||
|
||||
@@ -70,7 +70,7 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
public void run() {
|
||||
CallerBindingcarManager.getBindingcarProvider().queryAppUpgrade();
|
||||
}
|
||||
},3000);
|
||||
},5000);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
<?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/hmi_traffic_light_layout_width"
|
||||
android:layout_width="@dimen/hmi_traffic_light_bus_layout_width"
|
||||
android:layout_height="@dimen/hmi_traffic_light_layout_height"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/hmi_traffic_light_bg"
|
||||
android:layout_width="@dimen/hmi_traffic_light_bg_width"
|
||||
android:layout_width="@dimen/hmi_traffic_light_bus_bg_width"
|
||||
android:layout_height="@dimen/hmi_traffic_light_bg_height"
|
||||
android:layout_marginStart="@dimen/hmi_traffic_light_bg_margin_left"
|
||||
android:layout_marginTop="@dimen/hmi_traffic_light_bg_margin_top"
|
||||
android:background="@drawable/traffic_light_bg"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/hmi_traffic_light_iv"
|
||||
@@ -29,7 +31,33 @@
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/hmi_traffic_light_time_size"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/hmi_traffic_light_iv"
|
||||
android:layout_marginStart="-30px"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/hmi_traffic_light_source"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="自车感知"
|
||||
android:textColor="@color/color_FFFFFF"
|
||||
android:textSize="@dimen/hmi_traffic_light_source_size"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
android:layout_marginEnd="@dimen/dp_30"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/hmi_traffic_light_divider"
|
||||
android:layout_width="@dimen/dp_1"
|
||||
android:layout_height="@dimen/dp_47"
|
||||
android:background="@color/color_FFFFFF"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/hmi_traffic_light_source"
|
||||
android:layout_marginEnd="@dimen/dp_25"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -561,6 +561,18 @@
|
||||
android:layout_height="1dp"
|
||||
android:background="#F0F0F0" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvBackgroundOperation"
|
||||
style="@style/DebugSettingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F0F0F0" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ToggleButton
|
||||
|
||||
@@ -39,15 +39,19 @@
|
||||
<dimen name="dp_1066">1066px</dimen>
|
||||
|
||||
<dimen name="hmi_traffic_light_layout_width">225px</dimen>
|
||||
<dimen name="hmi_traffic_light_bus_layout_width">400px</dimen>
|
||||
<dimen name="hmi_traffic_light_layout_height">154px</dimen>
|
||||
<dimen name="hmi_traffic_light_layout_corner">60px</dimen>
|
||||
<dimen name="hmi_traffic_light_layout_margin_right">40px</dimen>
|
||||
<dimen name="hmi_traffic_light_layout_margin_top">28px</dimen>
|
||||
<dimen name="hmi_traffic_light_bg_width">210px</dimen>
|
||||
<dimen name="hmi_traffic_light_bus_bg_width">385px</dimen>
|
||||
<dimen name="hmi_traffic_light_bg_height">120px</dimen>
|
||||
<dimen name="hmi_traffic_light_bg_margin_left">15px</dimen>
|
||||
<dimen name="hmi_traffic_light_bg_margin_top">17px</dimen>
|
||||
<dimen name="hmi_traffic_light_icon_size">154px</dimen>
|
||||
<dimen name="hmi_traffic_light_time_view_width">130px</dimen>
|
||||
<dimen name="hmi_traffic_light_time_view_width">71px</dimen>
|
||||
<dimen name="hmi_traffic_light_time_size">60px</dimen>
|
||||
<dimen name="hmi_traffic_light_source_size">32px</dimen>
|
||||
|
||||
</resources>
|
||||
@@ -45,15 +45,19 @@
|
||||
<dimen name="brakelight_height_daytime">120px</dimen>
|
||||
|
||||
<dimen name="hmi_traffic_light_layout_width">225px</dimen>
|
||||
<dimen name="hmi_traffic_light_bus_layout_width">400px</dimen>
|
||||
<dimen name="hmi_traffic_light_layout_height">154px</dimen>
|
||||
<dimen name="hmi_traffic_light_layout_corner">60px</dimen>
|
||||
<dimen name="hmi_traffic_light_layout_margin_right">40px</dimen>
|
||||
<dimen name="hmi_traffic_light_layout_margin_top">28px</dimen>
|
||||
<dimen name="hmi_traffic_light_bg_width">210px</dimen>
|
||||
<dimen name="hmi_traffic_light_bus_bg_width">385px</dimen>
|
||||
<dimen name="hmi_traffic_light_bg_height">120px</dimen>
|
||||
<dimen name="hmi_traffic_light_bg_margin_left">15px</dimen>
|
||||
<dimen name="hmi_traffic_light_bg_margin_top">17px</dimen>
|
||||
<dimen name="hmi_traffic_light_icon_size">154px</dimen>
|
||||
<dimen name="hmi_traffic_light_time_view_width">130px</dimen>
|
||||
<dimen name="hmi_traffic_light_time_view_width">71px</dimen>
|
||||
<dimen name="hmi_traffic_light_time_size">60px</dimen>
|
||||
<dimen name="hmi_traffic_light_source_size">32px</dimen>
|
||||
|
||||
</resources>
|
||||
@@ -31,7 +31,7 @@ public class TrackManager {
|
||||
return TrackOwner.trackManager;
|
||||
}
|
||||
|
||||
public static double LIMIT_SPEED = 0.5;
|
||||
public static double LIMIT_SPEED = 0.3;
|
||||
|
||||
/**
|
||||
* marker缓存队列
|
||||
@@ -89,7 +89,16 @@ public class TrackManager {
|
||||
data = cache;
|
||||
trackObj = cacheTrack;
|
||||
}
|
||||
//todo OBU相关后面通过增加字段判断数据来源进行融合,不融合衡阳验收分支功能
|
||||
// 颜色处理 OBU相关 先处理缓存帧,后处理新感知帧,因为存在obu感知更新
|
||||
// String cacheId = "" + cache.getUuid();
|
||||
// if (cacheId.startsWith("7476") && cache.getUuid() > 10000) {
|
||||
// Log.d("hy uuid : " + cacheId, "缓存物为OBU数据,更新物体类型和颜色为OBU");
|
||||
// data = data.toBuilder().setType(cache.getType()).setColor(cache.getColor()).build();
|
||||
// }
|
||||
// if (uuid.startsWith("7476") && data.getUuid() > 10000) {
|
||||
// Log.d("hy uuid : " + uuid, "出现OBU感知物体");
|
||||
// data = data.toBuilder().setType(data.getType()).setColor(data.getColor()).build();
|
||||
// }
|
||||
}
|
||||
uuid = findSameValue;
|
||||
data = trackObj.updateObj(data);
|
||||
@@ -98,7 +107,6 @@ public class TrackManager {
|
||||
}
|
||||
cellIdCaches.forcePut(uuid, trackObj.getCellIdPos());
|
||||
mMarkersCaches.put(uuid, trackObj);
|
||||
Log.d("hy uuid : " + uuid, " 显示物体,塞入set");
|
||||
trafficDataUuidList.add(uuid);
|
||||
}
|
||||
//todo 将上次没被删除掉物体加入集合,造成延迟删除,对运动物体不友好
|
||||
@@ -131,7 +139,6 @@ public class TrackManager {
|
||||
}
|
||||
}
|
||||
trafficDataUuidList.forEach(uuid -> {
|
||||
Log.d("hy uuid : " + uuid, " 移除物体");
|
||||
removeKey(uuid);
|
||||
});
|
||||
//todo bus存在时间回溯,将id重置,会有id复用问题,导致鹰眼展示元素缺少
|
||||
|
||||
@@ -21,21 +21,21 @@ import mogo.telematics.pad.MessagePad;
|
||||
public class TrackObj {
|
||||
|
||||
private final CircleQueue circleQueue = new CircleQueue(10);
|
||||
private final KalmanFilter kalmanFilter; //卡尔曼结果
|
||||
// private final KalmanFilter kalmanFilter; //卡尔曼结果
|
||||
private S2CellId s2CellId; //s2 id权重
|
||||
private S2LatLng s2LatLng; //s2 经纬度
|
||||
private long recentlyTime; //用于缓存帧数判断,暂定缓存1秒数据,中间如果有物体未出现,1秒后删除
|
||||
private double roadAngle; //道路航向
|
||||
private double headingDelta; //航向角德尔塔
|
||||
private int[] typeArray = new int[5];
|
||||
private double typeWeight; //类型权重
|
||||
private int[] typeArray = new int[3];
|
||||
private int typeWeight; //类型权重
|
||||
private double lat;
|
||||
private double lon;
|
||||
private double speedAverage;
|
||||
private com.zhidaoauto.map.sdk.open.road.CenterLine centerLineInfo = null;
|
||||
|
||||
public TrackObj(MessagePad.TrackedObject data) {
|
||||
kalmanFilter = new KalmanFilter(data.getLongitude(), data.getLatitude(), 0.0000005);
|
||||
// kalmanFilter = new KalmanFilter(data.getLongitude(), data.getLatitude(), 0.0000005);
|
||||
circleQueue.addQueue(new ObjQueue(data.getHeading(), data.getSpeed(), data.getType()));
|
||||
recentlyTime = Double.valueOf(data.getSatelliteTime() * 1000).longValue();
|
||||
lat = data.getLatitude();
|
||||
@@ -57,7 +57,6 @@ public class TrackObj {
|
||||
correct();
|
||||
|
||||
recentlyTime = Double.valueOf(data.getSatelliteTime() * 1000).longValue();
|
||||
// Log.d("calHeading uuid : " + cacheData.getUuid(), "result heading : " + cacheData.getHeading() + " speed : " + cacheData.getSpeed());
|
||||
circleQueue.addQueue(new ObjQueue(cacheData.getHeading(), cacheData.getSpeed(), cacheData.getType()));
|
||||
return cacheData;
|
||||
}
|
||||
@@ -70,17 +69,14 @@ public class TrackObj {
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
private void calAverageSpeedAndType() {
|
||||
|
||||
if (circleQueue.size() >= 5) {
|
||||
if (circleQueue.size() >= 3) {
|
||||
//计算平均速度
|
||||
List<ObjQueue> objQueueList = circleQueue.getLastFiveFrame();
|
||||
speedAverage = (objQueueList.get(0).getSpeed() + objQueueList.get(1).getSpeed() + objQueueList.get(2).getSpeed() + objQueueList.get(3).getSpeed() + objQueueList.get(4).getSpeed()) / 5;
|
||||
List<ObjQueue> objQueueList = circleQueue.getLastThreeFrame();
|
||||
speedAverage = (objQueueList.get(0).getSpeed() + objQueueList.get(1).getSpeed() + objQueueList.get(2).getSpeed()) / 3;
|
||||
//计算类型
|
||||
typeArray[0] = objQueueList.get(0).getType();
|
||||
typeArray[1] = objQueueList.get(1).getType();
|
||||
typeArray[2] = objQueueList.get(2).getType();
|
||||
typeArray[3] = objQueueList.get(3).getType();
|
||||
typeArray[4] = objQueueList.get(4).getType();
|
||||
} else {
|
||||
double cal = 0;
|
||||
List<ObjQueue> objQueueList = circleQueue.getPreFrame();
|
||||
@@ -90,9 +86,16 @@ public class TrackObj {
|
||||
}
|
||||
speedAverage = cal / objQueueList.size();
|
||||
}
|
||||
Log.d("hy uuid : " + cacheData.getUuid()," 类型 : " + Arrays.toString(typeArray));
|
||||
typeArray = Arrays.stream(typeArray).sorted().toArray();
|
||||
typeWeight = typeArray[typeArray.length / 2];
|
||||
typeWeight = typeArray[typeArray.length / 2] == 0 ? cacheData.getType() : typeArray[typeArray.length / 2];
|
||||
|
||||
// 重新给静止物体赋值速度
|
||||
if (relativeStatic()) {
|
||||
double calSpeed = circleQueue.getLastFrame().getSpeed();
|
||||
if (cacheData.getSpeed() != 0.0 && calSpeed == 0.0 && cacheData.getSpeed() >= 0.19444) {
|
||||
cacheData = cacheData.toBuilder().setSpeed(0.19444).build();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void calLoc() {
|
||||
@@ -100,7 +103,11 @@ public class TrackObj {
|
||||
if (relativeStatic()) {
|
||||
double angle = roadAngle != 0 ? roadAngle : cacheData.getHeading();
|
||||
if (centerLineInfo == null && isFourWheelType()) {
|
||||
centerLineInfo = MapDataApi.INSTANCE.getCenterLineInfo(lon, lat, (float) angle);
|
||||
try {
|
||||
centerLineInfo = MapDataApi.INSTANCE.getCenterLineInfo(lon, lat, (float) angle);
|
||||
}catch (Exception e){
|
||||
Log.d("hy uuid : " + cacheData.getUuid(), "道路获取异常");
|
||||
}
|
||||
if (centerLineInfo != null && centerLineInfo.getPoints() != null && !centerLineInfo.getPoints().isEmpty()) {
|
||||
double[] matchedPoint = PointInterpolatorUtil.mergeToRoad(cacheData.getLongitude(), cacheData.getLatitude(), centerLineInfo.getPoints());
|
||||
if (matchedPoint[0] > 0 || matchedPoint[1] > 0) {
|
||||
@@ -108,17 +115,16 @@ public class TrackObj {
|
||||
lat = matchedPoint[1];
|
||||
s2LatLng = S2LatLng.fromDegrees(cacheData.getLatitude(), cacheData.getLongitude());
|
||||
s2CellId = S2CellId.fromLatLng(s2LatLng).parent(22);
|
||||
Log.d("hy uuid : " + cacheData.getUuid(), " 更新定位 lon : " + matchedPoint[0] + " , lat : " + matchedPoint[1]);
|
||||
// Log.d("hy uuid : " + cacheData.getUuid(), " 更新定位 lon : " + matchedPoint[0] + " , lat : " + matchedPoint[1]);
|
||||
} else {
|
||||
centerLineInfo = null;
|
||||
Log.d("hy uuid : " + cacheData.getUuid(), "计算结果出现问题 : " + matchedPoint[0] + " , " + matchedPoint[1]);
|
||||
// Log.d("hy uuid : " + cacheData.getUuid(), "计算结果出现问题 : " + matchedPoint[0] + " , " + matchedPoint[1]);
|
||||
}
|
||||
} else {
|
||||
centerLineInfo = null;
|
||||
Log.d("hy uuid : " + cacheData.getUuid(), "未获取到道路数据");
|
||||
// Log.d("hy uuid : " + cacheData.getUuid(), "未获取到道路数据");
|
||||
}
|
||||
}
|
||||
Log.d("hy uuid : " + cacheData.getUuid(), " 静止使用定位数据 lon : " + lon + " , lat : " + lat);
|
||||
cacheData = cacheData.toBuilder().setLongitude(lon).setLatitude(lat).build();
|
||||
} else {
|
||||
centerLineInfo = null;
|
||||
@@ -128,7 +134,7 @@ public class TrackObj {
|
||||
lon = cacheData.getLongitude();
|
||||
s2LatLng = S2LatLng.fromDegrees(cacheData.getLatitude(), cacheData.getLongitude());
|
||||
s2CellId = S2CellId.fromLatLng(s2LatLng).parent(22);
|
||||
Log.d("hy uuid : " + cacheData.getUuid(), " 开始移动 lon : " + lon + " , lat : " + lat);
|
||||
// Log.d("hy uuid : " + cacheData.getUuid(), " 开始移动 lon : " + lon + " , lat : " + lat);
|
||||
// cacheData = cacheData.toBuilder().setLongitude(lonLat[0]).setLatitude(lonLat[1]).build();
|
||||
}
|
||||
}
|
||||
@@ -166,11 +172,9 @@ public class TrackObj {
|
||||
if (centerLine != null && centerLine.getAngle() != 0) {
|
||||
cacheData = cacheData.toBuilder().setHeading(centerLine.getAngle()).build();
|
||||
} else {
|
||||
// Log.d("hy uuid : " + cacheData.getUuid(), "未获取到道路航向,使用上一帧 : " + circleQueue.getLastFrame().getHeading());
|
||||
cacheData = cacheData.toBuilder().setHeading(circleQueue.getLastFrame().getHeading()).build();
|
||||
}
|
||||
} else {
|
||||
// Log.d("hy uuid : " + cacheData.getUuid(), "未获取到道路航向,使用上一帧 : " + circleQueue.getLastFrame().getHeading());
|
||||
cacheData = cacheData.toBuilder().setHeading(circleQueue.getLastFrame().getHeading()).build();
|
||||
}
|
||||
|
||||
@@ -200,8 +204,8 @@ public class TrackObj {
|
||||
|
||||
public boolean isFourWheelType() {
|
||||
return typeWeight != TrafficTypeEnum.TYPE_TRAFFIC_ID_PEOPLE.getType()
|
||||
|| typeWeight != TrafficTypeEnum.TYPE_TRAFFIC_ID_BICYCLE.getType()
|
||||
|| typeWeight != TrafficTypeEnum.TYPE_TRAFFIC_ID_MOTO.getType();
|
||||
&& typeWeight != TrafficTypeEnum.TYPE_TRAFFIC_ID_BICYCLE.getType()
|
||||
&& typeWeight != TrafficTypeEnum.TYPE_TRAFFIC_ID_MOTO.getType();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -664,7 +664,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
when (currentLight.phase) {
|
||||
// 灯光不可用
|
||||
0x0 -> {
|
||||
CallerHmiManager.showWarningTrafficLight(0)
|
||||
CallerHmiManager.showWarningTrafficLight(0,2)
|
||||
}
|
||||
// 红灯
|
||||
0x1 -> {
|
||||
@@ -673,7 +673,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
isRedLight = true
|
||||
}
|
||||
isGreenLight = false
|
||||
CallerHmiManager.showWarningTrafficLight(1)
|
||||
CallerHmiManager.showWarningTrafficLight(1,2)
|
||||
|
||||
val red = currentLight.count_down.toInt()
|
||||
CallerHmiManager.changeCountdownRed(red)
|
||||
@@ -688,7 +688,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
isGreenLight = true
|
||||
}
|
||||
isRedLight = false
|
||||
CallerHmiManager.showWarningTrafficLight(3)
|
||||
CallerHmiManager.showWarningTrafficLight(3,2)
|
||||
val green = currentLight.count_down.toInt()
|
||||
CallerHmiManager.changeCountdownGreen(green)
|
||||
//防止数据出现问题的容错
|
||||
@@ -733,7 +733,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
// 黄灯
|
||||
0x3 -> {
|
||||
CallerHmiManager.disableWarningV2X(appId.toString())
|
||||
CallerHmiManager.showWarningTrafficLight(2)
|
||||
CallerHmiManager.showWarningTrafficLight(2,2)
|
||||
val yellow = currentLight.count_down.toInt()
|
||||
CallerHmiManager.changeCountdownYellow(yellow)
|
||||
CallerHmiManager.changeCountdownGreen(0)
|
||||
|
||||
@@ -24,7 +24,7 @@ class TrafficLightHMIManager {
|
||||
currentTrafficLight?.let {
|
||||
if (!initView) {
|
||||
initView = true
|
||||
CallerHmiManager.showWarningTrafficLight(0)
|
||||
CallerHmiManager.showWarningTrafficLight(0,1)
|
||||
}
|
||||
callerHMIToChangeLight(it)
|
||||
}
|
||||
@@ -38,19 +38,19 @@ class TrafficLightHMIManager {
|
||||
}
|
||||
when {
|
||||
trafficLightStatus.isGreen() || trafficLightStatus.isFlashGreen() -> {
|
||||
CallerHmiManager.showWarningTrafficLight(3)
|
||||
CallerHmiManager.showWarningTrafficLight(3,1)
|
||||
CallerHmiManager.changeCountdownGreen(remain)
|
||||
// CallerHmiManager.changeCountdownRed(-1)
|
||||
// CallerHmiManager.changeCountdownYellow(-1)
|
||||
}
|
||||
trafficLightStatus.isYellow() -> {
|
||||
CallerHmiManager.showWarningTrafficLight(2)
|
||||
CallerHmiManager.showWarningTrafficLight(2,1)
|
||||
CallerHmiManager.changeCountdownYellow(remain)
|
||||
// CallerHmiManager.changeCountdownGreen(-1)
|
||||
// CallerHmiManager.changeCountdownRed(-1)
|
||||
}
|
||||
trafficLightStatus.isRed() -> {
|
||||
CallerHmiManager.showWarningTrafficLight(1)
|
||||
CallerHmiManager.showWarningTrafficLight(1,1)
|
||||
CallerHmiManager.changeCountdownRed(remain)
|
||||
// CallerHmiManager.changeCountdownGreen(-1)
|
||||
// CallerHmiManager.changeCountdownYellow(-1)
|
||||
|
||||
@@ -67,17 +67,17 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener , IMoGoTrafficLigh
|
||||
when (light.state) {
|
||||
TrafficLightOuterClass.LightState.STATE_RED -> {
|
||||
//红灯
|
||||
CallerHmiManager.showWarningTrafficLight(1)
|
||||
CallerHmiManager.showWarningTrafficLight(1,2)
|
||||
CallerHmiManager.changeCountdownGreen(0)
|
||||
}
|
||||
TrafficLightOuterClass.LightState.STATE_YELLOW -> {
|
||||
//黄灯
|
||||
CallerHmiManager.showWarningTrafficLight(2)
|
||||
CallerHmiManager.showWarningTrafficLight(2,2)
|
||||
CallerHmiManager.changeCountdownGreen(0)
|
||||
}
|
||||
TrafficLightOuterClass.LightState.STATE_GREEN -> {
|
||||
//绿灯
|
||||
CallerHmiManager.showWarningTrafficLight(3)
|
||||
CallerHmiManager.showWarningTrafficLight(3,2)
|
||||
CallerHmiManager.changeCountdownGreen(0)
|
||||
}
|
||||
else -> {}
|
||||
|
||||
@@ -14,8 +14,9 @@ abstract class IViewTrafficLight(context: Context?, attrs: AttributeSet?, defSty
|
||||
* 展示红绿灯预警
|
||||
*
|
||||
* @param checkLightId 0-都是默认,1-红,2-黄,3-绿
|
||||
* @param lightSource 1:云端下发;2:自车感知
|
||||
*/
|
||||
open fun showWarningTrafficLight(checkLightId: Int) {}
|
||||
open fun showWarningTrafficLight(checkLightId: Int,lightSource: Int) {}
|
||||
|
||||
/**
|
||||
* 关闭红绿灯预警展示,并重制灯态
|
||||
|
||||
@@ -86,8 +86,9 @@ interface IMoGoWaringProvider : IMoGoHmiViewProxy {
|
||||
* 展示红绿灯预警
|
||||
*
|
||||
* @param checkLightId 0-都是默认,1-红,2-黄,3-绿
|
||||
* @param lightSource 1:云端下发;2:自车感知
|
||||
*/
|
||||
fun showWarningTrafficLight(checkLightId: Int)
|
||||
fun showWarningTrafficLight(checkLightId: Int,lightSource: Int)
|
||||
|
||||
/**
|
||||
* 红绿灯是否展示
|
||||
|
||||
@@ -57,7 +57,7 @@ object AnalyticsManager {
|
||||
val map: MutableMap<String, Any> = ArrayMap()
|
||||
map["debug"] = if (isDebug) 1 else 0
|
||||
map["sn"] = MoGoAiCloudClientConfig.getInstance().sn
|
||||
map["app_version"] = AppUtils.getAppVersionCode()
|
||||
map["app_version"] = AppUtils.getAppVersionName()
|
||||
map["app_identity_mode"] = FunctionBuildConfig.appIdentityMode
|
||||
|
||||
return map
|
||||
|
||||
@@ -114,9 +114,10 @@ object CallerHmiManager : CallerBase() {
|
||||
* 展示红绿灯预警
|
||||
*
|
||||
* @param checkLightId 0-都是默认,1-红,2-黄,3-绿
|
||||
* @param lightSource 1:云端下发;2:自车感知
|
||||
*/
|
||||
fun showWarningTrafficLight(checkLightId: Int) {
|
||||
waringProviderApi?.showWarningTrafficLight(checkLightId)
|
||||
fun showWarningTrafficLight(checkLightId: Int,lightSource: Int) {
|
||||
waringProviderApi?.showWarningTrafficLight(checkLightId,lightSource)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -90,8 +90,8 @@ WEBSOCKET_VERSION=1.1.7
|
||||
applicationId=com.mogo.launcer
|
||||
applicationName=IntelligentPilot
|
||||
# RoboBus司机端:2.5.1;RoboTaxi司机端:2.5.1;RoboTaxi乘客端:1.0.0
|
||||
versionCode=2070000
|
||||
versionName=2.7.0
|
||||
versionCode=2080000
|
||||
versionName=2.8.0
|
||||
|
||||
################# 新架构模块Maven版本管理 #################
|
||||
MOGO_CORE_FUNCTION_AUTOPILOT_VERSION=0.0.58.10
|
||||
|
||||
Reference in New Issue
Block a user