add turn light

This commit is contained in:
lixiaopeng
2022-01-07 14:52:52 +08:00
parent 34f3f0fcfe
commit 3a2905d430
5 changed files with 67 additions and 4 deletions

View File

@@ -114,7 +114,7 @@ ext {
obusdk : "com.zhidao.enterprise.smartv2x:smartv2x:1.0.0.3",
mogoobu : 'com.zhidao.support.obu:mogoobu:1.0.0.19',
mogoami : 'com.zhidao.support.obu.ami:mogoami:1.0.0.10',
adasHigh : 'com.zhidao.support.adas:high:1.2.1.2',
adasHigh : 'com.zhidao.support.adas:high:1.2.1.2_bate1',
// google
googlezxing : "com.google.zxing:core:3.3.3",

View File

@@ -635,6 +635,20 @@ class MoGoHmiFragment : MvpFragment<MoGoWarningContract.View?, WaringPresenter?>
}
}
/**
* 显示转向灯效果
*/
override fun showTurnLight(light: Int) {
TODO("Not yet implemented")
}
/**
* 显示刹车效果
*/
override fun showBrakeLight(brakeLight: Int) {
TODO("Not yet implemented")
}
override fun onDestroy() {
super.onDestroy()
Log.d(TAG, "onDestroy")

View File

@@ -148,4 +148,15 @@ interface IMoGoWaringProvider {
fun showToolsView()
fun hideToolsView()
/**
* 展示转向灯
*/
fun showTurnLight(light: Int)
/**
* 展示刹车灯
*/
fun showBrakeLight(brakeLight: Int)
}

View File

@@ -197,6 +197,24 @@ object CallerHmiManager : CallerBase() {
waringProviderApi.startRoadCameraLive(flvUrl)
}
/**
* 呈现转向灯ui
*
* @param light
*/
fun showTurnLight(light: Int) {
waringProviderApi.showTurnLight(light)
}
/**
* 呈现刹车灯ui
*
* @param brakeLight
*/
fun showBrakeLight(brakeLight: Int) {
waringProviderApi.showTurnLight(brakeLight)
}
fun showNoSignalView() {
waringProviderApi.showNoSignView()
}

View File

@@ -15,6 +15,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarStatusListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager;
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
import com.zhidao.support.adas.high.AdasManager;
import com.zhidao.support.adas.high.OnAdasListener;
@@ -23,6 +24,8 @@ import com.zhidao.support.adas.high.bean.AutopilotStatus;
import com.zhidao.support.adas.high.bean.AutopilotWayArrive;
import com.zhidao.support.adas.high.bean.CarLaneInfo;
import com.zhidao.support.adas.high.bean.CarStateInfo;
import com.zhidao.support.adas.high.bean.IPCUpgradePatchDownloadProgressInfo;
import com.zhidao.support.adas.high.bean.IPCUpgradeStateInfo;
import com.zhidao.support.adas.high.bean.LightStatueInfo;
import com.zhidao.support.adas.high.bean.ObstaclesInfo;
import com.zhidao.support.adas.high.bean.RectInfo;
@@ -62,13 +65,22 @@ public class OnAdasListenerAdapter implements OnAdasListener {
// Log.w("DHY-location", bean.getLon() + "," + bean.getLat() + " OnAdasListenerAdapter-onCarStateData");
if (bean != null) {
int turn_light = bean.getTurn_light(); //转向灯状态 0是正常 1是左转 2是右转
//Logger.d(TAG, "onCarStateData ---- turn_light = " + turn_light);
AmiClientManager.getInstance().setTurnLightState(turn_light);
int turnLight = bean.getTurn_light(); //转向灯状态 0是正常 1是左转 2是右转
AmiClientManager.getInstance().setTurnLightState(turnLight);
int brakeLight = bean.getBrake_light(); //TODO
Logger.d(TAG, "onCarStateData ---- turnLight = " + turnLight + "---brakeLight = " + brakeLight);
//设置转向灯
CallerHmiManager.INSTANCE.showTurnLight(turnLight);
//设置刹车信息
CallerHmiManager.INSTANCE.showBrakeLight(brakeLight);
} else {
Logger.e(TAG, "bean == null ");
}
AutopilotCarStateInfo autopilotCarStateInfo = AdasObjectUtils.INSTANCE.fromAdasCarStateInfoObject(carStateInfo);
CallerAutopilotCarStatusListenerManager.INSTANCE.invokeAutopilotCarStateData(autopilotCarStateInfo);
}
@@ -187,5 +199,13 @@ public class OnAdasListenerAdapter implements OnAdasListener {
}
@Override
public void onUpgradeStateInfo(IPCUpgradeStateInfo info) {
}
@Override
public void onUpgradePatchDownload(IPCUpgradePatchDownloadProgressInfo info) {
}
}