修改can数据和红绿灯数据
This commit is contained in:
@@ -164,8 +164,8 @@ ext {
|
||||
// obu sdk
|
||||
obusdk : "com.zhidao.enterprise.smartv2x:smartv2x:1.0.0.3",
|
||||
// mebulaobu : 'com.zhidao.support.nebulaobu:nebulaobu:1.0.0.3',
|
||||
mogoobu : 'com.zhidao.support.obu:mogoobu:1.0.0.11',
|
||||
mogoami : 'com.zhidao.support.obu.ami:mogoami:1.0.0.1',
|
||||
mogoobu : 'com.zhidao.support.obu:mogoobu:1.0.0.12',
|
||||
mogoami : 'com.zhidao.support.obu.ami:mogoami:1.0.0.2',
|
||||
|
||||
// 左侧面板
|
||||
moduleleftpanel : "com.mogo.module:module-left-panel:${MOGO_MODULE_LEFT_PANEL_VERSION}",
|
||||
|
||||
@@ -295,7 +295,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
info.threat_info.app_id,
|
||||
info.status,
|
||||
info.ext_info.lights,
|
||||
info.ext_info.indicator
|
||||
info.ext_info.lightIndex
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -480,7 +480,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
private fun handlerTrafficLight(appId: Int, status: Int, lights: List<Light>, indicator: Int) {
|
||||
LogUtils.dTag(
|
||||
MogoObuConst.TAG_MOGO_OBU,
|
||||
"handlerTrafficLight appId = $appId --- status = $status ---indicator = $indicator ---lights = $lights ---lights.size = ${lights.size}"
|
||||
"handlerTrafficLight appId = $appId --- status = $status ---indicator = $indicator ---lights.size = ${lights.size} ---lights = $lights "
|
||||
)
|
||||
when (status) {
|
||||
// 添加
|
||||
@@ -511,9 +511,9 @@ class MogoPrivateObuManager private constructor() {
|
||||
) {
|
||||
var ttsContent = ""
|
||||
var alertContent = ""
|
||||
// TODO 这里需要根据真实数据确定 indicator 取值方式,暂时写 0 调试
|
||||
if (lights.size >= indicator) {
|
||||
val currentLight = lights[0]
|
||||
//这里需要根据真实数据确定 indicator 取值方式
|
||||
if (lights.size >= indicator && indicator != -1) {
|
||||
val currentLight = lights[indicator]
|
||||
LogUtils.dTag(
|
||||
MogoObuConst.TAG_MOGO_OBU,
|
||||
"currentLight = $currentLight ---currentLight.phase = ${currentLight.phase} --- indicator = $indicator ---appId = $appId"
|
||||
|
||||
@@ -150,27 +150,9 @@ public class AdasEventManager implements OnAdasListener, OnAdasMsgConnectStatusL
|
||||
CarStateInfo.ValuesBean bean = carStateInfo.getValues();
|
||||
if (bean != null) {
|
||||
int turn_light = bean.getTurn_light(); //转向灯状态 0是正常 1是左转 2是右转
|
||||
if (turn_light == 0) {
|
||||
AmiClientManager.getInstance().setLeft_turn_signal(1);
|
||||
AmiClientManager.getInstance().setRight_turn_signal(1);
|
||||
} else if (turn_light == 1) {
|
||||
AmiClientManager.getInstance().setLeft_turn_signal(2);
|
||||
AmiClientManager.getInstance().setRight_turn_signal(1);
|
||||
} else if (turn_light == 2) {
|
||||
AmiClientManager.getInstance().setLeft_turn_signal(1);
|
||||
AmiClientManager.getInstance().setRight_turn_signal(2);
|
||||
}
|
||||
|
||||
// int flash_light = bean.getFlash_light(); //双闪灯状态
|
||||
//
|
||||
// if (flash_light == 0) {
|
||||
// AmiClientManager.getInstance().setHazard_signal(1);
|
||||
// } else {
|
||||
// AmiClientManager.getInstance().setHazard_signal(2);
|
||||
// }
|
||||
|
||||
int brake_light = bean.getBrake_light(); //刹车灯状态
|
||||
AmiClientManager.getInstance().setTurnLightState(turn_light);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user