添加Log日志,调整其level
This commit is contained in:
@@ -37,6 +37,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener {
|
||||
private fun handleRedLightWarning(trafficLightStatus: TrafficLightStatus, yellowLightTime: Int = 0) {
|
||||
// 如果是Vip则不处理
|
||||
if (SPUtils.getInstance().getLong("vip") > 0) {
|
||||
Logger.w(TAG, "Vip用户不处理闯红灯预警逻辑!")
|
||||
return
|
||||
}
|
||||
// 路口100m闯红灯预警
|
||||
@@ -52,6 +53,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener {
|
||||
|
||||
when {
|
||||
trafficLightStatus.isRed() -> {
|
||||
Logger.d(TAG, "=====当前为红灯=====")
|
||||
// 到达路口时红灯还没走完
|
||||
if (arriveTime <= remainTime) {
|
||||
redLightWarning()
|
||||
@@ -60,6 +62,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener {
|
||||
}
|
||||
}
|
||||
trafficLightStatus.isYellow() -> {
|
||||
Logger.d(TAG, "=====当前为黄灯=====")
|
||||
// 到达路口时黄灯还没走完
|
||||
if (arriveTime <= remainTime) {
|
||||
redLightWarning()
|
||||
@@ -68,8 +71,9 @@ class RedLightWarningManager : IMoGoTrafficLightListener {
|
||||
}
|
||||
}
|
||||
trafficLightStatus.isGreen() -> {
|
||||
Logger.d(TAG, "=====当前为绿灯=====")
|
||||
// 到达路口时绿灯已经走完
|
||||
if (arriveTime > remainTime) {
|
||||
if (arriveTime >= remainTime) {
|
||||
redLightWarning()
|
||||
} else if (arriveTime < remainTime) {
|
||||
greenLightWarning()
|
||||
@@ -85,6 +89,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener {
|
||||
* 闯红灯预警
|
||||
*/
|
||||
private fun redLightWarning() {
|
||||
Logger.d(TAG, "=====闯红灯预警=====")
|
||||
ThreadUtils.runOnUiThread {
|
||||
CallerHmiManager.showWarningV2X(
|
||||
EventTypeEnum.TYPE_USECASE_ID_IVP.poiType.toInt(),
|
||||
@@ -100,6 +105,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener {
|
||||
* 绿灯通行提示
|
||||
*/
|
||||
private fun greenLightWarning() {
|
||||
Logger.d(TAG, "=====绿灯通行预警=====")
|
||||
ThreadUtils.runOnUiThread {
|
||||
val content = String.format(
|
||||
EventTypeEnum.getWarningContent(EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType),
|
||||
|
||||
Reference in New Issue
Block a user