Merge branch 'dev_robobus-m1-p-app-module_1.0.0_230112_1.0.0' into 'dev_RoboBus_P_230220_1.0.1'

Dev robobus m1 p app module 1.0.0 230112 1.0.0

See merge request zhjt/AndroidApp/MoGoEagleEye!635
This commit is contained in:
wangmingjun
2023-02-28 13:43:09 +00:00
41 changed files with 494 additions and 294 deletions

View File

@@ -28,21 +28,21 @@ class PM2BaseFragment :
override fun initViews() {
//横竖屏
setScreenDirection()
// setScreenDirection()
//隐藏小地图
initFragment()
}
private fun setScreenDirection() {
var ro = Settings.System.getInt(context?.contentResolver,
Settings.System.USER_ROTATION,Surface.ROTATION_270)
if (ro != Surface.ROTATION_270){
ro = Surface.ROTATION_270
}
Settings.System.putInt(context?.contentResolver,
Settings.System.USER_ROTATION,ro)
}
// private fun setScreenDirection() {
// var ro = Settings.System.getInt(context?.contentResolver,
// Settings.System.USER_ROTATION,Surface.ROTATION_270)
// if (ro != Surface.ROTATION_270){
// ro = Surface.ROTATION_270
// }
// Settings.System.putInt(context?.contentResolver,
// Settings.System.USER_ROTATION,ro)
// }
/**
* 初始化行程信息,高静地图,宣传 三个fragment

View File

@@ -105,7 +105,7 @@ class AdvancePagerAdapter(context: Context, viewPager: ViewPager) : PagerAdapter
pause = false
if (viewList.size > 0 && viewList[mViewPager.currentItem] is AdvanceVideoView) {
val videoView = viewList[mViewPager.currentItem] as AdvanceVideoView
videoView.setRestart()
videoView.setResume()
}
}

View File

@@ -184,9 +184,9 @@ class AdvanceVideoView @JvmOverloads constructor(
}
}
fun setRestart() {
fun setResume() {
if (videoViewPlayer !== null) {
videoViewPlayer?.startPlayLogic()
videoViewPlayer?.onVideoResume()
}
}

View File

@@ -17,7 +17,9 @@
app:resetDrawableMarginBottom="@dimen/dp_54"
app:carDrawable = "@drawable/m2_map_car_icon"
app:startPointDrawable="@drawable/m2_map_start_icon"
app:endPointDrawable="@drawable/m2_map_end_icon"/>
app:endPointDrawable="@drawable/m2_map_end_icon"
app:leftPadding="400"
/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/img_drive_bg"
@@ -117,14 +119,17 @@
app:layout_constraintLeft_toLeftOf="@+id/speed_tv"
android:textColor="@color/m2_line_during_tv_color"/>
<androidx.appcompat.widget.AppCompatTextView
<com.mogo.och.common.module.wigets.MarqueeTextView
android:id="@+id/station_name_tv"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textStyle="bold"
android:singleLine="true"
android:ellipsize="marquee"
android:text="@string/m2_p_empty_tv"
android:textSize="@dimen/dp_22"
android:layout_marginTop="@dimen/dp_8"
app:layout_constraintRight_toRightOf="@+id/img_line_location_bg"
app:layout_constraintTop_toBottomOf="@+id/station_name_title_tv"
app:layout_constraintLeft_toLeftOf="@+id/speed_tv"
android:textColor="@color/m2_no_line_tv_color"/>
@@ -171,13 +176,17 @@
app:layout_constraintLeft_toLeftOf="@+id/speed_tv"
android:textColor="@color/m2_no_line_tv_color"/>
<androidx.appcompat.widget.AppCompatTextView
<com.mogo.och.common.module.wigets.MarqueeTextView
android:id="@+id/line_name_tv"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textStyle="bold"
android:singleLine="true"
android:marqueeRepeatLimit="marquee_forever"
android:ellipsize="marquee"
android:layout_marginTop="@dimen/dp_16"
android:textSize="@dimen/dp_22"
app:layout_constraintRight_toRightOf="@+id/img_line_location_bg"
app:layout_constraintTop_toTopOf="@+id/img_time_bg"
app:layout_constraintLeft_toLeftOf="@+id/speed_tv"
android:textColor="@color/m2_line_name_tv_color"/>

View File

@@ -2,7 +2,6 @@ package com.mogo.och.common.module.manager
import android.Manifest
import android.content.Context
import com.mogo.commons.debug.DebugConfig
import com.mogo.commons.module.status.IMogoStatusChangedListener
import com.mogo.commons.module.status.MogoStatusManager
import com.mogo.commons.module.status.StatusDescriptor
@@ -17,6 +16,7 @@ import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.Disposable
import io.reactivex.schedulers.Schedulers
import java.util.concurrent.TimeUnit
import kotlin.properties.Delegates
/**
* @author: wangmingjun
@@ -26,26 +26,40 @@ object AbnormalFactorsLoopManager : IMogoStatusChangedListener {
const val TAG = "AbnormalFactorsLoopManager"
private const val LOOP_TIME = 10 *1000L
private const val LOOP_TIME = 10 * 1000L
private const val LOOP_DELAY = 5 * 1000L
private var socketStatus: Boolean = false
private var socketStatus by Delegates.observable(false) { _, _, newValue ->
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
return@observable
}
if (FunctionBuildConfig.isDemoMode) {
return@observable
}
if (newValue) {
ToastUtils.showLong("长链接状态恢复")
} else {
ToastUtils.showLong("长链接异常,请开启相应权限或者查看网络")
}
}
private var looperDisposable : Disposable? = null
private var looperDisposable: Disposable? = null
fun startLoopAbnormalFactors(context: Context){
if (looperDisposable != null && !looperDisposable!!.isDisposed){
fun startLoopAbnormalFactors(context: Context) {
if (looperDisposable != null && !looperDisposable!!.isDisposed) {
return
}
i(TAG, "startLoopAbnormalFactors()")
looperDisposable = Observable.interval(LOOP_DELAY, LOOP_TIME, TimeUnit.MILLISECONDS)
.map { aLong -> aLong+1 }
.map { aLong -> aLong + 1 }
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe{ aLong -> checkAbnormalFactors(context)}
.subscribe { aLong -> checkAbnormalFactors(context) }
//长链接监听
MogoStatusManager.getInstance().registerStatusChangedListener(TAG,
StatusDescriptor.CLOUD_SOCKET,this)
MogoStatusManager.getInstance().registerStatusChangedListener(
TAG,
StatusDescriptor.CLOUD_SOCKET, this
)
}
private fun checkAbnormalFactors(context: Context) {
@@ -54,14 +68,15 @@ object AbnormalFactorsLoopManager : IMogoStatusChangedListener {
var networkStatus = false
//定位权限
locationStatusPermsStatus = !(!PermissionUtil.isLocServiceEnable(context) || !PermissionUtil.checkPermission(
context, *arrayOf(
Manifest.permission.ACCESS_FINE_LOCATION
)
))
locationStatusPermsStatus =
!(!PermissionUtil.isLocServiceEnable(context) || !PermissionUtil.checkPermission(
context, *arrayOf(
Manifest.permission.ACCESS_FINE_LOCATION
)
))
//网络状态或者网络权限是否打开
if (NetworkUtils.isConnected(context)){
if (NetworkUtils.isConnected(context)) {
networkStatus = true
}
//长链接状态 socketStatus
@@ -70,28 +85,27 @@ object AbnormalFactorsLoopManager : IMogoStatusChangedListener {
if (!locationStatusPermsStatus) toastStr += "定位服务异常 "
if (!networkStatus) toastStr += " 网络异常 "
//乘客屏不显示长链接异常
if (!socketStatus && !AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) toastStr += " 长链接异常 "
i(TAG, "abnormal_factors_Str = $toastStr")
if (!FunctionBuildConfig.isDemoMode && toastStr !== ""){
if (!FunctionBuildConfig.isDemoMode && toastStr !== "") {
ToastUtils.showLong(toastStr + "请开启相应权限或者查看网络")
}
}
fun stopLoopAbnormalFactors(){
fun stopLoopAbnormalFactors() {
looperDisposable!!.dispose()
looperDisposable == null
MogoStatusManager.getInstance().unregisterStatusChangedListener(TAG,
StatusDescriptor.CLOUD_SOCKET,this)
MogoStatusManager.getInstance().unregisterStatusChangedListener(
TAG,
StatusDescriptor.CLOUD_SOCKET, this
)
}
override fun onStatusChanged(descriptor: StatusDescriptor?, isTrue: Boolean) {
//长链接监听、
if (StatusDescriptor.CLOUD_SOCKET == descriptor){
if (StatusDescriptor.CLOUD_SOCKET == descriptor) {
socketStatus = isTrue
}
}

View File

@@ -474,22 +474,24 @@ Object readFileToJson(env){
return null
}
def variantName() {
if(gradle.startParameter.taskNames.size()>0) {
def taskName = gradle.startParameter.taskNames[0]
taskName = taskName.replace("Debug","")
taskName = taskName.replace("Release","")
if (taskName.endsWith("Qa")) {
return "qa"
} else if (taskName.endsWith("Online")) {
return "online"
} else if (taskName.endsWith("Demo")) {
return "demo"
} else {
return "qa"
for (String taskName : gradle.startParameter.taskNames) {
if (taskName.startsWith("assemble")) {
taskName = taskName.replace("Debug","")
taskName = taskName.replace("Release","")
if (taskName.endsWith("Qa")) {
return "qa"
} else if (taskName.endsWith("Online")) {
return "online"
} else if (taskName.endsWith("Demo")) {
return "demo"
}
}
}
}else {
return "qa"
}
return "qa"
}

View File

@@ -50,6 +50,6 @@ project.android.productFlavors {
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
//Bus不能启动自驾的档位
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_BUS', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_R);}}'
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_R);}}'
}
}

View File

@@ -46,6 +46,6 @@ project.android.productFlavors {
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
//Bus不能启动自驾的档位
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_BUS', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_R);}}'
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_R);}}'
}
}

View File

@@ -48,6 +48,6 @@ project.android.productFlavors {
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
//Bus不能启动自驾的档位
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_BUS', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_R);}}'
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_R);}}'
}
}

View File

@@ -49,7 +49,7 @@ project.android.productFlavors {
// 构建 是否支持多屏异显异交互
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
//M1不能启动自驾的档位
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'null'
//Bus不能启动自驾的档位
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_R);}}'
}
}

View File

@@ -1129,6 +1129,7 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
}
}, "1234567");*/
}
options.setUnableLaunchAutopilotGear(BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR_TAXI);
AdasManager.getInstance().create(options, this);
AdasManager.getInstance().setOnAdasListener(this);
/*两端数据转发 注释掉

View File

@@ -13,6 +13,8 @@ import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.EditText;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
@@ -41,6 +43,7 @@ import com.zhidao.support.adas.high.common.autopilot.ability.AutopilotAbilityMan
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
@@ -64,11 +67,16 @@ public class VersionFragment extends BaseFragment {
private CheckBox unregistered_check_all;
private TextView hint_registered;
private TextView hint_unregistered;
private TextView can;
private TextView gear_influence;
private TextView gear;
private TextView title_gear;
private RadioButton rb_taxi;
private RadioGroup rg;
private ConfigAdapter adapter;
private InterfaceAdapter unregisteredAdapter;
private InterfaceAdapter registeredAdapter;
private Set[] unableGears;
private int role = Constants.TERMINAL_ROLE.DEBUG;//角色 默认调试屏
@@ -134,6 +142,12 @@ public class VersionFragment extends BaseFragment {
Button btn2 = view.findViewById(R.id.btn2);
ipsView = view.findViewById(R.id.ips_view);
recyclerView = view.findViewById(R.id.config_list);
rb_taxi = view.findViewById(R.id.rb_taxi);
can = view.findViewById(R.id.can);
gear_influence = view.findViewById(R.id.gear_influence);
gear = view.findViewById(R.id.gear);
title_gear = view.findViewById(R.id.title_gear);
rg = view.findViewById(R.id.rg);
initFragmentRecyclerView();
CupidLogUtils.w("InfoFragment===>" + title);
tvTitle.setText(title);
@@ -176,7 +190,36 @@ public class VersionFragment extends BaseFragment {
view.findViewById(R.id.line1).setVisibility(View.GONE);
tvTitle.setText("版本");
}
rg.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup group, int checkedId) {
if (checkedId == R.id.rb_taxi) {
AutopilotAbilityManager.getInstance().setUnableLaunchAutopilotGear(BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR_TAXI);
gear("TAXI", Arrays.toString(BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR_TAXI.toArray()));
} else if (checkedId == R.id.rb_bus) {
AutopilotAbilityManager.getInstance().setUnableLaunchAutopilotGear(BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR_BUS);
gear("BUS", Arrays.toString(BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR_BUS.toArray()));
} else if (checkedId == R.id.rb_sweeper) {
AutopilotAbilityManager.getInstance().setUnableLaunchAutopilotGear(BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR_SWEEPER);
gear("SWEEPER", Arrays.toString(BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR_SWEEPER.toArray()));
} else if (checkedId == R.id.rb_m1) {
AutopilotAbilityManager.getInstance().setUnableLaunchAutopilotGear(BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR_M1);
gear("M1", "无限制");
} else if (checkedId == R.id.rb_m2) {
AutopilotAbilityManager.getInstance().setUnableLaunchAutopilotGear(BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR_M2);
gear("M1", Arrays.toString(BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR_M2.toArray()));
} else if (checkedId == R.id.rb_van) {
AutopilotAbilityManager.getInstance().setUnableLaunchAutopilotGear(BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR_VAN);
gear("VAN", "无限制");
}
}
});
gear("TAXI", Arrays.toString(BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR_TAXI.toArray()));
}
private void gear(String car, String gear) {
title_gear.setText(car + "不能启动自动驾驶的档位:");
this.gear.setText(gear);
}
//根据连接状态更新数据
@@ -218,59 +261,37 @@ public class VersionFragment extends BaseFragment {
list.add(new Config("ADAS LIB版本:", AdasManager.getInstance().getAdasVersion()));
list.add(new Config("APP构建时间:", BuildConfig.BUILD_TIME));
list.add(getAutopilotAbilityConfig(""));
list.add(gear());
adapter.setData(list);
}
private Config gear() {
private String gear() {
StringBuilder builder = new StringBuilder();
Chassis.GearPosition gear = App.INSTANCE.gear;
if (gear != null) {
if (unableGears == null) {
unableGears = new Set[6];
unableGears[0] = BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR_BUS;
unableGears[1] = BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR_M1;
unableGears[2] = BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR_M2;
unableGears[3] = BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR_SWEEPER;
unableGears[4] = BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR_TAXI;
unableGears[5] = BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR_VAN;
}
for (int j = 0; j < unableGears.length; j++) {
String type = "";
if (j == 0) {
type = "BUS";
} else if (j == 1) {
type = "M1";
} else if (j == 2) {
type = "M2";
} else if (j == 3) {
type = "SWEEPER";
} else if (j == 4) {
type = "TAXI";
} else if (j == 5) {
type = "VAN";
}
AutopilotAbilityManager.getInstance().setUnableLaunchAutopilotGear(unableGears[j]);
boolean b = AutopilotAbilityManager.getInstance().isLaunchAutopilot(gear);
builder.append("车型:").append(type);
builder.append(" 当前档位:").append(gear.name());
builder.append(" 是否可以启动自驾:").append(b).append('\n');
}
boolean b = AutopilotAbilityManager.getInstance().isLaunchAutopilot(gear);
builder.append(" 当前档位:").append(gear.name());
builder.append(" 是否可以启动自驾:").append(b);
}
return new Config("档位影响:", builder.toString());
return builder.toString();
}
private Config getAutopilotAbilityConfig(String value) {
return new Config("能否启动自动驾驶:", value);
private String getAutopilotAbilityConfig(String value) {
return value;
}
public void autopilotAbility(boolean isAutopilotAbility, String unableAutopilotReason) {
List<Config> list = adapter.getData();
if (list != null) {
updateRefreshConfig(list, getAutopilotAbilityConfig(isAutopilotAbility + ",原因:" + unableAutopilotReason));
updateRefreshConfig(list, gear());
}
if (getActivity() != null)
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
can.setTextColor(getResources().getColor(RandomColor.randomColor()));
can.setText(getAutopilotAbilityConfig(isAutopilotAbility + ",原因:" + unableAutopilotReason));
gear_influence.setTextColor(getResources().getColor(RandomColor.randomColor()));
gear_influence.setText(gear());
}
});
}
private void updateRefreshConfig(List<Config> list, Config temp) {

View File

@@ -33,12 +33,155 @@
android:layout_margin="20dp"
android:orientation="horizontal">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/config_list"
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
android:layout_weight="1">
<LinearLayout
android:id="@+id/layout_gear_influence"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="档位影响:"
android:textStyle="bold" />
<TextView
android:id="@+id/gear_influence"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:id="@+id/layout_gear"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@id/layout_gear_influence"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent">
<TextView
android:id="@+id/title_gear"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="车型档位:"
android:textStyle="bold" />
<TextView
android:id="@+id/gear"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:id="@+id/layout_can"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@id/layout_gear"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="能否启动自动驾驶:"
android:textStyle="bold" />
<TextView
android:id="@+id/can"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:id="@+id/layout_car"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@id/layout_can"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<TextView
android:id="@+id/car_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="当前车型:"
android:textStyle="bold" />
<RadioGroup
android:id="@+id/rg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toEndOf="@id/car_type"
android:orientation="horizontal">
<RadioButton
android:id="@+id/rb_taxi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="TAXI" />
<RadioButton
android:id="@+id/rb_bus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="BUS" />
<RadioButton
android:id="@+id/rb_sweeper"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="SWEEPER" />
<RadioButton
android:id="@+id/rb_m1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="M1" />
<RadioButton
android:id="@+id/rb_m2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="M2" />
<RadioButton
android:id="@+id/rb_van"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="VAN" />
</RadioGroup>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/config_list"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@id/layout_car"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<View
android:id="@+id/line1"

View File

@@ -41,6 +41,7 @@ class DispatchAutoPilotManager private constructor() :
private const val MSG_SOCKET_TYPE = 501000
private const val MSG_TYPE_SHOW_DIALOG = 0
private const val MSG_TYPE_UPLOAD_AUTOPILOT_STATUS = 1
private const val MSG_TYPE_UPLOAD_AUTOPILOT_ROTTING = 2
val dispatchAutoPilotManager by lazy(LazyThreadSafetyMode.SYNCHRONIZED) {
DispatchAutoPilotManager()
@@ -68,6 +69,16 @@ class DispatchAutoPilotManager private constructor() :
getAutoPilotStatusInfo().reason
)
sendEmptyMessageDelayed(MSG_TYPE_UPLOAD_AUTOPILOT_STATUS, 1000L)
} else if(msg.what == MSG_TYPE_UPLOAD_AUTOPILOT_ROTTING){
val data = msg.obj as MessagePad.GlobalPathResp
val list: MutableList<AutopilotRouteInfo.RouteModels> = ArrayList()
for (location in data.wayPointsList) {
val routeModels = AutopilotRouteInfo.RouteModels()
routeModels.lat = location.latitude
routeModels.lon = location.longitude
list.add(routeModels)
}
dispatchServiceModel.uploadAutopilotRoute(list)
}
}
}
@@ -165,14 +176,10 @@ class DispatchAutoPilotManager private constructor() :
if (globalPathResp == null || globalPathResp.wayPointsList.isEmpty()) {
return
}
val list: MutableList<AutopilotRouteInfo.RouteModels> = ArrayList()
for (location in globalPathResp.wayPointsList) {
val routeModels = AutopilotRouteInfo.RouteModels()
routeModels.lat = location.latitude
routeModels.lon = location.longitude
list.add(routeModels)
}
dispatchServiceModel.uploadAutopilotRoute(list)
val message = Message()
message.what = MSG_TYPE_UPLOAD_AUTOPILOT_ROTTING
message.obj = globalPathResp
handler.sendMessage(message)
}
override fun onAutopilotArriveAtStation(arrivalNotification: MessagePad.ArrivalNotification?) {

View File

@@ -76,7 +76,7 @@ class DispatchServiceModel private constructor() {
fun uploadAutopilotRoute(list: List<RouteModels?>?) {
val sn = MoGoAiCloudClientConfig.getInstance().sn
val reportedRoute = ReportedRoute(sn, GsonUtil.jsonFromObject(list))
val map: MutableMap<String, Any> = HashMap()
val map: MutableMap<String, String> = HashMap()
map["sn"] = sn
map["data"] = GsonUtil.jsonFromObject(reportedRoute)
mAdasApiService.uploadAutopilotRoute(map)

View File

@@ -15,7 +15,7 @@ interface IDispatchAdasApiService {
*/
@FormUrlEncoded
@POST("eagle-eye-dns/eagle-eye-dns/dataService/autoDriver/receiveCarPreSetPath")
fun uploadAutopilotRoute(@FieldMap parameters: Map<String, Any>): Observable<BaseData>
fun uploadAutopilotRoute(@FieldMap parameters: Map<String, String>): Observable<BaseData>
/**
* 上报自动驾驶调度处理结果 服务于业务调度

View File

@@ -748,27 +748,29 @@ class MoGoAutopilotControlProvider :
}
override fun connectSpecifiedServer(ip: String) {
NSDNettyManager.getInstance().connectSpecifiedServer(
ip,
NettyTcpServer.SERVER_PORT,
MoGoAiCloudClientConfig.getInstance().sn,
object : NettyClientListener<MogoProtocolMsg> {
override fun onMessageResponseClient(
msg: MogoProtocolMsg?,
sign: String?,
channel: Channel
) {
msgHandler.handleMsgFromServer(msg, channel)
}
ThreadUtils.getIoPool().submit {
NSDNettyManager.getInstance().connectSpecifiedServer(
ip,
NettyTcpServer.SERVER_PORT,
MoGoAiCloudClientConfig.getInstance().sn,
object : NettyClientListener<MogoProtocolMsg> {
override fun onMessageResponseClient(
msg: MogoProtocolMsg?,
sign: String?,
channel: Channel
) {
msgHandler.handleMsgFromServer(msg, channel)
}
override fun onClientStatusConnectChanged(
statusCode: Int,
sign: String?,
channel: Channel
) {
msgHandler.handleClientConnStatus(statusCode, sign, channel)
}
})
override fun onClientStatusConnectChanged(
statusCode: Int,
sign: String?,
channel: Channel
) {
msgHandler.handleClientConnStatus(statusCode, sign, channel)
}
})
}
}
/**

View File

@@ -684,12 +684,9 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
when (appId) {
//前向碰撞预警
MogoObuConstants.V2X_WARNING_TYPE.FCW.toString() -> {
if (FunctionBuildConfig.isObuWarningFusionUnion) {
if (FunctionBuildConfig.isObuWarningFusionUnion && level == 3) {
alertContent = "前车距离过近"
ttsContent = "前车距离过近"
CallerObuWarningListenerManager.invokeTrackerFusionData(
ObuManager.getInstance().obuRvToTrackedObject(info)
)
} else {
alertContent =
EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_FCW.poiType)

View File

@@ -172,8 +172,10 @@ class BindingCarManager : IMoGoAutopilotCarConfigListener {
* obu的升级,只需要司机屏连接
*/
fun queryObuUpgrade(obuVersionName: String) {
CallerLogger.d("${SceneConstant.M_OBU}${MogoObuConst.TAG_UPGRADE_OBU}","queryObuUpgrade isConnected = ${CallerObuApiManager.isConnected()} --- mAddress = $mAddress")
ObuUpgradeAppNetWorkManager.getInstance().getObuUpgradeInfo(mContext, mAddress, obuVersionName)
if (screenType == 1) {
CallerLogger.d("${SceneConstant.M_OBU}${MogoObuConst.TAG_UPGRADE_OBU}","queryObuUpgrade isConnected = ${CallerObuApiManager.isConnected()} --- mAddress = $mAddress")
ObuUpgradeAppNetWorkManager.getInstance().getObuUpgradeInfo(mContext, mAddress, obuVersionName)
}
}
}

View File

@@ -163,18 +163,26 @@ class BindingCarNetWorkManager private constructor() {
}
d(SceneConstant.M_BINDING + TAG, "updateCarVrIconRes : $brandId")
when (brandId) {
"1" -> {
"1" -> { //东风
CallerMapUIServiceManager.getMapUIController()?.changeCurrentIcon(R.raw.chuzuche)
HdMapBuildConfig.currentCarVrIconRes = R.raw.chuzuche
}
"2" -> {
"2" -> { //红旗
CallerMapUIServiceManager.getMapUIController()?.changeCurrentIcon(R.raw.hq_h9)
HdMapBuildConfig.currentCarVrIconRes = R.raw.hq_h9
}
"3" -> {
"3" -> { //金旅
CallerMapUIServiceManager.getMapUIController()?.changeCurrentIcon(R.raw.xiaobache)
HdMapBuildConfig.currentCarVrIconRes = R.raw.xiaobache
}
"4" -> { //开沃
CallerMapUIServiceManager.getMapUIController()?.changeCurrentIcon(R.raw.xiaobache)
HdMapBuildConfig.currentCarVrIconRes = R.raw.xiaobache
}
"5" -> { //福田
CallerMapUIServiceManager.getMapUIController()?.changeCurrentIcon(R.raw.huanwei)
HdMapBuildConfig.currentCarVrIconRes = R.raw.huanwei
}
else -> {
CallerMapUIServiceManager.getMapUIController()?.changeCurrentIcon(R.raw.chuzuche)
HdMapBuildConfig.currentCarVrIconRes = R.raw.chuzuche
@@ -186,6 +194,8 @@ class BindingCarNetWorkManager private constructor() {
return when (HdMapBuildConfig.currentCarVrIconRes) {
R.raw.chuzuche -> "1"
R.raw.xiaobache -> "3"
R.raw.xiaobache -> "4"
R.raw.huanwei -> "5"
else -> "1"
}
}

View File

@@ -410,14 +410,13 @@ internal class DebugSettingView @JvmOverloads constructor(
//展示OBU控制中心
obuControllerLayout.visibility = View.VISIBLE
tbVehicleStateController.isChecked = true
//展示HMI控制中心
hmiObuLayout.visibility = View.VISIBLE
} else {
buttonView.setCompoundDrawables(null, null, iconRight, null)
//隐藏OBU控制中心
obuControllerLayout.visibility = View.GONE
tbVehicleStateController.isChecked = false
hmiObuLayout.visibility = View.GONE
}
}
@@ -1059,29 +1058,6 @@ internal class DebugSettingView @JvmOverloads constructor(
HmiBuildConfig.isShowSnBindingView = !isChecked
}
/**
* obu弱势交通控制
*/
tbObuWeaknessTraffic.setOnCheckedChangeListener { _, isChecked ->
// 默认开启
HmiBuildConfig.isShowObuWeaknessTrafficView = !isChecked
}
/**
* 云端弱势交通控制
*/
tbCloudWeaknessTraffic.setOnCheckedChangeListener { _, isChecked ->
// 默认关闭
HmiBuildConfig.isShowObuWeaknessTrafficView = isChecked
}
/**
* 限速数据优先使用obu默认打开
*/
tbRoadLimitSpeed.setOnCheckedChangeListener { _, isChecked ->
HmiBuildConfig.isShowObuLimitSpeedView = isChecked
}
/**
* 实时加速度面板控制
*/
@@ -1657,6 +1633,28 @@ internal class DebugSettingView @JvmOverloads constructor(
tbIsDemoMode.text = "开启美化模式"
}
//obu TODO 后面会添加很多os那边需要显示的内容
obuVersionNameTv.text = Html.fromHtml(
"OBU版本号${
if (AppConfigInfo.isConnectObu) {
"<font color='blue'> 1.0"
} else {
"<font color='red'>异常"
}
}"
)
obuConnectStatusTv.text = Html.fromHtml(
"OBU连接状态${
if (AppConfigInfo.isConnectObu) {
"<font color='blue'>正常"
} else {
"<font color='red'>异常"
}
}"
)
}
/**

View File

@@ -6,13 +6,11 @@ import android.util.AttributeSet
import android.view.LayoutInflater
import android.widget.LinearLayout
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.function.main.AppListActivity
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.util.ActivityUtils
import com.mogo.eagle.core.utilcode.util.AppUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
@@ -41,11 +39,8 @@ class VersionNameView @JvmOverloads constructor(
}
private fun initView(){
//版本水印只在司机端展示
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
showCurrentPadVersion()
showCurrentMapVersion()
}
showCurrentPadVersion()
showCurrentMapVersion()
// 调试入口应对M1、M2没有安装Launcher的情况
setOnLongClickListener {
@@ -72,7 +67,7 @@ class VersionNameView @JvmOverloads constructor(
UiThreadHandler.post {
tvMapVersionName?.let {
if (!dockerVersion.isNullOrEmpty()) {
it.text = " ; MAP:${dockerVersion}"
it.text = "MAP:${dockerVersion}"
}
}
}
@@ -80,18 +75,12 @@ class VersionNameView @JvmOverloads constructor(
override fun onAttachedToWindow() {
super.onAttachedToWindow()
//版本水印只在司机端展示
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
}
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
//版本水印只在司机端展示
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
CallerAutoPilotStatusListenerManager.removeListener(TAG)
}
CallerAutoPilotStatusListenerManager.removeListener(TAG)
}
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {

View File

@@ -1078,64 +1078,47 @@
android:id="@+id/tvObuInfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dp_10"
android:layout_margin="@dimen/dp_5"
android:minLines="4"
android:text="OBU配置信息"
android:textColor="#000"
android:textSize="@dimen/dp_24"
app:layout_constraintTop_toBottomOf="@id/obuDivider" />
<View
android:id="@+id/obuDivider2"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#F0F0F0"
app:layout_constraintTop_toBottomOf="@id/tvObuInfo" />
<GridLayout
android:id="@+id/hmiObuLayout"
<LinearLayout
android:id="@+id/obuStatusCenterLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:columnCount="2"
android:visibility="gone"
android:orientation="vertical"
android:visibility="visible"
tools:visibility="visible"
app:layout_constraintTop_toBottomOf="@id/obuDivider2"
app:layout_constraintTop_toBottomOf="@id/tvObuInfo"
tools:ignore="MissingConstraints">
<ToggleButton
android:id="@+id/tbObuWeaknessTraffic"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_columnWeight="1"
android:layout_margin="2dp"
android:gravity="center"
android:textOff="关闭路侧弱势群体预警"
android:textOn="打开路侧弱势群体预警"
android:textSize="@dimen/dp_24" />
<TextView
android:id="@+id/obuVersionNameTv"
style="@style/DebugSettingText"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<ToggleButton
android:id="@+id/tbCloudWeaknessTraffic"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_columnWeight="1"
android:layout_margin="2dp"
android:gravity="center"
android:textOff="开启云端弱势群体预警"
android:textOn="关闭云端弱势群体预警"
android:textSize="@dimen/dp_24" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#F0F0F0" />
<ToggleButton
android:id="@+id/tbRoadLimitSpeed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_columnWeight="1"
android:layout_margin="2dp"
android:gravity="center"
android:textOff="获取路侧限速提醒"
android:textOn="关闭路侧限速提醒"
android:textSize="@dimen/dp_24" />
<TextView
android:id="@+id/obuConnectStatusTv"
style="@style/DebugSettingText"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#F0F0F0" />
</LinearLayout>
</GridLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<!-- OBU 配置 end -->

View File

@@ -2,7 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
android:orientation="vertical">
<TextView
android:id="@+id/tvAppVersionName"
@@ -10,6 +10,7 @@
android:layout_height="wrap_content"
android:textSize="@dimen/dp_28"
android:textColor="#FFBEC6EF"
android:layout_gravity="center_horizontal"
/>
<TextView
@@ -18,6 +19,7 @@
android:layout_height="wrap_content"
android:textSize="@dimen/dp_28"
android:textColor="#FFBEC6EF"
android:layout_gravity="center_horizontal"
/>
</LinearLayout>

View File

@@ -102,7 +102,6 @@ class IdentifyOriginDataDrawer : Identify {
@SuppressLint("NewApi")
private fun filterTrafficData(trafficData: List<TrackedObject>): HashMap<String, TrackedObject> {
mFilterTrafficData.clear()
trafficDataUuidList.clear()
for (data in trafficData) {
// 过滤掉未知感知数据
if (TrackerSourceColorHelper.filterData(data)) {
@@ -110,13 +109,12 @@ class IdentifyOriginDataDrawer : Identify {
}
var temp: TrackedObject = data
val uuid = "" + data.uuid
//首次过来的数据不添加,首次未添加的感知物在调用完绘制方法后再塞入cache map
val cacheData = mMarkersCaches[uuid]
if (cacheData != null) {
val color = TrackerSourceColorHelper.getDefaultColor(data)
temp = data.toBuilder().setColor(color).build()
mFilterTrafficData[uuid] = temp
}
mFilterTrafficData[uuid] = temp
mMarkersCaches[uuid] = temp
trafficDataUuidList.add(uuid)
}

View File

@@ -94,21 +94,6 @@ class MapIdentifySubscriber private constructor() : IMoGoIdentifyListener, IMoGo
}
}
override fun updateTrackerFusionData(trackObject: TrackedObject?) {
super.updateTrackerFusionData(trackObject)
try {
if (FunctionBuildConfig.isObuWarningFusionUnion) {
ThreadUtils.getSinglePool().execute {
//todo emArrow
}
} else {
}
} catch (e: Exception) {
e.printStackTrace()
}
}
override fun updateTrackerWarningInfo(trafficData: TrafficData) {
super.updateTrackerWarningInfo(trafficData)
try {

View File

@@ -2,7 +2,6 @@ package com.mogo.eagle.core.function.business.identify;
import android.annotation.SuppressLint;
import android.os.Build;
import android.util.Log;
import androidx.annotation.RequiresApi;

View File

@@ -101,7 +101,7 @@ class SmallMapView @JvmOverloads constructor(
fun drawablePolyline() {
clearPolyline()
if (mAMap != null) {
if (mCoordinatesLatLng.size > 2) {
if (mCoordinatesLatLng.size >= 2) {
// 设置开始结束Marker位置
mStartMarker!!.position = mCoordinatesLatLng[0]
mEndMarker!!.position = mCoordinatesLatLng[mCoordinatesLatLng.size - 1]

View File

@@ -71,6 +71,10 @@ class OverMapView @JvmOverloads constructor(
private var resetDrawableMarginRight: Int = -1
private var resetDrawableMarginBottom: Int = -1
private var isClearArrived: Boolean = false
private var leftPadding: Int = 100
private var topPadding: Int = 100
private var rightPadding: Int = 100
private var bottomPadding: Int = 100
private var mMapView: TextureMapView? = null
private var mAMap: AMap? = null
@@ -136,6 +140,10 @@ class OverMapView @JvmOverloads constructor(
AutoSizeUtils.dp2px(context, 40f)
)
isClearArrived = typedArray.getBoolean(R.styleable.OverMapView_isClearArrived, false)
leftPadding = typedArray.getInt(R.styleable.OverMapView_leftPadding, 100)
topPadding = typedArray.getInt(R.styleable.OverMapView_topPadding, 100)
rightPadding = typedArray.getInt(R.styleable.OverMapView_rightPadding, 100)
bottomPadding = typedArray.getInt(R.styleable.OverMapView_bottomPadding, 100)
typedArray.recycle()
initView(context)
} catch (e: Exception) {
@@ -559,10 +567,10 @@ class OverMapView @JvmOverloads constructor(
mAMap!!.moveCamera(
CameraUpdateFactory.newLatLngBoundsRect(
boundsBuilder.build(),
100,
100,
100,
100
AutoSizeUtils.dp2px(context, leftPadding.toFloat()),
AutoSizeUtils.dp2px(context, rightPadding.toFloat()),
AutoSizeUtils.dp2px(context, topPadding.toFloat()),
AutoSizeUtils.dp2px(context, bottomPadding.toFloat())
)
)
mAMap!!.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition))

View File

@@ -24,5 +24,10 @@
<attr name="resetDrawableMarginBottom" format="dimension" />
<!-- 是否擦除已走过的路线 -->
<attr name="isClearArrived" format="boolean" />
<!-- 规定屏幕范围的padding -->
<attr name="leftPadding" format="integer" />
<attr name="topPadding" format="integer" />
<attr name="rightPadding" format="integer" />
<attr name="bottomPadding" format="integer" />
</declare-styleable>
</resources>

View File

@@ -20,6 +20,8 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_CLOUD_CONNECT_FAIL
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_CLOUD_CONNECT_LOST
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_CLOUD_CONNECT_SUCCESS
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_CLOUD_PASSPORT_ERROR
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_CLOUD_PASSPORT_TOKEN
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_CLOUD_RECONNECT
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_CLOUD
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LOG_CONNECT_STATUS
@@ -166,6 +168,15 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
// 初始化SDK可以设置状态回调来监听
MoGoAiCloudClient.getInstance().init(context, clientConfig).addTokenCallbacks(
object : IMoGoTokenCallback {
@ChainLog(
linkChainLog = CHAIN_LINK_LOG_CONNECT_STATUS,
linkCode = CHAIN_LINK_CLOUD,
endpoint = PAD,
nodeAliasCode = CHAIN_ALIAS_CODE_CLOUD_PASSPORT_TOKEN,
paramIndexes = [0, 1],
clientPkFileName = "sn"
)
override fun onTokenGot(token: String, sn: String) {
clientConfig.token = token
// 由于存在token过期问题在更新后会回调至此处增加二次判定
@@ -181,6 +192,14 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
}
}
@ChainLog(
linkChainLog = CHAIN_LINK_LOG_CONNECT_STATUS,
linkCode = CHAIN_LINK_CLOUD,
endpoint = PAD,
nodeAliasCode = CHAIN_ALIAS_CODE_CLOUD_PASSPORT_ERROR,
paramIndexes = [1],
clientPkFileName = "sn"
)
override fun onError(code: Int, msg: String) {
CallerLogger.d(
"$M_MAIN$TAG",
@@ -335,4 +354,5 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
HttpDnsSimpleLocation("010", 1.0, 1.0)
}
}
}

View File

@@ -96,7 +96,7 @@ object FunctionBuildConfig {
*/
@Volatile
@JvmField
var isObuWarningFusionUnion = false
var isObuWarningFusionUnion = true
/**
* 当前APP的身份模式

View File

@@ -60,6 +60,8 @@ class ChainConstant {
const val CHAIN_ALIAS_CODE_APP_INFO_CONFIG_UPDATE = "CHAIN_ALIAS_CODE_APP_INFO_CONFIG_UPDATE"
const val CHAIN_ALIAS_CODE_FUNC_CONFIG_CHANGED = "CHAIN_ALIAS_CODE_FUNC_CONFIG_CHANGED"
const val CHAIN_ALIAS_CODE_CLOUD_PASSPORT_TOKEN = "CHAIN_ALIAS_CODE_CLOUD_PASSPORT_TOKEN"
const val CHAIN_ALIAS_CODE_CLOUD_PASSPORT_ERROR = "CHAIN_ALIAS_CODE_CLOUD_PASSPORT_ERROR"
const val CHAIN_ALIAS_CODE_CLOUD_CONNECT_FAIL = "CHAIN_ALIAS_CODE_CLOUD_CONNECT_FAIL"
const val CHAIN_ALIAS_CODE_CLOUD_CONNECT_SUCCESS = "CHAIN_ALIAS_CODE_CLOUD_CONNECT_SUCCESS"
const val CHAIN_ALIAS_CODE_CLOUD_RECONNECT = "CHAIN_ALIAS_CODE_CLOUD_RECONNECT"

View File

@@ -1,7 +1,6 @@
package com.mogo.eagle.core.function.api.obu
import com.mogo.eagle.core.data.traffic.TrafficData
import mogo.telematics.pad.MessagePad
/**
* @author xiaoyuzhou
@@ -17,13 +16,6 @@ interface IMoGoObuStatusListener {
}
/**
* obu Tracker data
*/
fun updateTrackerFusionData(trackObject: MessagePad.TrackedObject?){
}
/**
* 更新obu Tracker 预警信息
*/

View File

@@ -1,5 +1,6 @@
package com.mogo.eagle.core.function.call.autopilot
import com.mogo.commons.debug.DebugConfig
import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
@@ -99,7 +100,13 @@ object CallerChassisLocationGCJ02ListenerManager : CallerBase<IMoGoChassisLocati
// 记录最后一次回调时间
M_LISTENERS_HZ_LAST_SEND_TIME[tag] = TimeUtils.getNowMills()
val listener = it.value
listener.onChassisLocationGCJ02(mogoLocation)
if (DebugConfig.isDebug()) {
val timeStampTemp = TimeUtils.getNowMills()
listener.onChassisLocationGCJ02(mogoLocation)
Logger.e(TAG, "Tag:${tag},其处理定位的时间为:${TimeUtils.getNowMills() - timeStampTemp}")
} else {
listener.onChassisLocationGCJ02(mogoLocation)
}
// FileUtils.writeToFile(
// "/sdcard/Download/",
// "location_gcj02.txt",

View File

@@ -20,13 +20,6 @@ object CallerObuWarningListenerManager : CallerBase<IMoGoObuStatusListener>() {
}
}
fun invokeTrackerFusionData(trackObject: MessagePad.TrackedObject?){
M_LISTENERS.forEach {
val listener = it.value
listener.updateTrackerFusionData(trackObject)
}
}
fun invokeTrackerWarningInfo(trafficData: TrafficData) {
M_LISTENERS.forEach {
val listener = it.value

View File

@@ -53,11 +53,24 @@ public class AIAssist {
private AIAssist(Context context) {
try {
// 暂时换成反射,解决死锁问题
// TODO:("支持切换思必驰和科大讯飞")
Class<?> clazz = Class.forName("com.mogo.tts.pad.PadTTS");
// Class<?> clazz = Class.forName("com.mogo.tts.iflytek.IFlyTekTts");
mTTS = (IMogoTTS) clazz.getConstructor().newInstance();
mTTS.init(context);
Class<?> clazz1 = null;
Class<?> clazz2 = null;
try {
clazz1 = Class.forName("com.mogo.tts.pad.PadTTS");
} catch (Exception ignored) {}
try {
clazz2 = Class.forName("com.mogo.tts.iflytek.IFlyTekTts");
} catch (Exception ignored) {}
if (clazz1 != null) {
mTTS = (IMogoTTS) clazz1.getConstructor().newInstance();
} else if (clazz2 != null) {
mTTS = (IMogoTTS) clazz2.getConstructor().newInstance();
}
if (mTTS != null) {
mTTS.init(context);
}
// mTTS = (IMogoTTS) ARouter.getInstance().build(MogoTTSConstants.API_PATH).navigation(context.getApplicationContext());
} catch (Exception e) {
e.printStackTrace();
@@ -104,7 +117,7 @@ public class AIAssist {
*/
public void speakTTSVoice(String text) {
if (mTTS != null) {
mTTS.speakTTSVoice(text);
mTTS.speakTTSVoiceWithLevel(text, LEVEL0);
}
}

View File

@@ -66,23 +66,23 @@ SERVICE_BIZ_VERSION=1.2.4
LOGLIB_VERSION=1.5.11
######## MogoAiCloudSDK Version ########
# 网络请求LOGLIB_VERSION
MOGO_NETWORK_VERSION=1.4.4.8
MOGO_NETWORK_VERSION=1.4.4.9
# 鉴权
MOGO_PASSPORT_VERSION=1.4.4.8
MOGO_PASSPORT_VERSION=1.4.4.9
# 常链接
MOGO_SOCKET_VERSION=1.4.4.8
MOGO_SOCKET_VERSION=1.4.4.9
# 数据采集
MOGO_REALTIME_VERSION=1.4.4.8
MOGO_REALTIME_VERSION=1.4.4.9
# 探路,道路事件发布,获取
MOGO_TANLU_VERSION=1.4.4.8
MOGO_TANLU_VERSION=1.4.4.9
# 直播推流
MOGO_LIVE_VERSION=1.4.4.8
MOGO_LIVE_VERSION=1.4.4.9
# 直播拉流
MOGO_TRAFFICLIVE_VERSION=1.4.4.8
MOGO_TRAFFICLIVE_VERSION=1.4.4.9
# 定位服务
MOGO_LOCATION_VERSION=1.4.4.8
MOGO_LOCATION_VERSION=1.4.4.9
# 远程通讯模块
MOGO_TELEMATIC_VERSION=1.4.4.8
MOGO_TELEMATIC_VERSION=1.4.4.9
######## MogoAiCloudSDK Version ########
# 自研地图
MAP_SDK_VERSION=2.10.0.9

View File

@@ -3,7 +3,6 @@ package com.zhidao.support.adas.high.common.autopilot.ability;
import android.os.Handler;
import android.os.Message;
import android.text.TextUtils;
import android.util.Log;
import com.zhidao.support.adas.high.AdasManager;
import com.zhidao.support.adas.high.OnAdasListener;
@@ -88,7 +87,7 @@ public class AutopilotAbilityManager {
if (version != -1) {
stopTimer();
dockerVersion = version;
Log.i("dddd", "工控机版本=" + dockerVersion);
CupidLogUtils.i(TAG, "工控机版本=" + dockerVersion);
initAutopilotAbility();
}
}

View File

@@ -3,7 +3,6 @@ package com.mogo.map;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Point;
import android.util.Log;
import android.util.Pair;
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
@@ -126,9 +125,6 @@ public class AMapWrapper implements IMogoMap {
MarkerSimpleData markerOptions = ObjectUtils.fromTrafficData(trackedObject);
if (markerOptions != null) {
markerOptionsArrayList.add(markerOptions);
if(markerOptions.id == 65061){
Log.i("emArrow","time :" + markerOptions.time + " , lat : " + markerOptions.lat + " , lon : " + markerOptions.lon);
}
}
});
long time = markerOptionsArrayList.get(0).getTime();

View File

@@ -86,9 +86,12 @@ class IFlyTekTts : IMogoTTS, InitListener {
}
override fun speakTTSVoiceWithLevel(tts: String?, level: Int) {
speakTTSVoiceWithLevel(tts, level, null)
}
override fun speakTTSVoiceWithLevel(tts: String?, level: Int, callBack: IMogoTTSCallback?) {
if (tts.isNullOrEmpty()) return
speakMultiLangTTSWithLevel(MultiLangTtsEntity(listOf(LangTtsEntity(tts, LanguageType.CHINESE))), level, callBack)
}
override fun speakMultiLangTTSWithLevel(