Merge branch 'dev_robotaxi-d-app-module_2132_221223_2.13.2' into test_robotaxi-d-app-module_2132_221223_2.13.2.1

This commit is contained in:
lixiaopeng
2023-01-16 16:29:21 +08:00
2 changed files with 70 additions and 18 deletions

View File

@@ -27,11 +27,13 @@ import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningListener;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener;
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxEventListener;
import com.mogo.eagle.core.function.api.v2x.LimitingVelocityListener;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager;
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager;
import com.mogo.eagle.core.function.call.v2x.CallLimitingVelocityListenerManager;
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
@@ -64,6 +66,7 @@ import com.mogo.och.taxi.passenger.callback.ITaxiPassengerVeloctityCallback;
import com.mogo.och.taxi.passenger.constant.TaxiPassengerConst;
import com.mogo.och.taxi.passenger.constant.TaxiPassengerOrderStatusEnum;
import com.mogo.och.taxi.passenger.network.TaxiPassengerServiceManager;
import com.mogo.och.taxi.passenger.ui.leftmenu.OverlayLeftViewUtils;
import com.mogo.och.taxi.passenger.utils.TaxiPassengerAnalyticsManager;
import org.jetbrains.annotations.NotNull;
@@ -249,6 +252,8 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
//开启自驾后 异常信息返回
OCHAdasAbilityManager.getInstance().setAdasStartFailureCallback(mAdasStartFailureListener);
CallerMsgBoxEventListenerManager.INSTANCE.addListener(TAG,iMsgBoxEventListener);
}
private void releaseListeners() {
@@ -267,6 +272,8 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
AbnormalFactorsLoopManager.INSTANCE.stopLoopAbnormalFactors();
OCHAdasAbilityManager.getInstance().setAdasStartFailureCallback(null);
CallerMsgBoxEventListenerManager.INSTANCE.removeListener(iMsgBoxEventListener);
}
/**
@@ -603,6 +610,17 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
}
};
private final IMsgBoxEventListener iMsgBoxEventListener = new IMsgBoxEventListener() {
@Override
public void onSummaryClickEvent() {
if (mCurrentOCHOrder == null){
ToastUtils.showLong("行程已结束");
}else {
OverlayLeftViewUtils.INSTANCE.transmissionIndexGet(OverlayLeftViewUtils.OVERVIEW);
}
}
};
public void startToRouteAndWipe(List<MessagePad.Location> models) {
List<MogoLocation> locationsModels = CoordinateCalculateRouteUtil
.coordinateConverterWgsToGcjLocations(mContext,models);

View File

@@ -4,7 +4,6 @@ import android.content.Context
import android.util.Log
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.config.HmiBuildConfig
import com.mogo.eagle.core.data.config.HmiBuildConfig.isShowObuLimitSpeedView
import com.mogo.eagle.core.data.enums.*
import com.mogo.eagle.core.data.msgbox.DataSourceType
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
@@ -525,18 +524,24 @@ class MogoPrivateObuNewManager private constructor() {
// 交通参与者类型 0x0:未知 UNKNOWN | 1机动车 2:非机动车 NON_MOTOR | 3:行人 PEDESTRIAN 4:obu
if (data != null && data.participant != null) {
var v2xType = ""
if (data.participant.ptcType == 1) { //机动车
v2xType =
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES.poiType
} else if (data.participant.ptcType == 2) { //非机动车
v2xType =
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES.poiType
} else if (data.participant.ptcType == 3) { //行人
// if (data.participant.ptcType == 1) { //机动车
// v2xType =
// EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES.poiType
// } else if (data.participant.ptcType == 2) { //非机动车
// v2xType =
// EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES.poiType
// } else if (data.participant.ptcType == 3) { //行人
// v2xType =
// EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_PERSON.poiType
// } else { //未知
// v2xType = EventTypeEnumNew.TYPE_ERROR.poiType
// }
if (data.participant.ptcType == 3) { //行人
v2xType =
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_PERSON.poiType
} else { //未知
v2xType = EventTypeEnumNew.TYPE_ERROR.poiType
}
val ttsContent = EventTypeEnumNew.getWarningTts(v2xType)
val alertContent =
EventTypeEnumNew.getWarningContent(v2xType)
@@ -959,12 +964,14 @@ class MogoPrivateObuNewManager private constructor() {
CallerHmiManager.disableWarningV2X(appId.toString())
isShowGreenWave = false
isShowRunRedLight = false
isYellowLight = false
}
}
}
private var isRedLight = false
private var isGreenLight = false
private var isYellowLight = false
private var isShowGreenWave = false
private var isShowRunRedLight = false
@@ -1030,15 +1037,20 @@ class MogoPrivateObuNewManager private constructor() {
if (!isShowGreenWave) {
isShowGreenWave = true
CallerHmiManager.disableWarningV2X(1666.toString())
CallerLogger.d(
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
"new changeTrafficLightStatus speed_min = ${currentLight.suggestMinSpeed} --speed_max = ${currentLight.suggestMaxSpeed} --TYPE_USECASE_ID_IVP_GREEN ---alertContent = $alertContent ---ttsContent = $ttsContent"
)
val adviceSpeed =
"${Math.round(currentLight.suggestMinSpeed*3.6)} - ${Math.round(currentLight.suggestMaxSpeed*3.6)}"
val adviceSpeedTts =
"${Math.round(currentLight.suggestMinSpeed*3.6)}${Math.round(currentLight.suggestMaxSpeed*3.6)}"
var minSpeedTemp = Math.round(currentLight.suggestMinSpeed*3.6)
var maxSpeedTemp = Math.round(currentLight.suggestMaxSpeed*3.6)
if (minSpeedTemp == maxSpeedTemp) {
minSpeedTemp -= 5
}
val adviceSpeed = "$minSpeedTemp - $maxSpeedTemp"
val adviceSpeedTts = "$minSpeedTemp$maxSpeedTemp"
// val adviceSpeed =
// "${Math.round(currentLight.suggestMinSpeed*3.6)} - ${Math.round(currentLight.suggestMaxSpeed*3.6)}"
// val adviceSpeedTts =
// "${Math.round(currentLight.suggestMinSpeed*3.6)} 到 ${Math.round(currentLight.suggestMaxSpeed*3.6)}"
ttsContent =
String.format(
@@ -1093,10 +1105,20 @@ class MogoPrivateObuNewManager private constructor() {
isRedLight = true
}
isGreenLight = false
isYellowLight = false
// CallerHmiManager.showWarningTrafficLight(1, 3)
CallerObuTrafficLightListenerManager.invokeObuTrafficLight(1)
val red = currentLight.countDown.toInt()
CallerHmiManager.changeCountdownRed(red)
Log.d("lixp", " ------- red --------- = $red ----isGreenLight = $isGreenLight")
if (red == 1) {
//延迟3秒 红 绿 黄
UiThreadHandler.postDelayed({
if (!isGreenLight) { //如果3s后没有变绿灯删除红绿灯显示
CallerHmiManager.disableWarningTrafficLight()
}
}, 3000)
}
}
// 绿灯
@@ -1106,14 +1128,26 @@ class MogoPrivateObuNewManager private constructor() {
isGreenLight = true
}
isRedLight = false
isYellowLight = false
// CallerHmiManager.showWarningTrafficLight(3, 3)
CallerObuTrafficLightListenerManager.invokeObuTrafficLight(3)
val green = currentLight.countDown.toInt()
CallerHmiManager.changeCountdownGreen(green)
if (green == 1) {
Log.d("lixp", " ------- green --------- = $green ----isYellowLight = $isYellowLight")
UiThreadHandler.postDelayed({
if (!isYellowLight) { //如果3s后没有变黄灯删除红绿灯显示
CallerHmiManager.disableWarningTrafficLight()
}
}, 3000)
}
}
// 黄灯
7, 8 -> {
if (!isYellowLight) {
isYellowLight = true
}
CallerHmiManager.disableWarningV2X(appId.toString())
// CallerHmiManager.showWarningTrafficLight(2, 3)
CallerObuTrafficLightListenerManager.invokeObuTrafficLight(2)