Merge branch 'dev_robotaxi-d-app-module_240_230131_2.14.0' into test_robotaxi-d-app-module_240_230131_2.14.0.1
This commit is contained in:
@@ -4,9 +4,7 @@ import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS
|
||||
import static com.mogo.och.bus.constant.BusConst.TIMER_START_AUTOPILOT_INTERVAL;
|
||||
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -21,12 +19,9 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.constraintlayout.widget.Group;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.mvp.IView;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener;
|
||||
@@ -39,24 +34,20 @@ import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager;
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.TrafficDataView;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.map.MogoMapUIController;
|
||||
import com.mogo.map.MogoMarkerManager;
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
import com.mogo.map.uicontroller.VisualAngleMode;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.eagle.core.utilcode.mogo.view.OnPreventFastClickListener;
|
||||
import com.mogo.och.bus.R;
|
||||
import com.mogo.och.bus.bean.BusRoutesResult;
|
||||
import com.mogo.och.bus.constant.BusConst;
|
||||
import com.mogo.och.bus.model.BusOrderModel;
|
||||
import com.mogo.och.bus.util.BDRouteDataTestUtils;
|
||||
import com.mogo.och.bus.view.SlidePanelView;
|
||||
import com.mogo.och.common.module.utils.SoundPoolHelper;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -143,14 +134,16 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
//切换地图的远近视图
|
||||
if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isLongSight()
|
||||
|| MogoMapUIController.getInstance().getCurrentMapVisualAngle().isRoma()) {
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(false);
|
||||
if(FunctionBuildConfig.isRomaMode){
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(false);
|
||||
}
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).setLockMode(true);
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mSwitchMapModeImage.setImageResource(R.drawable.bus_switch_map_medium);
|
||||
} else if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isMediumSight()) {
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(true);
|
||||
if (FunctionBuildConfig.isRomaMode) {
|
||||
MogoMapUIController.getInstance().setRomaMode(1);
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(true);
|
||||
MogoMapUIController.getInstance().setRomaMode(FunctionBuildConfig.romaModeStyle);
|
||||
} else {
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).setLockMode(false);
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
|
||||
@@ -130,14 +130,16 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
//视角切换
|
||||
if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isLongSight()
|
||||
|| MogoMapUIController.getInstance().getCurrentMapVisualAngle().isRoma()) {
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(false);
|
||||
if(FunctionBuildConfig.isRomaMode){
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(false);
|
||||
}
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).setLockMode(true);
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mMapswitchBtn.setImageResource(R.drawable.taxi_p_switch_map_medium);
|
||||
} else if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isMediumSight()) {
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(true);
|
||||
if (FunctionBuildConfig.isRomaMode) {
|
||||
MogoMapUIController.getInstance().setRomaMode(1);
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(true);
|
||||
MogoMapUIController.getInstance().setRomaMode(FunctionBuildConfig.romaModeStyle);
|
||||
} else {
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).setLockMode(false);
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
|
||||
@@ -180,14 +180,16 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
|
||||
try {
|
||||
if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isLongSight()
|
||||
|| MogoMapUIController.getInstance().getCurrentMapVisualAngle().isRoma()) {
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(false);
|
||||
if(FunctionBuildConfig.isRomaMode){
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(false);
|
||||
}
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).setLockMode(true);
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null);
|
||||
mSwitchBtnIcon.setImageResource(R.drawable.taxi_switch_map_medium);
|
||||
} else if (MogoMapUIController.getInstance().getCurrentMapVisualAngle().isMediumSight()) {
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(true);
|
||||
if (FunctionBuildConfig.isRomaMode) {
|
||||
MogoMapUIController.getInstance().setRomaMode(1);
|
||||
CallerVisualAngleManager.INSTANCE.updateLongSightLevel(true);
|
||||
MogoMapUIController.getInstance().setRomaMode(FunctionBuildConfig.romaModeStyle);
|
||||
} else {
|
||||
Objects.requireNonNull(CallerMapUIServiceManager.INSTANCE.getMapUIController()).setLockMode(false);
|
||||
MogoMapUIController.getInstance().changeMapVisualAngle(VisualAngleMode.MODE_LONG_SIGHT, null);
|
||||
|
||||
@@ -94,7 +94,7 @@ public class BindingcarProvider implements IMoGoBindingcarProvider {
|
||||
|
||||
@Override
|
||||
public void modifyCarInfo(BindingcarCallBack callBack) {
|
||||
BindingcarNetWorkManager.getInstance().modifyBindingcar(mAddress, mWidevineIDWithMd5, callBack, getScreenType());
|
||||
BindingcarNetWorkManager.getInstance().modifyBindingcar(mContext, mAddress, mWidevineIDWithMd5, callBack, getScreenType());
|
||||
}
|
||||
|
||||
private void driverScreen(String macAddress, String widevineIDWithMd5) {
|
||||
|
||||
@@ -80,7 +80,9 @@ public class BindingcarNetWorkManager {
|
||||
if (info != null && info.getData() != null) {
|
||||
CallerLogger.INSTANCE.d(M_BINDING + TAG, "getBindingcarInfo onNext info.getData() =" + info.getData().toString());
|
||||
//根据车辆类型切换不同的车辆模型,只针对红旗做处理
|
||||
updateCarVrIconRes(info.getData().getBrandId());
|
||||
if (!SharedPrefsMgr.getInstance(context).getString(SharedPrefsConstants.MAC_ADDRESS).equals(macAddress)) {
|
||||
updateCarVrIconRes(info.getData().getBrandId());
|
||||
}
|
||||
switch (info.getData().getCompare()) {
|
||||
case "0":
|
||||
CallerHmiManager.INSTANCE.showBindingcarDialog();
|
||||
@@ -93,6 +95,7 @@ public class BindingcarNetWorkManager {
|
||||
break;
|
||||
}
|
||||
SharedPrefsMgr.getInstance(context).putString(SharedPrefsConstants.CAR_INFO, GsonUtils.toJson(info.getData()));
|
||||
SharedPrefsMgr.getInstance(context).putString(SharedPrefsConstants.MAC_ADDRESS, macAddress);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +115,7 @@ public class BindingcarNetWorkManager {
|
||||
* 绑定和修改绑定车辆
|
||||
* mac: 48:b0:2d:3a:9c:19
|
||||
*/
|
||||
public void modifyBindingcar(String macAddress, String widevineIDWithMd5, BindingcarCallBack callBack, int screenType) {
|
||||
public void modifyBindingcar(Context context, String macAddress, String widevineIDWithMd5, BindingcarCallBack callBack, int screenType) {
|
||||
// String macAddress1 = "48:b0:2d:4d:33:40";
|
||||
// String sn = "X2020220417KA94QIN";
|
||||
BindingcarRequest request = new BindingcarRequest(macAddress, widevineIDWithMd5, screenType);
|
||||
@@ -130,7 +133,10 @@ public class BindingcarNetWorkManager {
|
||||
if (info != null) {
|
||||
callBack.callBackResult(info);
|
||||
CallerLogger.INSTANCE.d(M_BINDING + TAG, "modifyBindingcar onNext code = " + info.code + "---msg = " + info.msg + "--info.toString() = " + info.toString());
|
||||
updateCarVrIconRes(info.getData().getBrandId());
|
||||
if (!SharedPrefsMgr.getInstance(context).getString(SharedPrefsConstants.MAC_ADDRESS).equals(macAddress)) {
|
||||
updateCarVrIconRes(info.getData().getBrandId());
|
||||
}
|
||||
SharedPrefsMgr.getInstance(context).putString(SharedPrefsConstants.MAC_ADDRESS, macAddress);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.graphics.Color
|
||||
import android.graphics.drawable.ColorDrawable
|
||||
import android.os.Handler
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
@@ -73,6 +74,8 @@ internal class BadCaseManagerView @JvmOverloads constructor(
|
||||
tvSelectAll.setOnClickListener {
|
||||
if(bagManagerEntity.bagsInfoResp.size>0){
|
||||
selectedBagSize = 0
|
||||
selectedBagNum = 0
|
||||
bagManagerList.clear()
|
||||
for(selectBagInfo in bagManagerEntity.bagsInfoResp){
|
||||
if(selectBagInfo.itemType == 0){
|
||||
selectBagInfo.selectStatus = true
|
||||
@@ -213,79 +216,6 @@ internal class BadCaseManagerView @JvmOverloads constructor(
|
||||
// DownloadManager.getInstance().download("CarPad/mogopadlog/X20202111230C01YYW/2023-01-30/Audio_1675049657187_BadCase.wav",
|
||||
// "/mnt/sdcard/mogo/","test13.wav")
|
||||
|
||||
// val descriptionEntityOne = BagDescriptionEntity("包信息描述1",false,
|
||||
// "CarPad/mogopadlog/X20202111230C01YYW/2023-01-30/Audio_1675049657187_BadCase.wav",false)
|
||||
// val bagInfoEntityOne = BagInfoEntity()
|
||||
// bagInfoEntityOne.key = 12341
|
||||
// bagInfoEntityOne.totalSize = 1*1024*1024*1000
|
||||
// bagInfoEntityOne.timestamp = "20230208125414"
|
||||
// bagInfoEntityOne.bagPath = ""
|
||||
// bagInfoEntityOne.mergeStat = false
|
||||
// bagInfoEntityOne.uploadStat = false
|
||||
// bagInfoEntityOne.description = descriptionEntityOne
|
||||
//
|
||||
// val descriptionEntityTwo = BagDescriptionEntity("包信息描述2",true,
|
||||
// "CarPad/mogopadlog/X20202111230C01YYW/2023-01-30/Audio_1675049657187_BadCase.wav",true)
|
||||
// val bagInfoEntityTwo = BagInfoEntity()
|
||||
// bagInfoEntityTwo.key = 12342
|
||||
// bagInfoEntityTwo.totalSize = 2*1024*1024*1000
|
||||
// bagInfoEntityTwo.timestamp = "20230208125414"
|
||||
// bagInfoEntityTwo.bagPath = ""
|
||||
// bagInfoEntityTwo.mergeStat = false
|
||||
// bagInfoEntityTwo.uploadStat = false
|
||||
// bagInfoEntityTwo.description = descriptionEntityTwo
|
||||
//
|
||||
// val descriptionEntityThree = BagDescriptionEntity("包信息描述3",true,
|
||||
// "CarPad/mogopadlog/X20202111230C01YYW/2023-01-30/Audio_1675049657187_BadCase.wav",true)
|
||||
// val bagInfoEntityThree = BagInfoEntity()
|
||||
// bagInfoEntityThree.key = 12343
|
||||
// bagInfoEntityThree.totalSize = 1*1027*1000
|
||||
// bagInfoEntityThree.timestamp = "20230208125414"
|
||||
// bagInfoEntityThree.bagPath = ""
|
||||
// bagInfoEntityThree.mergeStat = false
|
||||
// bagInfoEntityThree.uploadStat = false
|
||||
// bagInfoEntityThree.description = descriptionEntityThree
|
||||
//
|
||||
// val descriptionEntityFour = BagDescriptionEntity("包信息描述4",true,
|
||||
// "CarPad/mogopadlog/X20202111230C01YYW/2023-01-30/Audio_1675049657187_BadCase.wav",true)
|
||||
// val bagInfoEntityFour = BagInfoEntity()
|
||||
// bagInfoEntityFour.key = 12344
|
||||
// bagInfoEntityFour.totalSize = 10*1024*1024*1000L
|
||||
// bagInfoEntityFour.timestamp = "20230208125414"
|
||||
// bagInfoEntityFour.bagPath = ""
|
||||
// bagInfoEntityFour.mergeStat = false
|
||||
// bagInfoEntityFour.uploadStat = false
|
||||
// bagInfoEntityFour.description = descriptionEntityFour
|
||||
//
|
||||
// val list: MutableList<BagInfoEntity> = ArrayList()
|
||||
// list.add(bagInfoEntityOne)
|
||||
// list.add(bagInfoEntityTwo)
|
||||
// list.add(bagInfoEntityThree)
|
||||
// list.add(bagInfoEntityFour)
|
||||
// for(entity in list){
|
||||
// entity.timestamp?.let {
|
||||
// val month = it.substring(4,6)
|
||||
// val day = it.substring(6,8)
|
||||
// val time = "${month}月${day}日"
|
||||
// var containTime = false
|
||||
// for(bag in bagManagerEntity.bagsInfoResp){
|
||||
// if(bag.timeStr == time){
|
||||
// containTime = true
|
||||
// }
|
||||
// }
|
||||
// if(!containTime || bagManagerEntity.bagsInfoResp.size ==0){
|
||||
// //增加时间的
|
||||
// val bagInfoEntity = BagInfoEntity()
|
||||
// bagInfoEntity.itemType = 1
|
||||
// bagInfoEntity.timeStr = time
|
||||
// bagManagerEntity.bagsInfoResp.add(bagInfoEntity)
|
||||
// }
|
||||
// bagManagerEntity.bagsInfoResp.add(entity)
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// bagManagerListAdapter?.setData(bagManagerEntity.bagsInfoResp)
|
||||
|
||||
}
|
||||
|
||||
fun setOnClickListener(clickListener: ClickListener) {
|
||||
@@ -299,10 +229,31 @@ internal class BadCaseManagerView @JvmOverloads constructor(
|
||||
override fun onBagManagerResult(bagManager: BagManagerOuterClass.BagManager) {
|
||||
super.onBagManagerResult(bagManager)
|
||||
UiThreadHandler.post {
|
||||
Log.i(TAG,"onBagManagerResult Start")
|
||||
Log.i(TAG,"keyReq="+bagManager.keyReq)
|
||||
Log.i(TAG,"reqType="+bagManager.reqType)
|
||||
Log.i(TAG,"descReq description="+bagManager.descReq.description
|
||||
+" audioUrl="+bagManager.descReq.audioUrl
|
||||
+" reportBI="+bagManager.descReq.reportBI
|
||||
+" hasAudio="+bagManager.descReq.hasAudio)
|
||||
for(logBag in bagManager.bagsInfoRespList){
|
||||
Log.i(TAG,"bagPath="+logBag.bagPath)
|
||||
Log.i(TAG,"timestamp="+logBag.timestamp)
|
||||
Log.i(TAG,"description="+logBag.description)
|
||||
Log.i(TAG,"key="+logBag.key)
|
||||
Log.i(TAG,"mergeStat="+logBag.mergeStat)
|
||||
Log.i(TAG,"totalSize="+logBag.totalSize)
|
||||
Log.i(TAG,"uploadStat="+logBag.uploadStat)
|
||||
}
|
||||
Log.i(TAG,"onBagManagerResult End")
|
||||
|
||||
//获取空间使用信息
|
||||
if(bagManager.reqType == 1){
|
||||
//遍历各个主机的硬盘空间信息
|
||||
if(bagManager.spaceInfoRespCount>0){
|
||||
spaceTotal = 0
|
||||
spaceUsed = 0
|
||||
spaceFree = 0
|
||||
for(spaceInfo in bagManager.spaceInfoRespList){
|
||||
spaceInfo.diskSpaceInfo?.let {
|
||||
spaceTotal += it.total
|
||||
@@ -388,6 +339,12 @@ internal class BadCaseManagerView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
}
|
||||
//上传Cos执行完成
|
||||
if(bagManagerList.size == 0 && selectedBagNum != 0){
|
||||
ToastUtils.showShort("上传命令完成")
|
||||
bagUploadDialog?.uploadCompleted()
|
||||
tvCancelSelect.performClick()
|
||||
}
|
||||
}
|
||||
//删除Bag
|
||||
else if(bagManager.reqType == 4){
|
||||
|
||||
@@ -109,6 +109,10 @@ public class BagUploadDialog extends Dialog {
|
||||
viewUploadProgress.setProgress((totalNum-remainNum)*100/totalNum);
|
||||
}
|
||||
|
||||
public void uploadCompleted(){
|
||||
dismiss();
|
||||
}
|
||||
|
||||
interface BagUploadListener{
|
||||
//取消上传
|
||||
void cancelUpload();
|
||||
|
||||
@@ -60,31 +60,36 @@ class BagManagerListAdapter: RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
||||
bagClickListener?.onClick(bagInfoEntity,isChecked)
|
||||
}
|
||||
|
||||
holder.etBagNameEdit.addTextChangedListener(object:TextWatcher{
|
||||
val textWatcher: TextWatcher = object : TextWatcher {
|
||||
override fun beforeTextChanged(
|
||||
s: CharSequence?,
|
||||
start: Int,
|
||||
count: Int,
|
||||
after: Int
|
||||
charSequence: CharSequence,
|
||||
i: Int,
|
||||
i1: Int,
|
||||
i2: Int
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun afterTextChanged(s: Editable?) {
|
||||
override fun onTextChanged(charSequence: CharSequence, i: Int, i1: Int, i2: Int) {}
|
||||
override fun afterTextChanged(editable: Editable) {
|
||||
bagInfoEntity.description?.let { desc->
|
||||
val descriptionStr = s.toString()
|
||||
val descriptionStr = editable.toString()
|
||||
if(desc.description != descriptionStr){
|
||||
desc.description = descriptionStr
|
||||
bagClickListener?.editDescription(bagInfoEntity.key,desc)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
holder.etBagNameEdit.onFocusChangeListener =
|
||||
View.OnFocusChangeListener { p0, hasFocus ->
|
||||
val edit = p0 as EditText
|
||||
if(hasFocus){
|
||||
edit.addTextChangedListener(textWatcher)
|
||||
}else{
|
||||
edit.removeTextChangedListener(textWatcher)
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
bagInfoEntity.description?.let { des->
|
||||
if(des.reportBI){
|
||||
|
||||
@@ -86,9 +86,13 @@ class DriverMsgBoxBubbleView @JvmOverloads constructor(
|
||||
if(isShowData){
|
||||
CallerMsgBoxEventListenerManager.invokeUpdateTipListener(true)
|
||||
if(category == MsgCategory.RECORD_BAG){
|
||||
//弹出被动录包弹窗
|
||||
CallerDevaToolsManager.onReceiveBadCaseRecord(msgBoxBean,context as Activity,true)
|
||||
}else{
|
||||
if(!FunctionBuildConfig.isDemoMode){
|
||||
//弹出被动录包弹窗
|
||||
CallerDevaToolsManager.onReceiveBadCaseRecord(msgBoxBean,context as Activity,true)
|
||||
}
|
||||
} else if(category == MsgCategory.SYS_INFO){
|
||||
//todo 过滤MAP系统异常报警
|
||||
} else{
|
||||
clMsgBubbleLayout.visibility = View.VISIBLE
|
||||
dataList.add(msgBoxBean)
|
||||
driverMsgBoxBubbleAdapter?.setData(dataList)
|
||||
|
||||
@@ -235,7 +235,10 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
CallerAutopilotVehicleStateListenerManager.removeListener(TAG)
|
||||
|
||||
// 移除 业务配置监听
|
||||
CallerDevaToolsFuncConfigListenerManager.unRegisterDevaToolsFuncConfigListener( FuncBizConfig.FOUNDATION, TAG)
|
||||
CallerDevaToolsFuncConfigListenerManager.unRegisterDevaToolsFuncConfigListener(
|
||||
FuncBizConfig.FOUNDATION,
|
||||
TAG
|
||||
)
|
||||
|
||||
if (logInfoView != null) {
|
||||
logInfoView!!.onEnterBackground()
|
||||
@@ -577,7 +580,7 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
btnDrawFusion.isChecked = FunctionBuildConfig.isFusionColor
|
||||
btnDrawFusion.setOnCheckedChangeListener{_, isChecked ->
|
||||
btnDrawFusion.setOnCheckedChangeListener { _, isChecked ->
|
||||
FunctionBuildConfig.isFusionColor = isChecked
|
||||
}
|
||||
|
||||
@@ -587,7 +590,11 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
// 演示模式
|
||||
tbIsDemoMode.setOnCheckedChangeListener { _, _ ->
|
||||
FunctionBuildConfig.isDemoMode = !FunctionBuildConfig.isDemoMode
|
||||
CallerHmiManager.updateStatusBarLeftView(FunctionBuildConfig.isDemoMode, "demoMode", DemoModeView(context))
|
||||
CallerHmiManager.updateStatusBarLeftView(
|
||||
FunctionBuildConfig.isDemoMode,
|
||||
"demoMode",
|
||||
DemoModeView(context)
|
||||
)
|
||||
CallerAutoPilotManager.setDemoMode(FunctionBuildConfig.isDemoMode)
|
||||
if (!FunctionBuildConfig.isDemoMode) {
|
||||
//关闭美化模式时,通知工控机
|
||||
@@ -645,7 +652,7 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
tbDrawRomaMode.isChecked = FunctionBuildConfig.isRomaMode
|
||||
//云端感知绘制
|
||||
//漫游模式开启控制
|
||||
tbDrawRomaMode.setOnCheckedChangeListener { _, isChecked ->
|
||||
FunctionBuildConfig.isRomaMode = isChecked
|
||||
if (!FunctionBuildConfig.isRomaMode) {
|
||||
@@ -653,6 +660,19 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
tbRomaModeStyle.isChecked = FunctionBuildConfig.romaModeStyle == 1
|
||||
//漫游模式选择
|
||||
tbRomaModeStyle.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (isChecked) {
|
||||
FunctionBuildConfig.romaModeStyle = 1
|
||||
} else {
|
||||
FunctionBuildConfig.romaModeStyle = 0
|
||||
}
|
||||
if (FunctionBuildConfig.romaModeStyle != 1) {
|
||||
tbRomaModeStyle.isChecked = false
|
||||
}
|
||||
}
|
||||
|
||||
//重启工控机所有节点
|
||||
btnIpcReboot.onClick {
|
||||
CallerAutoPilotManager.sendIpcReboot()
|
||||
@@ -1865,9 +1885,9 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
mTrajectoryInfoSize = 0
|
||||
mRouteInfoSize = 0
|
||||
|
||||
if(FunctionBuildConfig.isDemoMode){
|
||||
if (FunctionBuildConfig.isDemoMode) {
|
||||
tbIsDemoMode.text = "关闭美化模式"
|
||||
}else{
|
||||
} else {
|
||||
tbIsDemoMode.text = "开启美化模式"
|
||||
}
|
||||
|
||||
@@ -1956,7 +1976,7 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
when (type) {
|
||||
BIZ_BEAUTY_MODE -> {
|
||||
tbIsDemoMode.isClickable = !lock
|
||||
val (left,top,right,bottom) = tbIsDemoMode.currentPadding()
|
||||
val (left, top, right, bottom) = tbIsDemoMode.currentPadding()
|
||||
if (lock) {
|
||||
tbIsDemoMode.background =
|
||||
resources.getDrawable(R.drawable.radio_button_lock_background)
|
||||
@@ -1964,11 +1984,11 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
tbIsDemoMode.background =
|
||||
resources.getDrawable(R.drawable.radio_button_normal_background_right)
|
||||
}
|
||||
tbIsDemoMode.setPadding(left,top,right,bottom)
|
||||
tbIsDemoMode.setPadding(left, top, right, bottom)
|
||||
}
|
||||
BIZ_RAIN_MODE -> {
|
||||
tbIsRainMode.isClickable = !lock
|
||||
val (left,top,right,bottom) = tbIsRainMode.currentPadding()
|
||||
val (left, top, right, bottom) = tbIsRainMode.currentPadding()
|
||||
if (lock) {
|
||||
tbIsRainMode.background =
|
||||
resources.getDrawable(R.drawable.radio_button_lock_background)
|
||||
@@ -1976,21 +1996,21 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
tbIsRainMode.background =
|
||||
resources.getDrawable(R.drawable.radio_button_normal_background_right)
|
||||
}
|
||||
tbIsRainMode.setPadding(left,top,right,bottom)
|
||||
tbIsRainMode.setPadding(left, top, right, bottom)
|
||||
}
|
||||
BIZ_WARNING_UPLOAD -> {
|
||||
tbReportWarning.isClickable = !lock
|
||||
val (left,top,right,bottom) = tbReportWarning.currentPadding()
|
||||
val (left, top, right, bottom) = tbReportWarning.currentPadding()
|
||||
if (lock) {
|
||||
tbReportWarning.background =
|
||||
resources.getDrawable(R.drawable.radio_button_lock_background)
|
||||
} else {
|
||||
tbReportWarning.background = null
|
||||
}
|
||||
tbReportWarning.setPadding(left,top,right,bottom)
|
||||
tbReportWarning.setPadding(left, top, right, bottom)
|
||||
}
|
||||
BIZ_BAG_RECORD -> {
|
||||
val (left,top,right,bottom) = btnRecordBag.currentPadding()
|
||||
val (left, top, right, bottom) = btnRecordBag.currentPadding()
|
||||
if (lock) {
|
||||
btnRecordBag.isClickable = false
|
||||
btnRecordBag.background =
|
||||
@@ -2000,10 +2020,10 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
btnRecordBag.requestFocus()
|
||||
btnRecordBag.background = null
|
||||
}
|
||||
btnRecordBag.setPadding(left,top,right,bottom)
|
||||
btnRecordBag.setPadding(left, top, right, bottom)
|
||||
}
|
||||
BIZ_FULL_LOG -> {
|
||||
val (left,top,right,bottom) = tbLogCatch.currentPadding()
|
||||
val (left, top, right, bottom) = tbLogCatch.currentPadding()
|
||||
if (lock) {
|
||||
tbLogCatch.isClickable = false
|
||||
tbLogCatch.background =
|
||||
@@ -2013,7 +2033,7 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
tbLogCatch.requestFocus()
|
||||
tbLogCatch.background = null
|
||||
}
|
||||
tbLogCatch.setPadding(left,top,right,bottom)
|
||||
tbLogCatch.setPadding(left, top, right, bottom)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,11 +188,12 @@ class SOPSettingView @JvmOverloads constructor(
|
||||
tbObu.isChecked = CallerOBUManager.isConnected()
|
||||
tbObu.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (!isChecked) {
|
||||
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
|
||||
CallerOBUManager.resetObuIpAddress("192.168.1.199")
|
||||
} else if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
CallerOBUManager.resetObuIpAddress("192.168.8.199")
|
||||
}
|
||||
CallerOBUManager.resetObuIpAddress("192.168.1.199")
|
||||
// if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
|
||||
// CallerOBUManager.resetObuIpAddress("192.168.1.199")
|
||||
// } else if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
// CallerOBUManager.resetObuIpAddress("192.168.8.199")
|
||||
// }
|
||||
} else {
|
||||
//断开链接
|
||||
CallerOBUManager.disConnectObu()
|
||||
|
||||
@@ -10,10 +10,8 @@ import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Process;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
@@ -25,7 +23,6 @@ import com.mogo.eagle.core.function.api.base.IMoGoFunctionProvider;
|
||||
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener;
|
||||
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.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager;
|
||||
import com.mogo.eagle.core.function.hmi.R;
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
|
||||
@@ -76,6 +73,11 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
private long pressEDownTime = 0;
|
||||
private long pressEUpTime = 0;
|
||||
|
||||
private int clickTime = 300; //单击
|
||||
private int clickTimeInterval = 330;
|
||||
private int longPressTime = 670;
|
||||
private int longPressTimeInterval = 700;
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
@@ -219,7 +221,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
pressADownTime = System.currentTimeMillis();
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent A down pressADownTime = " + pressADownTime + "---" + (pressADownTime - startPressTime) + "----isCombinationKey = " + isCombinationKey + "--pressBDownTime = " + pressBDownTime);
|
||||
if ((pressADownTime - startPressTime) > 360 && (pressADownTime - startPressTime) < 1300 && pressBDownTime > 0) {
|
||||
if ((pressADownTime - startPressTime) > clickTimeInterval && (pressADownTime - startPressTime) < longPressTime && pressBDownTime > 0) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 A 按AB组合 +1 ");
|
||||
}
|
||||
@@ -228,7 +230,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
}
|
||||
|
||||
if (isCombinationKey != 3 && isCombinationKey != 1) {
|
||||
if ((pressADownTime - startPressTime) > 1320) {
|
||||
if ((pressADownTime - startPressTime) > longPressTimeInterval) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 长按A -2 ");
|
||||
}
|
||||
@@ -239,7 +241,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
} else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
pressAUpTime = System.currentTimeMillis();
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent A up pressAUpTime = " + pressAUpTime + "---" + (pressAUpTime - startPressTime) + "--pressBDownTime = " + pressBDownTime);
|
||||
if ((pressAUpTime - startPressTime) < 350 && isCombinationKey != 3) {
|
||||
if ((pressAUpTime - startPressTime) < clickTime && isCombinationKey != 3) {
|
||||
isCombinationKey = 1;
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 单击A -1 ");
|
||||
@@ -260,7 +262,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
pressBDownTime = System.currentTimeMillis();
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent B down pressBDownTime = " + pressBDownTime + "--差-" + (pressBDownTime - startPressTime) + "---isCombinationKey = " + isCombinationKey + "--pressADownTime = " + pressADownTime);
|
||||
if ((pressBDownTime - startPressTime) > 360 && (pressBDownTime - startPressTime) < 1300 && pressADownTime > 0) {
|
||||
if ((pressBDownTime - startPressTime) > clickTimeInterval && (pressBDownTime - startPressTime) < longPressTime && pressADownTime > 0) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 B 按AB组合 +1 ");
|
||||
}
|
||||
@@ -268,7 +270,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
isCombinationKey = 3;
|
||||
}
|
||||
if (isCombinationKey != 3 && isCombinationKey != 1) {
|
||||
if ((pressBDownTime - startPressTime) > 1320) {
|
||||
if ((pressBDownTime - startPressTime) > longPressTimeInterval) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 长按B 无操作 ");
|
||||
}
|
||||
@@ -278,7 +280,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
} else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
pressBUpTime = System.currentTimeMillis();
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent B up pressBUpTime = " + pressBUpTime + "--差-" + (pressBUpTime - startPressTime) + "--pressADownTime = " + pressADownTime);
|
||||
if ((pressBUpTime - startPressTime) < 350 && isCombinationKey != 3) {
|
||||
if ((pressBUpTime - startPressTime) < clickTime && isCombinationKey != 3) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 单击B 0 ");
|
||||
}
|
||||
@@ -300,7 +302,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
pressCDownTime = System.currentTimeMillis();
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按C 无操作 time dif = " + (pressCDownTime - startPressTime));
|
||||
if ((pressCDownTime - startPressTime) > 1320) {
|
||||
if ((pressCDownTime - startPressTime) > longPressTimeInterval) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 长按C 无操作 ");
|
||||
}
|
||||
@@ -309,7 +311,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
pressCUpTime = System.currentTimeMillis();
|
||||
isPressEnd = false;
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 单击C ← 向左变道 time dif = " + (pressCUpTime - startPressTime));
|
||||
if ((pressCUpTime - startPressTime) < 350) {
|
||||
if ((pressCUpTime - startPressTime) < clickTime) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 单击C ← 向左变道 ");
|
||||
}
|
||||
@@ -321,7 +323,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
pressDDownTime = System.currentTimeMillis();
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按D 无操作 time dif = " + (pressDDownTime - startPressTime));
|
||||
if ((pressDDownTime - startPressTime) > 1320) {
|
||||
if ((pressDDownTime - startPressTime) > longPressTimeInterval) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 长按D 无操作 ");
|
||||
}
|
||||
@@ -330,7 +332,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
pressDUpTime = System.currentTimeMillis();
|
||||
isPressEnd = false;
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 单击D → 向右变道 time dif = " + (pressDUpTime - startPressTime));
|
||||
if ((pressDUpTime - startPressTime) < 350) {
|
||||
if ((pressDUpTime - startPressTime) < clickTime) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 单击D → 向右变道 ");
|
||||
}
|
||||
@@ -342,7 +344,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
pressEDownTime = System.currentTimeMillis();
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按E 鸣笛 time dif = " + (pressEDownTime - startPressTime));
|
||||
if ((pressEDownTime - startPressTime) > 1320) {
|
||||
if ((pressEDownTime - startPressTime) > longPressTimeInterval) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 长按E 鸣笛 ");
|
||||
}
|
||||
@@ -362,7 +364,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
pressEUpTime = System.currentTimeMillis();
|
||||
isPressEnd = false;
|
||||
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "方块 单击E 开启自动驾驶 time dif = " + (pressEUpTime - startPressTime));
|
||||
if ((pressEUpTime - startPressTime) < 350) {
|
||||
if ((pressEUpTime - startPressTime) < clickTime) {
|
||||
if (isShowToast) {
|
||||
ToastUtils.showShort("方块 单击E 开启自动驾驶 ");
|
||||
}
|
||||
|
||||
@@ -278,6 +278,18 @@
|
||||
android:textOn="关闭漫游模式"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbRomaModeStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:background="@drawable/radio_button_normal_background_right"
|
||||
android:textColor="#000"
|
||||
android:textOff="开启循迹漫游"
|
||||
android:textOn="开启自由漫游"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbMojie"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -21,8 +21,7 @@ class MoGoObuProvider : IMoGoObuProvider {
|
||||
private val TAG = "MoGoObuProvider"
|
||||
|
||||
private var mContext: Context? = null
|
||||
private val busObuIp = "192.168.8.199"
|
||||
private val taxiObuIp = "192.168.1.199"
|
||||
private val taxiObuIp = "192.168.1.199" //taxi和bus网段统一
|
||||
|
||||
override val functionName: String
|
||||
get() = TAG
|
||||
@@ -44,32 +43,14 @@ class MoGoObuProvider : IMoGoObuProvider {
|
||||
} else {
|
||||
mContext = context
|
||||
mContext?.let {
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) { //bus 司机端
|
||||
val ipAddress =
|
||||
SharedPrefsMgr.getInstance(context).getString(MoGoConfig.OBU_IP, busObuIp)
|
||||
|
||||
//mogo obu
|
||||
MogoPrivateObuNewManager.INSTANCE.connectObu(
|
||||
it,
|
||||
ipAddress,
|
||||
CommonUtils.getIpAddressString()
|
||||
)
|
||||
|
||||
//old obu
|
||||
MogoPrivateObuManager.INSTANCE.init(context, ipAddress)
|
||||
} else if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) { //taxi 司机端和乘客端
|
||||
val ipAddress =
|
||||
SharedPrefsMgr.getInstance(context).getString(MoGoConfig.OBU_IP, taxiObuIp)
|
||||
//mogo obu
|
||||
MogoPrivateObuNewManager.INSTANCE.connectObu(
|
||||
it,
|
||||
ipAddress,
|
||||
CommonUtils.getIpAddressString()
|
||||
)
|
||||
|
||||
//old obu
|
||||
MogoPrivateObuManager.INSTANCE.init(context, ipAddress)
|
||||
}
|
||||
val ipAddress =
|
||||
SharedPrefsMgr.getInstance(context).getString(MoGoConfig.OBU_IP, taxiObuIp)
|
||||
//mogo obu
|
||||
MogoPrivateObuNewManager.INSTANCE.connectObu(
|
||||
it,
|
||||
ipAddress,
|
||||
CommonUtils.getIpAddressString()
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.Defa
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.TooClose
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuTrafficLightDisappearManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallObuLimitingSpeedListenerManager
|
||||
import com.mogo.eagle.core.function.obu.mogo.utils.TrafficDataConvertUtilsNew
|
||||
@@ -106,13 +107,6 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
mObuStatusInfo.obuStatus = true
|
||||
CallerObuListenerManager.invokeListener(mObuStatusInfo)
|
||||
mContext?.let { SharedPrefsMgr.getInstance(it).putBoolean("OBU", true) }
|
||||
|
||||
//断开老obu
|
||||
try {
|
||||
com.zhidao.support.obu.MogoObuManager.getInstance().disConnect()
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -765,30 +759,35 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
// 这里排除需要特殊定制的语音及文案外,其余的都可以使用 EventTypeEnumNew 提供的
|
||||
var alertContent: String = ""
|
||||
var ttsContent: String = ""
|
||||
var saveAppId: String = ""
|
||||
var changeVisualAngle = false
|
||||
when (appId) {
|
||||
//交叉路口碰撞预警
|
||||
//前向碰撞预警
|
||||
MogoObuConstants.V2X_WARNING_TYPE.FCW.toString() -> {
|
||||
alertContent = EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_FCW.poiType)
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ID_FCW.poiType)
|
||||
saveAppId = EventTypeEnumNew.TYPE_USECASE_ID_FCW.poiType
|
||||
}
|
||||
|
||||
//交叉路口碰撞预警
|
||||
MogoObuConstants.V2X_WARNING_TYPE.ICW.toString() -> {
|
||||
alertContent = EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_ICW.poiType)
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ID_ICW.poiType)
|
||||
saveAppId = EventTypeEnumNew.TYPE_USECASE_ID_ICW.poiType
|
||||
}
|
||||
|
||||
//左转辅助预警
|
||||
MogoObuConstants.V2X_WARNING_TYPE.LTA.toString() -> {
|
||||
alertContent = EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_LTA.poiType)
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ID_LTA.poiType)
|
||||
saveAppId = EventTypeEnumNew.TYPE_USECASE_ID_LTA.poiType
|
||||
}
|
||||
|
||||
//盲区预警
|
||||
MogoObuConstants.V2X_WARNING_TYPE.BSW.toString() -> {
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ID_BSW.poiType)
|
||||
alertContent = EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_BSW.poiType)
|
||||
saveAppId = EventTypeEnumNew.TYPE_USECASE_ID_BSW.poiType
|
||||
if (
|
||||
direction == WarningDirectionEnum.ALERT_WARNING_LEFT ||
|
||||
direction == WarningDirectionEnum.ALERT_WARNING_TOP_LEFT ||
|
||||
@@ -812,6 +811,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
MogoObuConstants.V2X_WARNING_TYPE.LCW.toString() -> {
|
||||
alertContent = EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_LCW.poiType)
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ID_LCW.poiType)
|
||||
saveAppId = EventTypeEnumNew.TYPE_USECASE_ID_LCW.poiType
|
||||
if (
|
||||
direction == WarningDirectionEnum.ALERT_WARNING_LEFT ||
|
||||
direction == WarningDirectionEnum.ALERT_WARNING_TOP_LEFT ||
|
||||
@@ -833,12 +833,14 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
MogoObuConstants.V2X_WARNING_TYPE.DNPW.toString() -> {
|
||||
alertContent = EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_DNPW.poiType)
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ID_DNPW.poiType)
|
||||
saveAppId = EventTypeEnumNew.TYPE_USECASE_ID_DNPW.poiType
|
||||
}
|
||||
|
||||
//紧急制动预警
|
||||
MogoObuConstants.V2X_WARNING_TYPE.EBW.toString() -> {
|
||||
alertContent = EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_EBW.poiType)
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ID_EBW.poiType)
|
||||
saveAppId = EventTypeEnumNew.TYPE_USECASE_ID_EBW.poiType
|
||||
}
|
||||
|
||||
//异常车辆提醒
|
||||
@@ -847,6 +849,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ID_AVW.poiType)
|
||||
alertContent = String.format(alertContent, direction.desc)
|
||||
ttsContent = String.format(ttsContent, direction.desc)
|
||||
saveAppId = EventTypeEnumNew.TYPE_USECASE_ID_AVW.poiType
|
||||
}
|
||||
|
||||
//车辆失控预警
|
||||
@@ -855,11 +858,13 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ID_CLW.poiType)
|
||||
alertContent = String.format(alertContent, direction.desc)
|
||||
ttsContent = String.format(ttsContent, direction.desc)
|
||||
saveAppId = EventTypeEnumNew.TYPE_USECASE_ID_CLW.poiType
|
||||
}
|
||||
//车辆失控预警
|
||||
MogoObuConstants.V2X_WARNING_TYPE.EVW.toString() -> {
|
||||
alertContent = EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_EVW.poiType)
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ID_EVW.poiType)
|
||||
saveAppId = EventTypeEnumNew.TYPE_USECASE_ID_EVW.poiType
|
||||
}
|
||||
|
||||
// 这里处理固定的提示信息,包括了<紧急车辆提醒>
|
||||
@@ -875,7 +880,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
MogoObuConstants.STATUS.UPDATE -> {
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
|
||||
"new handleSdkObu appId2 = $appId --- level = $level ---ttsContent = $ttsContent --- alertContent = $alertContent --- direction = $direction"
|
||||
"new handleSdkObu appId2 = $saveAppId --- level = $level ---ttsContent = $ttsContent --- alertContent = $alertContent --- direction = $direction"
|
||||
)
|
||||
if (level == 2 || level == 3) {
|
||||
//不显示弹框,其它保留
|
||||
@@ -883,7 +888,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
MsgBoxBean(
|
||||
MsgBoxType.V2X,
|
||||
V2XMsg(
|
||||
appId,
|
||||
saveAppId,
|
||||
alertContent,
|
||||
ttsContent
|
||||
)
|
||||
@@ -892,10 +897,10 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
}
|
||||
)
|
||||
CallerHmiManager.warningV2X(
|
||||
appId,
|
||||
saveAppId,
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
(appId + direction.direction),//使用当前事件类型+方向记录tag,当发生变化的时候关闭当前弹出新的
|
||||
(saveAppId + direction.direction),//使用当前事件类型+方向记录tag,当发生变化的时候关闭当前弹出新的
|
||||
object : IMoGoWarningStatusListener {
|
||||
override fun onShow() {
|
||||
super.onShow()
|
||||
@@ -965,9 +970,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
isShowGreenWave = false
|
||||
isShowRunRedLight = false
|
||||
isYellowLight = false
|
||||
// lightCountDownRed = 1
|
||||
// lightCountDownGreen = 1
|
||||
// lightCountDownYellow = 1
|
||||
CallerObuTrafficLightDisappearManager.invokeObuTrafficLightDisappear()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -978,11 +981,6 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
private var isShowGreenWave = false
|
||||
private var isShowRunRedLight = false
|
||||
|
||||
// private var lightCountDownRed : Int = 1
|
||||
// private var lightCountDownGreen : Int = 1
|
||||
// private var lightCountDownYellow : Int = 1
|
||||
|
||||
|
||||
/**
|
||||
* 修改红绿灯
|
||||
*/
|
||||
@@ -1051,15 +1049,9 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
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(
|
||||
EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType),
|
||||
@@ -1107,87 +1099,42 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
}
|
||||
// 红灯
|
||||
2, 3 -> {
|
||||
// if (!isGreenLight) { //只有不是是绿灯,才能展示跳转到红灯
|
||||
if (!isRedLight) {
|
||||
CallerHmiManager.disableWarningV2X(appId.toString())
|
||||
isRedLight = true
|
||||
}
|
||||
isGreenLight = false
|
||||
isYellowLight = false
|
||||
// lightCountDownYellow = 1
|
||||
// lightCountDownGreen = 1
|
||||
|
||||
CallerObuTrafficLightListenerManager.invokeObuTrafficLight(1)
|
||||
val red = currentLight.countDown.toInt()
|
||||
// Log.e("lixp", " ----11--- red --------- = $red ----lightCountDownRed = $lightCountDownRed ----isGreenLight = $isGreenLight")
|
||||
// //记录当前红灯的上一帧的值 10,9,10
|
||||
// if (lightCountDownRed == 1) { //最后一个灯态是1
|
||||
// lightCountDownRed = red
|
||||
// }
|
||||
//
|
||||
// if (lightCountDownRed < red) { //10 9
|
||||
// return
|
||||
// }
|
||||
// lightCountDownRed = red
|
||||
// Log.e("lixp", " ----22--- red --------- = $red ----lightCountDownRed = $lightCountDownRed ----isGreenLight = $isGreenLight")
|
||||
CallerHmiManager.changeCountdownRed(red)
|
||||
// }
|
||||
}
|
||||
|
||||
// 绿灯
|
||||
4, 5, 6 -> {
|
||||
// if (!isYellowLight) { //只有不是黄灯的时候,才能跳转到绿灯
|
||||
if (!isGreenLight) {
|
||||
CallerHmiManager.disableWarningV2X(appId.toString())
|
||||
isGreenLight = true
|
||||
}
|
||||
isRedLight = false
|
||||
isYellowLight = false
|
||||
// lightCountDownRed = 1
|
||||
// lightCountDownYellow = 1
|
||||
|
||||
CallerObuTrafficLightListenerManager.invokeObuTrafficLight(3)
|
||||
val green = currentLight.countDown.toInt()
|
||||
// Log.e("lixp", " ----11--- green --------- = $green ---lightCountDownGreen = $lightCountDownGreen ----isYellowLight = $isYellowLight")
|
||||
// if (lightCountDownGreen == 1) {
|
||||
// lightCountDownGreen = green
|
||||
// }
|
||||
//
|
||||
// if (lightCountDownGreen < green) {
|
||||
// return
|
||||
// }
|
||||
// lightCountDownGreen = green
|
||||
// Log.d("lixp", " ----22--- green --------- = $green ---lightCountDownGreen = $lightCountDownGreen ----isYellowLight = $isYellowLight")
|
||||
CallerHmiManager.changeCountdownGreen(green)
|
||||
// }
|
||||
}
|
||||
|
||||
// 黄灯
|
||||
7, 8 -> {
|
||||
// if (!isRedLight) { //黄灯只能跳转绿灯
|
||||
if (!isYellowLight) {
|
||||
isYellowLight = true
|
||||
}
|
||||
isRedLight = false
|
||||
isGreenLight = false
|
||||
// lightCountDownRed = 1
|
||||
// lightCountDownGreen = 1
|
||||
|
||||
CallerHmiManager.disableWarningV2X(appId.toString())
|
||||
CallerObuTrafficLightListenerManager.invokeObuTrafficLight(2)
|
||||
val yellow = currentLight.countDown.toInt()
|
||||
// Log.e("lixp", " -----11-- yellow --------- = $yellow ---lightCountDownYellow = $lightCountDownYellow ----isYellowLight = $isYellowLight")
|
||||
// if (lightCountDownYellow == 1) {
|
||||
// lightCountDownYellow = yellow
|
||||
// }
|
||||
//
|
||||
// if (lightCountDownYellow < yellow) {
|
||||
// return
|
||||
// }
|
||||
// lightCountDownYellow = yellow
|
||||
// Log.d("lixp", " -----22-- yellow --------- = $yellow ---lightCountDownYellow = $lightCountDownYellow ----isYellowLight = $isYellowLight")
|
||||
CallerHmiManager.changeCountdownYellow(yellow)
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -5,10 +5,12 @@ import android.os.Handler
|
||||
import android.util.Log
|
||||
import com.mogo.eagle.core.data.trafficlight.TrafficLightResult
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuTrafficLightDisapperListener
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuTrafficLightListener
|
||||
import com.mogo.eagle.core.function.api.trafficlight.IMoGoTrafficLightListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuTrafficLightDisappearManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.v2x.trafficlight.TrafficLightHMIManager
|
||||
@@ -21,7 +23,7 @@ import perception.TrafficLightOuterClass.TrafficLight
|
||||
* @since: 2022/4/28
|
||||
*/
|
||||
class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLightListener,
|
||||
IMoGoObuTrafficLightListener {
|
||||
IMoGoObuTrafficLightListener, IMoGoObuTrafficLightDisapperListener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "TrafficLightDispatcher"
|
||||
@@ -50,6 +52,8 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
CallerAutopilotIdentifyListenerManager.addListener(TAG, this)
|
||||
//obu红绿灯数据
|
||||
CallerObuTrafficLightListenerManager.registerObuTrafficLightListener(TAG, this)
|
||||
//obu红绿灯数据消失
|
||||
CallerObuTrafficLightDisappearManager.registerObuTrafficLightListener(TAG, this)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -153,6 +157,10 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
|
||||
CallerHmiManager.showWarningTrafficLight(light, 3)
|
||||
}
|
||||
|
||||
override fun onObuLightDisapper() {
|
||||
hasObuLightStatus = false
|
||||
}
|
||||
|
||||
fun destroy() {
|
||||
//取消注册监听AI云获取红绿灯状态
|
||||
CallerTrafficLightListenerManager.unRegisterTrafficLightListener(TAG)
|
||||
|
||||
@@ -78,6 +78,15 @@ object FunctionBuildConfig {
|
||||
@JvmField
|
||||
var isRomaMode = true
|
||||
|
||||
/**
|
||||
* 开启roma自由/循迹路线
|
||||
* 0:自由模式
|
||||
* 1:循迹模式
|
||||
*/
|
||||
@Volatile
|
||||
@JvmField
|
||||
var romaModeStyle = 0
|
||||
|
||||
/**
|
||||
* 是否开启感知物替换颜色功能
|
||||
* 默认关闭
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
package com.mogo.eagle.core.data.msgbox
|
||||
|
||||
import android.util.Log
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import java.io.Serializable
|
||||
|
||||
/**
|
||||
* 运营消息:-1表示初始值
|
||||
*/
|
||||
data class OperationMsg(val timestamp : Long, val content: String, val type: Int = -1): Serializable
|
||||
data class OperationMsg(val timestamp : Long, val content: String, val type: Int = -1): Serializable {
|
||||
init {
|
||||
if (content.isEmpty()) {
|
||||
CallerLogger.e("MsgBox", Log.getStackTraceString(Throwable()))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.mogo.eagle.core.data.msgbox
|
||||
|
||||
import android.util.Log
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import java.io.Serializable
|
||||
|
||||
data class V2XMsg(var type: String = "", var content: String? = "", var tts: String? = ""): Serializable {
|
||||
@@ -9,5 +11,8 @@ data class V2XMsg(var type: String = "", var content: String? = "", var tts: Str
|
||||
|
||||
init {
|
||||
timeStamp = System.currentTimeMillis()
|
||||
if (content.isNullOrEmpty()) {
|
||||
CallerLogger.e("MsgBox", Log.getStackTraceString(Throwable()))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.mogo.eagle.core.function.api.obu
|
||||
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @date 2022/1/30 10:28 下午
|
||||
* OBU 灯态信息 消失
|
||||
*/
|
||||
interface IMoGoObuTrafficLightDisapperListener {
|
||||
|
||||
fun onObuLightDisapper()
|
||||
}
|
||||
@@ -11,5 +11,4 @@ interface IMoGoObuTrafficLightListener {
|
||||
* @param light 灯的信息
|
||||
*/
|
||||
fun onObuTrafficLight(light: Int){}
|
||||
|
||||
}
|
||||
@@ -242,6 +242,7 @@ object CallerVisualAngleManager {
|
||||
PriorityQueue<Record>()
|
||||
}
|
||||
|
||||
@Volatile
|
||||
private var mLevel:Boolean = false
|
||||
|
||||
fun updateLongSightLevel(level:Boolean){
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.mogo.eagle.core.function.call.obu
|
||||
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuTrafficLightDisapperListener
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuTrafficLightListener
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
|
||||
object CallerObuTrafficLightDisappearManager {
|
||||
|
||||
private val M_OBU_TRAFFIC_LIGHT_LISTENER: ConcurrentHashMap<String, IMoGoObuTrafficLightDisapperListener> =
|
||||
ConcurrentHashMap()
|
||||
|
||||
/**
|
||||
* 添加监听
|
||||
* @param tag 标记,用来注销监听使用
|
||||
* @param listener 监听回调
|
||||
*/
|
||||
fun registerObuTrafficLightListener(
|
||||
tag: String,
|
||||
listener: IMoGoObuTrafficLightDisapperListener
|
||||
) {
|
||||
if (M_OBU_TRAFFIC_LIGHT_LISTENER.containsKey(tag)) {
|
||||
return
|
||||
}
|
||||
M_OBU_TRAFFIC_LIGHT_LISTENER[tag] = listener
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除监听
|
||||
* @param tag 标记,用来注销监听使用
|
||||
*/
|
||||
fun unRegisterObuTrafficLightListener(tag: String) {
|
||||
if (!M_OBU_TRAFFIC_LIGHT_LISTENER.containsKey(tag)) {
|
||||
return
|
||||
}
|
||||
M_OBU_TRAFFIC_LIGHT_LISTENER.remove(tag)
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除监听
|
||||
* @param listener 要删除的监听对象
|
||||
*/
|
||||
// fun unRegisterObuTrafficLightListener(listener: IMoGoObuTrafficLightListener) {
|
||||
// if (!M_OBU_TRAFFIC_LIGHT_LISTENER.containsValue(listener)) {
|
||||
// return
|
||||
// }
|
||||
// M_OBU_TRAFFIC_LIGHT_LISTENER.forEach {
|
||||
// if (it.value == listener) {
|
||||
// M_OBU_TRAFFIC_LIGHT_LISTENER.remove(it.key)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
fun invokeObuTrafficLightDisappear() {
|
||||
M_OBU_TRAFFIC_LIGHT_LISTENER.forEach {
|
||||
val tag = it.key
|
||||
val listener = it.value
|
||||
listener.onObuLightDisapper()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user