Merge branch 'dev_robotaxi-d_240912_6.7.0' of gitlab.zhidaoauto.com:SCA/L4HA/AndroidApp/MoGoEagleEye into dev_robotaxi-d_240912_6.7.0

This commit is contained in:
aibingbing
2024-09-25 17:33:55 +08:00
94 changed files with 2106 additions and 363 deletions

View File

@@ -59,5 +59,7 @@ class OchCommonConst {
// 自动驾驶自动规划的最大距离
const val AUTOMATIC_PLANNING_MAX_DISTANCE = 15
const val ARRIVE_AT_END_STATION_DISTANCE = 10
}
}

View File

@@ -95,7 +95,6 @@ object OchAutoPilotManager : IMoGoReceiveReceivedAckListener, IMoGoFsm2024Listen
@JvmStatic
fun startAutoPilot(controlParameters: AutopilotControlParameters?): Long {
val sessionId = CallerAutoPilotControlManager.startAutoPilot(controlParameters)
LineManager.isReStartAutopilot = false
globalSessionId.set(sessionId)
fsmBackSessionId.set(-1L)
OchAutopilotAnalytics.triggerStartAutopilotParameters(controlParameters, sessionId)

View File

@@ -6,11 +6,13 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.util.StringUtils
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.och.common.module.R
import com.mogo.och.common.module.manager.autopilot.autopilot.bean.ArrivedStation
import com.mogo.och.common.module.manager.autopilot.line.LineManager
import com.mogo.och.common.module.manager.autopilot.trajectory.TrajectoryManager
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
import com.mogo.och.common.module.utils.CallerBase
import com.zhjt.mogo.adas.data.AdasConstants
import com.zhjt.mogo.adas.data.bean.MogoReport
@@ -51,10 +53,12 @@ object OchAutoPilotStatusListenerManager : CallerBase<IOchAutopilotStatusListene
LineManager.triggerStartServiceEvent(true, 0)
}
M_LISTENERS.forEach {
val listener = it.value
listener.onAutopilotStatusResponse(newValue)
}
LineManager.searchAutopilotState()
}
}
val autopilotState:Int
@@ -93,15 +97,6 @@ object OchAutoPilotStatusListenerManager : CallerBase<IOchAutopilotStatusListene
}
}
override fun onAutopilotArriveAtStation(arrivalNotification: MessagePad.ArrivalNotification?) {
super.onAutopilotArriveAtStation(arrivalNotification)
val trasform = ArrivedStation.trasform(arrivalNotification)
M_LISTENERS.forEach {
val listener = it.value
listener.onAutopilotArriveAtStation(trasform)
}
}
override fun onAutopilotSNRequest(basicInfoReq: MessagePad.BasicInfoReq) {
super.onAutopilotSNRequest(basicInfoReq)
M_LISTENERS.forEach {
@@ -196,6 +191,7 @@ object OchAutoPilotStatusListenerManager : CallerBase<IOchAutopilotStatusListene
override fun onAutopilotStatusResponseFromCan(state: Int) {
super.onAutopilotStatusResponseFromCan(state)
LineManager.searchAutopilotState()
M_LISTENERS.forEach {
val listener = it.value
listener.onAutopilotStatusResponseFromCan(state)
@@ -206,4 +202,36 @@ object OchAutoPilotStatusListenerManager : CallerBase<IOchAutopilotStatusListene
}
}
}
override fun onAutopilotArriveAtStation(arrivalNotification: MessagePad.ArrivalNotification?) {
super.onAutopilotArriveAtStation(arrivalNotification)
val trasform = ArrivedStation.trasform(arrivalNotification)
M_LISTENERS.forEach {
val listener = it.value
listener.onAutopilotArriveAtStation(trasform)
}
}
override fun onAutoPilotStation(
token: Long,
timestamp: Long,
autoPilotStation: SsmInfo.AutoPilotStation?
) {
OchChainLogManager.writeChainLogAutopilot("到站逻辑",
"token:$token 通过主动查询到站底盘传递:${autoPilotStation?.orderId}_${autoPilotStation?.arrivedStationFlag}")
autoPilotStation?.let {
if (it.hasOrderId() && !StringUtils.isEmpty(it.orderId)&&it.hasArrivedStationFlag()) {
LineManager.invokeArrivedStation(it.orderId,it.arrivedStationFlag)
}
}
}
override fun onAutoPilotInfo(token: Long, timestamp: Long, autoPilotInfo: SsmInfo.AutoPilotInfo?) {
OchChainLogManager.writeChainLogAutopilot("自驾状态",
"token:$token 通过主动查询到站底盘传递:${autoPilotInfo?.orderId}_第一次启动自驾${autoPilotInfo?.firstAutopilotFlag}_次数${autoPilotInfo?.count}")
autoPilotInfo?.let {
if (it.hasOrderId() && !StringUtils.isEmpty(it.orderId)) {
LineManager.invokeSetIsFirstAutopilot(it.orderId,it.firstAutopilotFlag,it.count)
}
}
}
}

View File

@@ -12,4 +12,6 @@ public interface ILineCallback {
default void startAutopilotTimeOut(){}
default void startAutopilotFailure(String startFailedCode,String startFailedMessage){}
default void arrivedStationSuccessBySearch(){}
}

View File

@@ -8,6 +8,7 @@ import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters.AutoPilotLi
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters.AutoPilotLonLat
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.map.CallerMapGlobalTrajectoryDrawManager
@@ -15,12 +16,15 @@ import com.mogo.eagle.core.function.call.order.CallerOrderListenerManager
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.e
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_BUS
import com.mogo.eagle.core.utilcode.util.CoordinateUtils
import com.mogo.eagle.core.utilcode.util.StringUtils
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.och.common.module.constant.OchCommonConst
import com.mogo.och.common.module.manager.autopilot.OCHAdasAbilityManager
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotManager
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotManager.startAutoPilot
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics
import com.mogo.och.common.module.manager.autopilot.location.OchLocationManager
import com.mogo.och.common.module.manager.distance.TrajectoryAndDistanceManager
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
import com.mogo.och.common.module.utils.CallerBase
@@ -64,14 +68,54 @@ object LineManager : CallerBase<ILineCallback>() {
*/
private var endStation: BusStationBean? = null
var isReStartAutopilot = true
var isFirstStartAutopilot = true
private var orderId = ""
// 自车定位
private val mMapLocationListener = object : IMoGoChassisLocationGCJ02Listener {
override fun onChassisLocationGCJ02(mogoLocation: MogoLocation?) {
if (null == mogoLocation) return
getStations { start, end ->
val startLon = end.gcjLon
val startLat = end.gcjLat
val distance = CoordinateUtils.calculateLineDistance(
startLon, startLat,
mogoLocation.longitude, mogoLocation.latitude
)
if (distance <= OchCommonConst.ARRIVE_AT_END_STATION_DISTANCE) {
val token = CallerAutoPilotControlManager.sendSsmFuncQueryAutoPilotStation(orderId)
OchChainLogManager.writeChainLogAutopilot("到站逻辑","距离站点:$distance 请求token$token")
}
}
}
}
fun invokeArrivedStation(orderId: String, arrivedStationFlag: Boolean) {
if (this.orderId==orderId&&arrivedStationFlag){
M_LISTENERS.forEach {
it.value.arrivedStationSuccessBySearch()
}
}
}
fun invokeSetIsFirstAutopilot(orderId: String?, firstAutopilotFlag: Boolean, count: Int) {
if (this.orderId==orderId){
if(count>=1){
isFirstStartAutopilot = false
}else{
isFirstStartAutopilot = true
}
}
}
/**
* 设置站点信息
*/
fun setStartAndEndStation(startStation: BusStationBean?, endStation: BusStationBean?) {
if(this.startStation!=startStation||this.endStation!=endStation){
isReStartAutopilot = true
isFirstStartAutopilot = true
}
this.startStation = startStation
this.endStation = endStation
@@ -197,11 +241,19 @@ object LineManager : CallerBase<ILineCallback>() {
endStationLocation.latitude = end.gcjLat
endStationLocation.longitude = end.gcjLon
TrajectoryAndDistanceManager.setStationPoint(startStationLocation, endStationLocation, lineInfo.lineId)
OchLocationManager.addGCJ02Listener(TAG,1,mMapLocationListener)
// 恢复启动自驾信息
searchAutopilotState()
}
}
fun searchAutopilotState(){
CallerAutoPilotControlManager.sendSsmFuncQueryAutoPilotInfo()
}
private fun clearAutopilotControlParameters(){
CallerAutoPilotStatusListenerManager.updateAutopilotControlParameters(null)
TrajectoryAndDistanceManager.setStationPoint(null, null, null)
this.orderId = ""
OchLocationManager.removeGCJ02Listener(TAG)
}
fun hasDrawnGlobalTrajectory(): Boolean {
@@ -245,6 +297,9 @@ object LineManager : CallerBase<ILineCallback>() {
parameters?.startLatLon = AutoPilotLonLat(start.lat, start.lon)
parameters?.endLatLon = AutoPilotLonLat(end.lat, end.lon)
parameters?.vehicleType = 10
this.orderId = "${lineInfo.lineId}_${start.siteId}_${end.siteId}"
parameters?.orderId = this.orderId
parameters?.firstAutopilotFlag = isFirstStartAutopilot
if (parameters?.autoPilotLine == null) {
parameters?.autoPilotLine = AutoPilotLine(
@@ -334,7 +389,7 @@ object LineManager : CallerBase<ILineCallback>() {
M_BUS + TAG,
"行程日志-开启自动驾驶====" + GsonUtil.jsonFromObject(parameters)
+ " startLatLon=" + parameters.startName + "endLatLon=" + parameters.endName +
"isRestart = " + LineManager.isReStartAutopilot
"isRestart = " + LineManager.isFirstStartAutopilot
)
M_LISTENERS.forEach {
@@ -354,7 +409,7 @@ object LineManager : CallerBase<ILineCallback>() {
fun triggerStartServiceEvent(send: Boolean,source:Int) {
getStationsWithLine { start, end, lineInfo ->
OchAutopilotAnalytics.triggerStartAutopilotEvent(
isReStartAutopilot,
isFirstStartAutopilot,
send,
start.name,
end.name,

View File

@@ -18,6 +18,7 @@ import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.mogo.och.common.module.biz.login.LoginStatusManager
import com.mogo.och.common.module.manager.autopilot.autopilot.bean.ArrivedStation
import com.mogo.och.common.module.manager.autopilot.line.ILineCallback
import com.mogo.och.common.module.manager.autopilot.line.LineManager
import com.mogo.och.common.module.manager.autopilot.location.OchLocationManager
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
@@ -71,8 +72,8 @@ object OrderModel {
// 加载核销模块
TicketModel.load()
// 定位监听
OchLocationManager.addGCJ02Listener(TAG, 5, mMapLocationListener)
LineManager.addListener(TAG,arriveStationBySearch)
OchTransform.addListener(TAG,ochTransform)
@@ -87,7 +88,7 @@ object OrderModel {
TicketModel.release()
OchLocationManager.removeGCJ02Listener(TAG)
LineManager.removeListener(TAG)
OchTransform.removeListener(TAG)
}
@@ -105,34 +106,17 @@ object OrderModel {
// 自车定位
private val mMapLocationListener = object : IMoGoChassisLocationGCJ02Listener {
override fun onChassisLocationGCJ02(mogoLocation: MogoLocation?) {
if (null == mogoLocation) return
private val arriveStationBySearch = object : ILineCallback {
override fun arrivedStationSuccessBySearch() {
//是否到站的围栏判断 离站状态并且自动驾驶还未触发到站
if (isGoingToNextStation && !isArrivedStation) {
OCHThreadPoolManager.getsInstance().locationExecute {
judgeArrivedStation(mogoLocation)
onArriveAt(null, "兜底:根据定位计算到站")
}
}
}
}
//根据围栏判断,是否到达站点
private fun judgeArrivedStation(location: MogoLocation) {
LineManager.getStations { start, end ->
val startLon = end.gcjLon
val startLat = end.gcjLat
val distance = CoordinateUtils.calculateLineDistance(
startLon, startLat,
location.longitude, location.latitude
)
if (distance <= BusConst.ARRIVE_AT_END_STATION_DISTANCE) {
d(M_BUS + TAG, "行程日志-judgeArrivedStation() distance = $distance to ${end.name}")
onArriveAt(null, "兜底:根据定位计算到站")
}
}
}
/**
* 查询小巴路线

View File

@@ -36,7 +36,6 @@ import com.mogo.map.listener.IMogoMapListener;
import com.mogo.och.common.module.utils.ResourcesUtils;
import com.mogo.och.common.module.wigets.map.orderstatus.OrderStatusView;
import com.mogo.och.common.module.wigets.map.overmapview.OverMapDialog;
import com.mogo.och.common.module.wigets.map.switchvisual.VisualViewDirver;
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager;
import com.mogo.och.taxi.R;
@@ -60,11 +59,11 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
private FrameLayout flNaviPanelContainer;
private MapRoamView mapRoamView;
private Group groupTestPanel;
private FrameLayout mSpeedView;
// private FrameLayout mSpeedView;
private ImageView mAutopilotImage;
private TextView mAutopilotTv;
private ImageView mCloseNaviIcon;
protected VisualViewDirver visualViewDirver;
// protected VisualViewDirver visualViewDirver;
protected TaxiAmapNaviFragment ochAmapNaviFragment = null;
protected TaxiRottingNaviFragment taxiRottingNaviFragment = null;
@@ -90,15 +89,15 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
mAutopilotImage = findViewById(R.id.module_och_autopilot_iv);
mAutopilotTv = findViewById(R.id.module_och_autopilot_tv);
flStationPanelContainer = findViewById(R.id.module_mogo_och_station_panel_container);
visualViewDirver = findViewById(R.id.vvd_change_angle);
// visualViewDirver = findViewById(R.id.vvd_change_angle);
mSpeedView = findViewById(R.id.taxi_speed_contain);
if (mSpeedView != null) {
CallerDevaToolsManager.INSTANCE.attachAutopilotBeforeLaunchView(mSpeedView.getContext(), mSpeedView);
}
// mSpeedView = findViewById(R.id.taxi_speed_contain);
// if (mSpeedView != null) {
// CallerDevaToolsManager.INSTANCE.attachAutopilotBeforeLaunchView(mSpeedView.getContext(), mSpeedView);
// }
mCloseNaviIcon = findViewById(R.id.taxi_close_navi_icon);
flNaviPanelContainer = findViewById(R.id.module_mogo_och_navi_panel_container);
mSpeedView.setLongClickable(true); //调试按钮任意模式下都开
// mSpeedView.setLongClickable(true); //调试按钮任意模式下都开
tvOperationStatus = findViewById(R.id.module_mogo_och_operation_status);
mDriverRole = findViewById(R.id.taxi_driver_role_tv);
@@ -120,14 +119,14 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
});
// debug下调用测试面板 长按速度值 任意模式下调试都打开
mSpeedView.setOnLongClickListener(v -> {
if (groupTestPanel.getVisibility() == View.VISIBLE) {
groupTestPanel.setVisibility(View.GONE);
} else {
groupTestPanel.setVisibility(View.VISIBLE);
}
return false;
});
// mSpeedView.setOnLongClickListener(v -> {
// if (groupTestPanel.getVisibility() == View.VISIBLE) {
// groupTestPanel.setVisibility(View.GONE);
// } else {
// groupTestPanel.setVisibility(View.VISIBLE);
// }
// return false;
// });
CallerHmiViewControlListenerManager.INSTANCE.invokeMainPageViewVisible(View.VISIBLE);
onAutopilotStatusChanged(CallerAutoPilotStatusListenerManager.INSTANCE.getState(), CallerAutoPilotControlManager.INSTANCE.isCanStartAutopilot(false, 0));
@@ -233,7 +232,6 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
mapContainerLayout = null;
mapRoamView = null;
groupTestPanel = null;
mSpeedView = null;
mAutopilotImage = null;
mAutopilotTv = null;
mCloseNaviIcon = null;
@@ -401,13 +399,13 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
public void run() {
if(flStationPanelContainer!=null) {
flStationPanelContainer.setVisibility(View.GONE);
ConstraintLayout.LayoutParams layoutParams = (ConstraintLayout.LayoutParams) visualViewDirver.getLayoutParams();
layoutParams.startToStart = ConstraintLayout.LayoutParams.PARENT_ID;
layoutParams.bottomToTop = R.id.toolsView;
if (getContext() != null) {
layoutParams.setMarginStart(AutoSizeUtils.dp2px(getContext(), 29));
}
visualViewDirver.setLayoutParams(layoutParams);
// ConstraintLayout.LayoutParams layoutParams = (ConstraintLayout.LayoutParams) visualViewDirver.getLayoutParams();
// layoutParams.startToStart = ConstraintLayout.LayoutParams.PARENT_ID;
// layoutParams.bottomToTop = R.id.toolsView;
// if (getContext() != null) {
// layoutParams.setMarginStart(AutoSizeUtils.dp2px(getContext(), 29));
// }
// visualViewDirver.setLayoutParams(layoutParams);
}
}
},UiThreadHandler.MODE.QUEUE);
@@ -419,13 +417,13 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
public void run() {
if(flStationPanelContainer!=null) {
flStationPanelContainer.setVisibility(View.VISIBLE);
ConstraintLayout.LayoutParams layoutParams = (ConstraintLayout.LayoutParams) visualViewDirver.getLayoutParams();
layoutParams.startToStart = ConstraintLayout.LayoutParams.PARENT_ID;
layoutParams.bottomToTop = R.id.toolsView;
if (getContext() != null) {
layoutParams.setMarginStart(AutoSizeUtils.dp2px(getContext(), 618));
}
visualViewDirver.setLayoutParams(layoutParams);
// ConstraintLayout.LayoutParams layoutParams = (ConstraintLayout.LayoutParams) visualViewDirver.getLayoutParams();
// layoutParams.startToStart = ConstraintLayout.LayoutParams.PARENT_ID;
// layoutParams.bottomToTop = R.id.toolsView;
// if (getContext() != null) {
// layoutParams.setMarginStart(AutoSizeUtils.dp2px(getContext(), 618));
// }
// visualViewDirver.setLayoutParams(layoutParams);
}
}
},UiThreadHandler.MODE.QUEUE);

View File

@@ -219,14 +219,14 @@
app:layout_constraintTop_toBottomOf="@+id/module_mogo_och_autopilot_status"
tools:visibility="visible" />
<com.mogo.och.common.module.wigets.map.switchvisual.VisualViewDirver
android:id="@+id/vvd_change_angle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_618"
android:layout_marginBottom="@dimen/dp_48"
app:layout_constraintBottom_toTopOf="@+id/toolsView"
app:layout_constraintStart_toStartOf="parent" />
<!-- <com.mogo.och.common.module.wigets.map.switchvisual.VisualViewDirver-->
<!-- android:id="@+id/vvd_change_angle"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginStart="@dimen/dp_618"-->
<!-- android:layout_marginBottom="@dimen/dp_48"-->
<!-- app:layout_constraintBottom_toTopOf="@+id/toolsView"-->
<!-- app:layout_constraintStart_toStartOf="parent" />-->
<com.mogo.och.common.module.wigets.map.orderstatus.OrderStatusView
@@ -377,20 +377,6 @@
<!-- app:layout_constraintStart_toStartOf="@+id/smallMapView" />-->
<!-- TODO:"挪到ExchangeChildLayout中去" -->
<!-- <com.mogo.eagle.core.function.hmi.ui.viewport.VisualAngleToggleView-->
<!-- android:id="@+id/visualAngleToggle"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- app:layout_constraintEnd_toEndOf="parent"-->
<!-- app:layout_constraintBottom_toTopOf="@+id/smallMapView"-->
<!-- android:layout_marginEnd="@dimen/dp_50"-->
<!-- android:layout_marginBottom="@dimen/dp_30"/>-->
<!-- <com.mogo.eagle.core.function.hmi.ui.mofang.MoFangStatusView-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- app:layout_constraintTop_toTopOf="@+id/visualAngleToggle"-->
<!-- app:layout_constraintEnd_toStartOf="@+id/visualAngleToggle"/>-->
<com.mogo.och.common.module.wigets.LoadingMapStatusView
android:layout_width="match_parent"
@@ -411,13 +397,4 @@
android:elevation="100dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<!-- 运营面板 -->
<ViewStub
android:id="@+id/vsOperateView"
android:layout_width="@dimen/dp_1000"
android:layout_height="match_parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -58,12 +58,12 @@ class V2NTest {
if (millis > 0) {
delay(millis)
}
FunctionBuildConfig.isNewV2NData = true
FunctionBuildConfig.v2nMainSwitch = true
FunctionBuildConfig.v2nNewLinked = true
FunctionBuildConfig.v2nTotalSwitch = true
runCatching {
val map = HashMap<String, Boolean>().also {
it["f1"] = FunctionBuildConfig.v2nMainSwitch
it["f2"] = FunctionBuildConfig.isNewV2NData
it["f1"] = FunctionBuildConfig.v2nTotalSwitch
it["f2"] = FunctionBuildConfig.v2nNewLinked
}
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.V2N_NEW_LINK_SWITCH, GsonUtils.toJson(map).toByteArray())
}
@@ -99,12 +99,12 @@ class V2NTest {
if (millis > 0) {
delay(millis)
}
FunctionBuildConfig.isNewV2NData = true
FunctionBuildConfig.v2nMainSwitch = true
FunctionBuildConfig.v2nNewLinked = true
FunctionBuildConfig.v2nTotalSwitch = true
runCatching {
val map = HashMap<String, Boolean>().also {
it["f1"] = FunctionBuildConfig.v2nMainSwitch
it["f2"] = FunctionBuildConfig.isNewV2NData
it["f1"] = FunctionBuildConfig.v2nTotalSwitch
it["f2"] = FunctionBuildConfig.v2nNewLinked
}
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.V2N_NEW_LINK_SWITCH, GsonUtils.toJson(map).toByteArray())
}
@@ -179,12 +179,12 @@ class V2NTest {
}
val newPoint = DrivingDirectionUtils.calculateNewPoint(car.longitude, car.latitude, car.heading , 200.0)
Log.d(TAG, "获取到路口数据..., 自车:[${car.longitude}, ${car.latitude}]前方200米外的点: [${newPoint.first}, ${newPoint.second}]")
FunctionBuildConfig.isNewV2NData = true
FunctionBuildConfig.v2nMainSwitch = true
FunctionBuildConfig.v2nNewLinked = true
FunctionBuildConfig.v2nTotalSwitch = true
runCatching {
val map = HashMap<String, Boolean>().also {
it["f1"] = FunctionBuildConfig.v2nMainSwitch
it["f2"] = FunctionBuildConfig.isNewV2NData
it["f1"] = FunctionBuildConfig.v2nTotalSwitch
it["f2"] = FunctionBuildConfig.v2nNewLinked
}
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.V2N_NEW_LINK_SWITCH, GsonUtils.toJson(map).toByteArray())
}
@@ -211,12 +211,12 @@ class V2NTest {
if (millis > 0) {
delay(millis)
}
FunctionBuildConfig.isNewV2NData = true
FunctionBuildConfig.v2nMainSwitch = true
FunctionBuildConfig.v2nNewLinked = true
FunctionBuildConfig.v2nTotalSwitch = true
runCatching {
val map = HashMap<String, Boolean>().also {
it["f1"] = FunctionBuildConfig.v2nMainSwitch
it["f2"] = FunctionBuildConfig.isNewV2NData
it["f1"] = FunctionBuildConfig.v2nTotalSwitch
it["f2"] = FunctionBuildConfig.v2nNewLinked
}
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.V2N_NEW_LINK_SWITCH, GsonUtils.toJson(map).toByteArray())
}
@@ -261,12 +261,12 @@ class V2NTest {
if (millis > 0) {
delay(millis)
}
FunctionBuildConfig.isNewV2NData = true
FunctionBuildConfig.v2nMainSwitch = true
FunctionBuildConfig.v2nNewLinked = true
FunctionBuildConfig.v2nTotalSwitch = true
runCatching {
val map = HashMap<String, Boolean>().also {
it["f1"] = FunctionBuildConfig.v2nMainSwitch
it["f2"] = FunctionBuildConfig.isNewV2NData
it["f1"] = FunctionBuildConfig.v2nTotalSwitch
it["f2"] = FunctionBuildConfig.v2nNewLinked
}
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.V2N_NEW_LINK_SWITCH, GsonUtils.toJson(map).toByteArray())
}

View File

@@ -118,7 +118,7 @@ class FuncBizProvider : IMoGoFuncBizProvider {
}
override fun queryV2XEvents() {
if (V2NCarTypeCheck.verifyCarType() && (!FunctionBuildConfig.v2nMainSwitch || !FunctionBuildConfig.isNewV2NData)) {
if (V2NCarTypeCheck.verifyCarType() && (!FunctionBuildConfig.v2nTotalSwitch || !FunctionBuildConfig.v2nNewLinked)) {
v2xPoiLoader.queryWholeRoadEvents()
}
}

View File

@@ -107,7 +107,7 @@ object OverViewDataManager {
.observeOn(AndroidSchedulers.mainThread())
.subscribe {
it?.apply {
if (V2NCarTypeCheck.verifyCarType() && (!FunctionBuildConfig.v2nMainSwitch || !FunctionBuildConfig.isNewV2NData)) {
if (V2NCarTypeCheck.verifyCarType() && (!FunctionBuildConfig.v2nTotalSwitch || !FunctionBuildConfig.v2nNewLinked)) {
CallerFuncBizListenerManager.invokeV2XEvents(this)
}
}

View File

@@ -196,8 +196,8 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IV2XCallback,
}
is V2XEvent.RoadEventX -> {
val flag = verifyCarType()
Log.d("$M_V2X$TAG", "---- 收到ai云V2N事件 ---:${flag}, ${FunctionBuildConfig.v2nMainSwitch}, ${FunctionBuildConfig.isNewV2NData}")
if (flag && (!FunctionBuildConfig.v2nMainSwitch || !FunctionBuildConfig.isNewV2NData)) {
Log.d("$M_V2X$TAG", "---- 收到ai云V2N事件 ---:${flag}, ${FunctionBuildConfig.v2nTotalSwitch}, ${FunctionBuildConfig.v2nNewLinked}")
if (flag && (!FunctionBuildConfig.v2nTotalSwitch || !FunctionBuildConfig.v2nNewLinked)) {
// try {
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
Log.d("$M_V2X$TAG", "onAck -> 司机端: 将收到云端事件给到乘客端...")
@@ -210,7 +210,7 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IV2XCallback,
// }
handleRoadMarkerEvent(event.data.toRoadMarker())
} else{
V2XBizTrace.onAck("事件未触发,被开关拦截",mapOf("roadEvent" to event, "v2nMainSwitch" to FunctionBuildConfig.v2nMainSwitch,"isNewV2NData" to FunctionBuildConfig.isNewV2NData), true)
V2XBizTrace.onAck("事件未触发,被开关拦截",mapOf("roadEvent" to event, "v2nMainSwitch" to FunctionBuildConfig.v2nTotalSwitch,"isNewV2NData" to FunctionBuildConfig.v2nNewLinked), true)
}
}
else -> {

View File

@@ -45,7 +45,6 @@ import com.mogo.eagle.function.biz.v2x.v2n.utils.EventDismissBean
import com.mogo.eagle.function.biz.v2x.v2n.utils.EventDismissManager
import com.mogo.eagle.function.biz.v2x.v2n.utils.IEventDismissListener
import com.mogo.eagle.function.biz.v2x.v2n.utils.V2XEventAnalyticsManager
import com.mogo.map.entities.Lane
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.asCoroutineDispatcher
import kotlinx.coroutines.delay
@@ -484,42 +483,42 @@ internal object V2NIdentifyDrawer: IEventDismissListener {
}
private fun drawShiGong(events: List<TrackedObject>) {
if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) {
if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nTotalSwitch && FunctionBuildConfig.v2nNewLinked) {
handler.removeMessages(MSG_WHAT_DRAW_SHIGONE)
handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_SHIGONE, events))
}
}
private fun drawShiGu(events: List<TrackedObject>) {
if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) {
if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nTotalSwitch && FunctionBuildConfig.v2nNewLinked) {
handler.removeMessages(MSG_WHAT_DRAW_SHIGU)
handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_SHIGU, events))
}
}
private fun drawYongDu(events: List<MogoV2X.RTEData_PB>) {
if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) {
if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nTotalSwitch && FunctionBuildConfig.v2nNewLinked) {
handler.removeMessages(MSG_WHAT_DRAW_YONGDU)
handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_YONGDU, events))
}
}
private fun drawOtherRetrogradeVehicle(event: MessagePad.Event) {
if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) {
if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nTotalSwitch && FunctionBuildConfig.v2nNewLinked) {
handler.removeMessages(MSG_WHAT_DRAW_OTHER_RETROGRADE_VEHICLE)
handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_OTHER_RETROGRADE_VEHICLE, event))
}
}
private fun drawGreenWave(crossSpeed: V2nCrossSpeed) {
if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) {
if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nTotalSwitch && FunctionBuildConfig.v2nNewLinked) {
handler.removeMessages(MSG_WHAT_DRAW_GREEN_WAVE)
handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_GREEN_WAVE, crossSpeed))
}
}
private fun drawPeopleCross(event: MessagePad.Event) {
if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) {
if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nTotalSwitch && FunctionBuildConfig.v2nNewLinked) {
handler.removeMessages(MSG_WHAT_DRAW_PEOPLE_CROSS)
handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_PEOPLE_CROSS, event))
}

View File

@@ -68,7 +68,6 @@ import com.zhidao.support.adas.high.common.Constants
import com.zhidao.support.adas.high.common.CupidLogUtils
import com.zhjt.mogo.adas.common.MessageType
import com.zhjt.mogo.adas.common.power.PowerUnitChannel
import com.zhjt.mogo.adas.data.Adas
import com.zhjt.mogo.adas.data.AdasConstants
import com.zhjt.mogo.adas.data.bean.MogoReport
import com.zhjt.mogo.adas.data.bean.NodeStateInfo
@@ -1166,8 +1165,8 @@ class MoGoAutopilotControlProvider :
CallerLogger.d("$M_D_C$TAG", status)
runCatching {
val map = HashMap<String, Boolean>().also {
it["f1"] = FunctionBuildConfig.v2nMainSwitch
it["f2"] = FunctionBuildConfig.isNewV2NData
it["f1"] = FunctionBuildConfig.v2nTotalSwitch
it["f2"] = FunctionBuildConfig.v2nNewLinked
}
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.V2N_NEW_LINK_SWITCH, GsonUtils.toJson(map).toByteArray())
}

View File

@@ -149,8 +149,8 @@ class TeleMsgHandler : IMsgHandler {
val f1 = data["f1"] as Boolean
val f2 = data["f2"] as Boolean
Log.d(TAG, "乘客屏收到司机屏转发的新链路开关 --- 3 ---:$data, f1: $f1, f2:$f2")
FunctionBuildConfig.v2nMainSwitch = f1
FunctionBuildConfig.isNewV2NData = f2
FunctionBuildConfig.v2nTotalSwitch = f1
FunctionBuildConfig.v2nNewLinked = f2
} catch (t: Throwable) {
t.printStackTrace()
Log.e(TAG, "乘客屏收到司机屏转发的新链路开关异常", t)
@@ -270,11 +270,11 @@ class TeleMsgHandler : IMsgHandler {
TelematicConstant.OBU_RUNREDLIGHT_WARNING -> {
when (String(it.body)) {
"0" -> {
HmiBuildConfig.isShowRunRedLightView = false
HmiBuildConfig.v2iRedLightWarning = false
}
"1" -> {
HmiBuildConfig.isShowRunRedLightView = true
HmiBuildConfig.v2iRedLightWarning = true
}
}
}

View File

@@ -64,25 +64,25 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
}
override fun onMoGoObuRsiWarning(rsiWarningData: ObuScene.RsiWarningData) {
if (FunctionBuildConfig.v2xMainSwitch && HmiBuildConfig.isShowObuV2iView) {
if (FunctionBuildConfig.v2xTotalSwitch && HmiBuildConfig.v2iTotalSwitch) {
onMogoObuDcRsiWarning(rsiWarningData)
}
}
override fun onMoGoObuRsmWarning(rsmWarningData: ObuScene.RsmWarningData) {
if (FunctionBuildConfig.v2xMainSwitch && HmiBuildConfig.isShowObuV2iView) {
if (FunctionBuildConfig.v2xTotalSwitch && HmiBuildConfig.v2iTotalSwitch) {
onMogoObuDcRsmWarning(rsmWarningData)
}
}
override fun onMoGoObuSpatWarning(spatWarningData: ObuScene.SpatWarningData) {
if (FunctionBuildConfig.v2xMainSwitch && HmiBuildConfig.isShowObuV2iView) {
if (FunctionBuildConfig.v2xTotalSwitch && HmiBuildConfig.v2iTotalSwitch) {
onMogoObuDcSpatWarning(spatWarningData)
}
}
override fun onMoGoObuMapMath(mapMatchData: ObuScene.MapMatchData) {
if (FunctionBuildConfig.v2xMainSwitch && HmiBuildConfig.isShowObuV2iView) {
if (FunctionBuildConfig.v2xTotalSwitch && HmiBuildConfig.v2iTotalSwitch) {
onMogoObuMapMath(mapMatchData)
}
}
@@ -339,7 +339,7 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
* RSM预警信息 CvxPtcThreatIndInfo CvxPtcInfoIndInfo主车与弱势交通参与者之间的预警弱势交通参与者碰撞预警
*/
fun onMogoObuDcRsmWarning(rsmWarningData: ObuScene.RsmWarningData?) {
if (HmiBuildConfig.isShowObuWeaknessTrafficView) {
if (HmiBuildConfig.v2iWeaknessTraffic) {
CallerLogger.d(
"${M_OBU}${TAG}",
"MogoObuDcCombineManager onMogoObuRsmWarning ------> ${rsmWarningData.toString()}"
@@ -576,8 +576,8 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
}
1 -> { //闯红灯 V2I_RLVW_VIOLATION_TYPE_RUNNING_RED_LIGHT 一个红灯周期只显示一次
if(FunctionBuildConfig.v2xMainSwitch && HmiBuildConfig.isShowObuV2iView){
if (HmiBuildConfig.isShowRunRedLightView) {
if(FunctionBuildConfig.v2xTotalSwitch && HmiBuildConfig.v2iTotalSwitch){
if (HmiBuildConfig.v2iRedLightWarning) {
if (!isShowRunRedLight) {
isShowRunRedLight = true
ttsContent =
@@ -609,7 +609,7 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
}
2 -> { //绿波通行引导 V2I_RLVW_VIOLATION_TYPE_NO_VIOLATION 一个绿灯周期只显示一次
if (FunctionBuildConfig.v2xMainSwitch && FunctionBuildConfig.v2nMainSwitch && HmiBuildConfig.isShowGreenWaveView) {
if (FunctionBuildConfig.v2xTotalSwitch && FunctionBuildConfig.v2nTotalSwitch && HmiBuildConfig.isShowGreenWaveView) {
if (!isShowGreenWave) {
isShowGreenWave = true
CallerLogger.d(

View File

@@ -296,7 +296,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
* v2v预警信息 CvxRvInfoIndInfo CvxV2vThreatIndInfo 他车
*/
override fun onObuRvWarning(data: ObuScene.RvWarningData) {
if (FunctionBuildConfig.v2xMainSwitch && HmiBuildConfig.isShowObuV2vView) {
if (FunctionBuildConfig.v2xTotalSwitch && HmiBuildConfig.v2vTotalSwitch) {
if (data.warningMsg != null) {
// 更新数据远车数据之前要匹配uuid
data.vehBasicsMsg?.let {
@@ -343,7 +343,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
* 红绿灯预警信息 CvxIvpThreatIndInfo
*/
override fun onObuSpatWarning(data: ObuScene.SpatWarningData) {
if (FunctionBuildConfig.v2xMainSwitch && HmiBuildConfig.isShowObuV2iView) {
if (FunctionBuildConfig.v2xTotalSwitch && HmiBuildConfig.v2iTotalSwitch) {
handlerTrafficLight(
data.warningType,
data.status,
@@ -356,7 +356,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
* RSI预警信息 onMogoObuRsiWarning交通标志预警前方限速、前方学校等等交通事件预警前方拥堵、前方积水等等
*/
override fun onObuRsiWarning(data: ObuScene.RsiWarningData) {
if (FunctionBuildConfig.v2xMainSwitch && HmiBuildConfig.isShowObuV2iView) {
if (FunctionBuildConfig.v2xTotalSwitch && HmiBuildConfig.v2iTotalSwitch) {
if (data.warningMsgList != null && data.warningMsgList.size > 0) {
var alertContent = ""
var ttsContent = ""
@@ -643,8 +643,8 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
"onMogoObuRsmWarning ------> ${data?.toString()}"
)
if (FunctionBuildConfig.v2xMainSwitch && HmiBuildConfig.isShowObuV2iView) {
if (HmiBuildConfig.isShowObuWeaknessTrafficView) {
if (FunctionBuildConfig.v2xTotalSwitch && HmiBuildConfig.v2iTotalSwitch) {
if (HmiBuildConfig.v2iWeaknessTraffic) {
// 交通参与者类型 0x0:未知 UNKNOWN | 1机动车 2:非机动车 NON_MOTOR | 3:行人 PEDESTRIAN 4:obu
if (data != null && data.participant != null) {
val v2xType = when (data.participant.ptcType) {
@@ -736,7 +736,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
* 地图匹配 是OBU算法输出地图匹配结果主车匹配道路哪条路或者哪条车道
*/
override fun onObuMapMath(data: ObuScene.MapMatchData?) {
if (FunctionBuildConfig.v2xMainSwitch && HmiBuildConfig.isShowObuV2iView) {
if (FunctionBuildConfig.v2xTotalSwitch && HmiBuildConfig.v2iTotalSwitch) {
if (data != null) {
CallerLogger.d(
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
@@ -1056,8 +1056,8 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
}
1 -> {//闯红灯 V2I_RLVW_VIOLATION_TYPE_RUNNING_RED_LIGHT 一个红灯周期只显示一次
if(FunctionBuildConfig.v2xMainSwitch && HmiBuildConfig.isShowObuV2iView){
if (HmiBuildConfig.isShowRunRedLightView) {
if(FunctionBuildConfig.v2xTotalSwitch && HmiBuildConfig.v2iTotalSwitch){
if (HmiBuildConfig.v2iRedLightWarning) {
if (!isShowRunRedLight) {
isShowRunRedLight = true
ttsContent =

View File

@@ -34,7 +34,6 @@ import com.mogo.eagle.core.function.api.devatools.strict.IStrictModeProvider
import com.mogo.eagle.core.function.api.lookaround.IMoGoLookAroundProvider
import com.mogo.eagle.core.function.api.map.route.IMapRouteProvider
import com.mogo.eagle.core.function.api.upgrade.IMoGoUpgradeProvider
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
import com.mogo.eagle.core.utilcode.kotlin.lifeCycleScope
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
@@ -84,10 +83,8 @@ import com.zhjt.mogo_core_function_devatools.weaknetwork.DetectResultImpl
import com.zhjt.mogo_core_function_devatools.weaknetwork.WeakNetworkStrategy
import com.zhjt.mogo_core_function_devatools.workorder.WorkOrderManager
import com.zhjt.service.chain.ChainLog
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import java.io.File
import java.lang.ref.WeakReference
import java.util.concurrent.ConcurrentHashMap
@@ -410,8 +407,8 @@ class DevaToolsProvider : IDevaToolsProvider, IAppStateListener {
/**
* 展示考试车辆控制窗口
*/
override fun showExamControlWindow(view: View,isShow: Boolean) {
ExamControlManager.showExamControlWindow(view,isShow)
override fun showExamControlWindow(isShow: Boolean) {
ExamControlManager.showExamControlWindow(isShow)
}
override fun onReceiveBadCaseRecord(

View File

@@ -1,14 +1,10 @@
package com.zhjt.mogo_core_function_devatools.exam
import android.annotation.SuppressLint
import android.view.View
import androidx.fragment.app.FragmentActivity
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.function.call.setting.CallerSopSettingManager
import com.mogo.eagle.core.utilcode.util.ClickUtils
import com.mogo.eagle.core.utilcode.util.NetworkUtils
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.zhjt.mogo_core_function_devatools.badcase.consts.BadCaseConfig
import com.mogo.eagle.core.utilcode.util.AppStateManager
/**
* 考试控制管理
@@ -21,9 +17,8 @@ internal object ExamControlManager {
/**
* 开启考试车辆控制窗口
*/
fun showExamControlWindow(view: View,isShow: Boolean){
val activity = view.context as? FragmentActivity
?: throw IllegalStateException("please ensure context is FragmentActivity.")
fun showExamControlWindow(isShow: Boolean){
val activity = AppStateManager.currentActivity() ?: return
if(examControlWindow == null){
examControlWindow = ExamControlWindow(activity)
}

View File

@@ -147,7 +147,7 @@ internal class MoGoLogRecordProviderImpl: IMoGoLogRecordProvider,
builder.crashConfig(
CrashConfig.Builder()
.enabled(true)
.uploader(CrashLogUploader())
// .uploader(CrashLogUploader())
.crashDir(File(context.getExternalFilesDir(null), "crash"))
.expireDuration(TimeUnit.DAYS.toMillis(3))
.javaCrash(true)

View File

@@ -13,6 +13,7 @@ import com.mogo.eagle.core.function.api.och.toolkit.IToolKitItemClickListener
import com.mogo.eagle.core.function.api.och.toolkit.ToolKitCustomItemAddParam
import com.mogo.eagle.core.function.api.och.toolkit.ToolKitDefaultItemAddParam
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.function.hmi.bone.toolkit.custom.ToolDriverRomaView
import com.mogo.eagle.core.function.hmi.bone.toolkit.custom.ToolRestartSystemView
@@ -161,7 +162,8 @@ object ToolKitDataManager : IToolKitItemClickListener {
ToolTypeEnum.OPERATION_PANEL.name -> {
ctx?.also {
SopView.sopView.toggle(it)
// SopView.sopView.toggle(it)
CallerHmiManager.toggleOperatePanel(true)
}
}

View File

@@ -11,6 +11,8 @@ import android.view.animation.AccelerateDecelerateInterpolator
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.constraintlayout.widget.ConstraintSet
import com.mogo.eagle.core.data.map.MogoLatLng
import com.mogo.eagle.core.function.api.order.IOrderListener
import com.mogo.eagle.core.function.call.order.CallerOrderListenerManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.function.hmi.util.ConstraintUtil
import com.mogo.eagle.core.utilcode.mogo.view.OnPreventFastClickListener
@@ -25,8 +27,9 @@ class MapContainerLayout @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : ConstraintLayout(context, attrs, defStyleAttr), IMogoMapListener {
) : ConstraintLayout(context, attrs, defStyleAttr), IMogoMapListener, IOrderListener {
@Volatile
private var isScaled = false
private var isPlayingAnim = false
private var constraintUtil: ConstraintUtil? = null
@@ -71,6 +74,7 @@ class MapContainerLayout @JvmOverloads constructor(
override fun onAttachedToWindow() {
super.onAttachedToWindow()
MogoMapListenerHandler.mogoMapListenerHandler.registerHostMapListener("${TAG}${this.hashCode()}",this)
CallerOrderListenerManager.addListener("${TAG}${this.hashCode()}", this)
}
override fun onDetachedFromWindow() {
@@ -90,6 +94,15 @@ class MapContainerLayout @JvmOverloads constructor(
super.onMapClick(latLng)
}
override fun onUpdateOrderStatus(inOrder: Boolean) {
super.onUpdateOrderStatus(inOrder)
if (!inOrder) {// 订单结束
if (isScaled) {// 行程总览地图
overMapView.clearAllMarkersAndPolyline()
}
}
}
private fun swapViewsWithAnim() {
if (isPlayingAnim) return
if (constraintUtil == null) {

View File

@@ -2,14 +2,15 @@ package com.mogo.eagle.core.function.hmi.ui
import android.content.Context
import android.text.TextUtils
import android.transition.Slide
import android.util.Log
import android.view.Gravity
import android.view.View
import android.view.ViewGroup
import android.view.WindowManager
import android.view.ViewStub
import androidx.lifecycle.ProcessLifecycleOwner
import androidx.lifecycle.lifecycleScope
import androidx.transition.Slide
import androidx.transition.TransitionManager
import com.alibaba.android.arouter.facade.annotation.Route
import com.mogo.commons.module.status.MogoStatusManager
import com.mogo.commons.voice.AIAssist
@@ -36,6 +37,7 @@ import com.mogo.eagle.core.function.api.och.toolkit.ToolKitDefaultItemAddParam
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
import com.mogo.eagle.core.function.call.v2x.CallerTurnLightListenerManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.function.hmi.bone.status.fsm.FSMStatusDetailWindowManager
import com.mogo.eagle.core.function.hmi.bone.toolkit.ToolKitDataManager
import com.mogo.eagle.core.function.hmi.ui.camera.RoadVideoDialog
@@ -66,8 +68,6 @@ import com.zhjt.service_biz.BizConfig
import kotlinx.coroutines.Job
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import me.jessyan.autosize.utils.AutoSizeUtils
import java.lang.ref.WeakReference
import java.util.concurrent.atomic.AtomicBoolean
import java.util.concurrent.atomic.AtomicReference
@@ -95,8 +95,6 @@ class MoGoHmiProvider : IMoGoHmiProvider {
private val xiaozhi by lazy { XiaoZhiStateManager() }
private val operatePanel by lazy { AtomicReference<WeakReference<MoGoPopWindow>>(null) }
override fun init(context: Context?) {
this.context = context
}
@@ -451,26 +449,22 @@ class MoGoHmiProvider : IMoGoHmiProvider {
return
}
if (show) {
if (operatePanel.get()?.get()?.isShowing() == true) {
return
var target = activity.findViewById<View>(R.id.id_operate_panel)
if (target == null) {
val vs = activity.findViewById<ViewStub>(R.id.vs_operate_panel) ?: throw AssertionError()
target = vs.inflate()
}
if (target != null && target.visibility != View.VISIBLE) {
TransitionManager.beginDelayedTransition(target.parent as ViewGroup, Slide(Gravity.START).also { it.duration = 150; it.addTarget(target) })
target.visibility = View.VISIBLE
target.post { target.bringToFront() }
}
MoGoPopWindow.Builder()
.attachToActivity(activity)
.gravityInActivity(Gravity.START or Gravity.TOP)
.contentView(OperatePanelLayout(activity))
.width(AutoSizeUtils.dp2px(activity, 1000.0f))
.height(WindowManager.LayoutParams.MATCH_PARENT)
.transition(Slide(Gravity.START), Slide(Gravity.START))
.onDismissed {
operatePanel.set(null)
}
.build()
.also {
operatePanel.set(WeakReference(it))
}
.show()
} else {
operatePanel.get()?.get()?.hide()
val operatePanelView = activity.findViewById<View>(R.id.id_operate_panel)
if (operatePanelView != null && operatePanelView.visibility == View.VISIBLE) {
TransitionManager.beginDelayedTransition(operatePanelView.parent as ViewGroup, Slide(Gravity.START).also { it.duration = 150; it.addTarget(operatePanelView) })
operatePanelView.visibility = View.GONE
}
}
}

View File

@@ -0,0 +1,69 @@
package com.mogo.eagle.core.function.hmi.ui.operate.preferences
import android.content.Context
import android.util.AttributeSet
import androidx.core.content.ContextCompat
import androidx.preference.Preference
import androidx.preference.PreferenceViewHolder
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.kotlin.onClick
class PreferenceWithMoFang: Preference {
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes)
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr)
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs)
constructor(context: Context) : super(context)
companion object {
const val KEY_CURRENT_CONNECT_STATUS = "key_mofang_connect_status"
}
enum class MoFangConnectStatus {
CONNECT_START,
CONNECTED,
CONNECTING
}
private var status: MoFangConnectStatus? = null
override fun setDefaultValue(defaultValue: Any?) {
super.setDefaultValue(defaultValue)
status = MoFangConnectStatus.values().find { it.ordinal == defaultValue }
notifyChanged()
}
fun updateStatus(status: MoFangConnectStatus) {
this.status = status
notifyChanged()
}
override fun onBindViewHolder(holder: PreferenceViewHolder) {
super.onBindViewHolder(holder)
val stats = this.status ?: return
val btConnect = holder.findViewById(R.id.bt_mofang)
btConnect.setOnClickListener(null)
when(stats) {
MoFangConnectStatus.CONNECT_START -> {
btConnect.isEnabled = true
btConnect.background = ContextCompat.getDrawable(holder.itemView.context, R.drawable.icon_operate_panel_mofang_connect_start)
btConnect.onClick {
extras.putInt(KEY_CURRENT_CONNECT_STATUS, stats.ordinal)
onPreferenceClickListener?.onPreferenceClick(this)
}
}
MoFangConnectStatus.CONNECTED -> {
btConnect.isEnabled = true
btConnect.background = ContextCompat.getDrawable(holder.itemView.context, R.drawable.icon_operate_panel_mofang_disconnect)
btConnect.onClick {
extras.putInt(KEY_CURRENT_CONNECT_STATUS, stats.ordinal)
onPreferenceClickListener?.onPreferenceClick(this)
}
}
MoFangConnectStatus.CONNECTING -> {
btConnect.isEnabled = false
btConnect.background = ContextCompat.getDrawable(holder.itemView.context, R.drawable.icon_operate_panel_mofang_connect_doing)
}
}
}
}

View File

@@ -0,0 +1,95 @@
package com.mogo.eagle.core.function.hmi.ui.operate.preferences
import android.content.Context
import android.util.AttributeSet
import android.widget.TextView
import androidx.preference.Preference
import androidx.preference.PreferenceViewHolder
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.kotlin.onClick
import com.mogo.eagle.core.utilcode.util.ToastUtils
import kotlin.math.max
class PreferenceWithSpeedSetting : Preference {
companion object {
const val KEY_BUNDLE_CURRENT_VALUE = "key_bundle_current_val"
}
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes)
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr)
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs)
constructor(context: Context) : super(context)
private var mDefaultValueSet: Any? = null
override fun setDefaultValue(defaultValue: Any?) {
super.setDefaultValue(defaultValue)
mDefaultValueSet = defaultValue
notifyChanged()
}
override fun onBindViewHolder(holder: PreferenceViewHolder) {
super.onBindViewHolder(holder)
val defaultSet = mDefaultValueSet ?: return
if (defaultSet !is Set<*> || defaultSet.size != 4) {
throw AssertionError()
}
val min = (defaultSet.elementAt(0) as String).toFloat()
val max = (defaultSet.elementAt(1) as String).toFloat()
var cur = (defaultSet.elementAt(2) as String).toFloat()
val step = (defaultSet.elementAt(3) as String).toFloat()
if (min > max) {
throw AssertionError()
}
if (min > cur) {
throw AssertionError()
}
if (cur > max) {
throw AssertionError()
}
val ll = holder.findViewById(R.id.ll_speed)
val btnOk = holder.findViewById(R.id.bt_ok)
val speedLimit = holder.findViewById(R.id.tv_speed_limit) as? TextView
if (speedLimit?.tag != null && speedLimit.tag is Float) {
cur = max(cur, speedLimit.tag as Float)
}
speedLimit?.text = cur.toString()
val minus = holder.findViewById(R.id.iv_speed_minus)
minus.setOnClickListener(null)
minus.onClick {
val minusAfter = cur - step
if (minusAfter < min) {
ToastUtils.showShort("阈值最小可为${min}m/s")
return@onClick
}
cur = minusAfter
btnOk.isEnabled = true
ll.isSelected = true
speedLimit?.tag = minusAfter
speedLimit?.text = minusAfter.toString()
}
val add = holder.findViewById(R.id.iv_speed_add)
add.setOnClickListener(null)
add.onClick {
val addAfter = cur + step
if (addAfter > max) {
ToastUtils.showShort("阈值最大可为${max}m/s")
return@onClick
}
cur = addAfter
ll.isSelected = true
btnOk.isEnabled = true
speedLimit?.tag = addAfter
speedLimit?.text = addAfter.toString()
}
btnOk.isEnabled = false
btnOk.setOnClickListener(null)
btnOk.onClick {
onPreferenceClickListener?.also {
extras.putFloat(KEY_BUNDLE_CURRENT_VALUE, cur)
it.onPreferenceClick(this)
}
}
}
}

View File

@@ -0,0 +1,103 @@
package com.mogo.eagle.core.function.hmi.ui.operate.preferences
import android.content.Context
import android.util.AttributeSet
import android.util.Log
import android.widget.CompoundButton
import android.widget.RadioButton
import android.widget.RadioGroup
import androidx.preference.Preference
import androidx.preference.PreferenceViewHolder
import com.mogo.eagle.core.function.hmi.R
class PreferenceWithUnmanInterval: Preference, RadioGroup.OnCheckedChangeListener {
companion object {
const val KEY_BUNDLE_CURRENT_INTERVAL = "key_bundle_unman_interval"
private const val TAG = "PreferenceWithUnmanInterval"
}
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes)
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr)
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs)
constructor(context: Context) : super(context)
enum class Interval {
FIVE_SECOND,
FIFTEEN_SECOND,
THIRTY_SECOND,
FORTY_FIVE_SECOND,
NEVER
}
private var interval: Interval? = null
override fun setDefaultValue(defaultValue: Any?) {
super.setDefaultValue(defaultValue)
Log.d(TAG, "--- setDefaultValue 1 ---:defaultValue -> $defaultValue")
if (defaultValue is Int) {
interval = when(defaultValue) {
5 -> Interval.FIVE_SECOND
15 -> Interval.FIFTEEN_SECOND
30 -> Interval.THIRTY_SECOND
45 -> Interval.FORTY_FIVE_SECOND
else -> Interval.NEVER
}
}
}
override fun onBindViewHolder(holder: PreferenceViewHolder) {
super.onBindViewHolder(holder)
Log.d(TAG, "--- onBindViewHolder 1 ---:interval -> $interval")
val temp = interval?: return
Log.d(TAG, "--- onBindViewHolder 2 --- ")
val five = holder.findViewById(R.id.rb_5s) as? RadioButton
val fifteen = holder.findViewById(R.id.rb_15s) as? RadioButton
val thirty = holder.findViewById(R.id.rb_30s) as? RadioButton
val forty_five = holder.findViewById(R.id.rb_45s) as? RadioButton
val never = holder.findViewById(R.id.rb_never) as? RadioButton
when(temp) {
Interval.FIVE_SECOND -> five?.isChecked = true
Interval.FIFTEEN_SECOND -> fifteen?.isChecked = true
Interval.THIRTY_SECOND -> thirty?.isChecked = true
Interval.FORTY_FIVE_SECOND -> forty_five?.isChecked = true
Interval.NEVER -> never?.isChecked = true
}
(holder.findViewById(R.id.rg_root) as? RadioGroup)?.also {
it.setOnCheckedChangeListener(this)
}
}
override fun onCheckedChanged(group: RadioGroup?, checkedId: Int) {
Log.d(TAG, "--- onCheckedChanged --- ")
when(checkedId) {
R.id.rb_5s -> {
Log.d(TAG, "--- onCheckedChanged 5s--- ")
extras.putInt(KEY_BUNDLE_CURRENT_INTERVAL, Interval.FIVE_SECOND.ordinal)
onPreferenceClickListener?.onPreferenceClick(this)
}
R.id.rb_15s -> {
Log.d(TAG, "--- onCheckedChanged 15s--- ")
extras.putInt(KEY_BUNDLE_CURRENT_INTERVAL, Interval.FIFTEEN_SECOND.ordinal)
onPreferenceClickListener?.onPreferenceClick(this)
}
R.id.rb_30s -> {
Log.d(TAG, "--- onCheckedChanged 30s--- ")
extras.putInt(KEY_BUNDLE_CURRENT_INTERVAL, Interval.THIRTY_SECOND.ordinal)
onPreferenceClickListener?.onPreferenceClick(this)
}
R.id.rb_45s -> {
Log.d(TAG, "--- onCheckedChanged 45s--- ")
extras.putInt(KEY_BUNDLE_CURRENT_INTERVAL, Interval.FORTY_FIVE_SECOND.ordinal)
onPreferenceClickListener?.onPreferenceClick(this)
}
R.id.rb_never -> {
Log.d(TAG, "--- onCheckedChanged never--- ")
extras.putInt(KEY_BUNDLE_CURRENT_INTERVAL, Interval.NEVER.ordinal)
onPreferenceClickListener?.onPreferenceClick(this)
}
}
}
}

View File

@@ -0,0 +1,56 @@
package com.mogo.eagle.core.function.hmi.ui.operate.preferences
import android.content.Context
import android.text.TextUtils
import android.util.AttributeSet
import android.widget.EditText
import androidx.core.widget.doOnTextChanged
import androidx.preference.Preference
import androidx.preference.PreferenceViewHolder
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.kotlin.onClick
class PreferenceWithWelcomeWords: Preference {
companion object {
const val KEY_BUNDLE_CURRENT_EDIT_TEXT_VALUE = "key_bundle_current_edit_text"
}
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes)
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr)
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs)
constructor(context: Context) : super(context)
private var mCurrentWelcomeWords: String? = null
override fun setDefaultValue(defaultValue: Any?) {
super.setDefaultValue(defaultValue)
if (defaultValue is String) {
mCurrentWelcomeWords = defaultValue
notifyChanged()
}
}
override fun onBindViewHolder(holder: PreferenceViewHolder) {
super.onBindViewHolder(holder)
val currentWelcomeWords = mCurrentWelcomeWords
val et = holder.findViewById(R.id.et_welcome_words) as? EditText
val btn_ok = holder.findViewById(R.id.bt_ok)
btn_ok.isEnabled = false
et?.doOnTextChanged { text, _, _, _ ->
if (!TextUtils.isEmpty(text)) {
btn_ok?.isEnabled = true
} else {
btn_ok?.isEnabled = false
}
}
if (!TextUtils.isEmpty(currentWelcomeWords)) {
et?.setText(currentWelcomeWords)
}
btn_ok.onClick {
extras.putString(KEY_BUNDLE_CURRENT_EDIT_TEXT_VALUE, et?.text.toString())
onPreferenceClickListener?.onPreferenceClick(this)
}
}
}

View File

@@ -143,21 +143,21 @@ internal class SOPSettingView @JvmOverloads constructor(
*/
private fun v2xSetting() {
//V2X总开关
scV2XSwitch.isChecked = FunctionBuildConfig.v2xMainSwitch
scV2XSwitch.isChecked = FunctionBuildConfig.v2xTotalSwitch
scV2XSwitch.setOnCheckedChangeListener { _, isChecked ->
FunctionBuildConfig.v2xMainSwitch = isChecked
FunctionBuildConfig.v2xTotalSwitch = isChecked
hmiAction("SOP V2X总开关, ", isChecked)
clickEventAnalytics("V2X总开关",isChecked)
if (isChecked) {
//V2N总开关
scV2NSwitch.isChecked = FunctionBuildConfig.v2nMainSwitch
hmiAction("SOP V2N总开关, ", FunctionBuildConfig.v2nMainSwitch)
scV2NSwitch.isChecked = FunctionBuildConfig.v2nTotalSwitch
hmiAction("SOP V2N总开关, ", FunctionBuildConfig.v2nTotalSwitch)
//V2I总开关
scV2ISwitch.isChecked = HmiBuildConfig.isShowObuV2iView
hmiAction("SOP V2I总开关, ", HmiBuildConfig.isShowObuV2iView)
scV2ISwitch.isChecked = HmiBuildConfig.v2iTotalSwitch
hmiAction("SOP V2I总开关, ", HmiBuildConfig.v2iTotalSwitch)
//V2V总开关
scObuV2vView.isChecked = HmiBuildConfig.isShowObuV2vView
hmiAction("SOP V2V总开关, ", HmiBuildConfig.isShowObuV2vView)
scObuV2vView.isChecked = HmiBuildConfig.v2vTotalSwitch
hmiAction("SOP V2V总开关, ", HmiBuildConfig.v2vTotalSwitch)
//obu总开关
scObu.isChecked = obuConnectStatus
hmiAction("SOP obu总开关, ", obuConnectStatus)
@@ -187,24 +187,24 @@ internal class SOPSettingView @JvmOverloads constructor(
}
//V2N总开关
scV2NSwitch.isChecked = FunctionBuildConfig.v2nMainSwitch
scV2NSwitch.isChecked = FunctionBuildConfig.v2nTotalSwitch
//根据V2N状态设置子开关是否可以点击
//V2N新链路
scNewV2NData.isEnabled = FunctionBuildConfig.v2nMainSwitch
scNewV2NData.isEnabled = FunctionBuildConfig.v2nTotalSwitch
//V2N场景进PNC
scV2nPnc.isEnabled = FunctionBuildConfig.v2nMainSwitch
scV2nPnc.isEnabled = FunctionBuildConfig.v2nTotalSwitch
//绿波通行(默认关闭)
scGreenWaveSop.isEnabled = FunctionBuildConfig.v2nMainSwitch
scGreenWaveSop.isEnabled = FunctionBuildConfig.v2nTotalSwitch
scV2NSwitch.setOnCheckedChangeListener { compoundButton, isChecked ->
clickEventAnalytics("V2N总开关",isChecked)
if (isChecked) {
//V2N新链路
scNewV2NData.isChecked = FunctionBuildConfig.isNewV2NData
hmiAction("SOP 是否是V2N新链路(云->工控机->App)", FunctionBuildConfig.isNewV2NData)
scNewV2NData.isChecked = FunctionBuildConfig.v2nNewLinked
hmiAction("SOP 是否是V2N新链路(云->工控机->App)", FunctionBuildConfig.v2nNewLinked)
//V2N场景进PNC
scV2nPnc.isChecked = FunctionBuildConfig.isV2NPnc
hmiAction("SOP V2N场景进PNC, ", FunctionBuildConfig.isV2NPnc)
CallerAutoPilotControlManager.sendV2nToPncCmd(FunctionBuildConfig.isV2NPnc)
scV2nPnc.isChecked = FunctionBuildConfig.v2nNewLinkedToPNC
hmiAction("SOP V2N场景进PNC, ", FunctionBuildConfig.v2nNewLinkedToPNC)
CallerAutoPilotControlManager.sendV2nToPncCmd(FunctionBuildConfig.v2nNewLinkedToPNC)
//绿波通行
scGreenWaveSop.isChecked = HmiBuildConfig.isShowGreenWaveView
hmiAction("SOP obu绿波通行, ", HmiBuildConfig.isShowGreenWaveView)
@@ -234,37 +234,37 @@ internal class SOPSettingView @JvmOverloads constructor(
if (!compoundButton.isPressed) {
return@setOnCheckedChangeListener
}
FunctionBuildConfig.v2nMainSwitch = isChecked
FunctionBuildConfig.v2nTotalSwitch = isChecked
val map = HashMap<String, Boolean>().also {
it["f1"] = isChecked
it["f2"] = FunctionBuildConfig.isNewV2NData
it["f2"] = FunctionBuildConfig.v2nNewLinked
}
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.V2N_NEW_LINK_SWITCH, GsonUtils.toJson(map).toByteArray())
}
//V2I总开关
scV2ISwitch.isChecked = HmiBuildConfig.isShowObuV2iView //是否展示obu的v2i
scV2ISwitch.isChecked = HmiBuildConfig.v2iTotalSwitch //是否展示obu的v2i
//根据V2I状态设置子开关是否可以点击
scV2iPnc.isEnabled = HmiBuildConfig.isShowObuV2iView
scRunRedLightSop.isEnabled = HmiBuildConfig.isShowObuV2iView
scObuWeaknessTrafficSop.isEnabled = HmiBuildConfig.isShowObuV2iView
scV2iPnc.isEnabled = HmiBuildConfig.v2iTotalSwitch
scRunRedLightSop.isEnabled = HmiBuildConfig.v2iTotalSwitch
scObuWeaknessTrafficSop.isEnabled = HmiBuildConfig.v2iTotalSwitch
scV2ISwitch.setOnCheckedChangeListener { compoundButton, isChecked ->
clickEventAnalytics("V2I总开关",isChecked)
if (isChecked) {
//V2I场景进PNC
scV2iPnc.isChecked = FunctionBuildConfig.isV2IPnc
hmiAction("SOP V2I场景进PNC, ", FunctionBuildConfig.isV2IPnc)
CallerAutoPilotControlManager.sendV2iToPncCmd(FunctionBuildConfig.isV2IPnc)
scV2iPnc.isChecked = FunctionBuildConfig.v2iToPNC
hmiAction("SOP V2I场景进PNC, ", FunctionBuildConfig.v2iToPNC)
CallerAutoPilotControlManager.sendV2iToPncCmd(FunctionBuildConfig.v2iToPNC)
//闯红灯预警
scRunRedLightSop.isChecked = HmiBuildConfig.isShowRunRedLightView
hmiAction("SOP obu闯红灯预警, ", HmiBuildConfig.isShowRunRedLightView)
scRunRedLightSop.isChecked = HmiBuildConfig.v2iRedLightWarning
hmiAction("SOP obu闯红灯预警, ", HmiBuildConfig.v2iRedLightWarning)
CallerTelematicManager.sendMsgToAllClients(
TelematicConstant.OBU_RUNREDLIGHT_WARNING,
"1".toByteArray()
)
//路侧弱势交通参与者
scObuWeaknessTrafficSop.isChecked = HmiBuildConfig.isShowObuWeaknessTrafficView
hmiAction("SOP obu弱势交通控制, ", HmiBuildConfig.isShowObuWeaknessTrafficView)
scObuWeaknessTrafficSop.isChecked = HmiBuildConfig.v2iWeaknessTraffic
hmiAction("SOP obu弱势交通控制, ", HmiBuildConfig.v2iWeaknessTraffic)
} else {
//V2I场景进PNC
scV2iPnc.isChecked = false
@@ -287,28 +287,28 @@ internal class SOPSettingView @JvmOverloads constructor(
if (!compoundButton.isPressed) {
return@setOnCheckedChangeListener
}
HmiBuildConfig.isShowObuV2iView = isChecked
HmiBuildConfig.v2iTotalSwitch = isChecked
}
//V2N新链路
scNewV2NData.isChecked = FunctionBuildConfig.isNewV2NData
scNewV2NData.isChecked = FunctionBuildConfig.v2nNewLinked
scNewV2NData.setOnCheckedChangeListener { compoundButton, isChecked ->
if (!compoundButton.isPressed) {
return@setOnCheckedChangeListener
}
clickEventAnalytics("V2N新链路",isChecked)
hmiAction("SOP 是否是V2N新链路(云->工控机->App)", isChecked)
FunctionBuildConfig.isNewV2NData = isChecked
FunctionBuildConfig.v2nNewLinked = isChecked
val map = HashMap<String, Boolean>().also {
it["f1"] = FunctionBuildConfig.v2nMainSwitch
it["f1"] = FunctionBuildConfig.v2nTotalSwitch
it["f2"] = isChecked
}
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.V2N_NEW_LINK_SWITCH, GsonUtils.toJson(map).toByteArray())
}
//V2N场景进PNC
scV2nPnc.isChecked = FunctionBuildConfig.isV2NPnc
scV2nPnc.isChecked = FunctionBuildConfig.v2nNewLinkedToPNC
scV2nPnc.setOnCheckedChangeListener { compoundButton, isChecked ->
if (!compoundButton.isPressed) {
return@setOnCheckedChangeListener
@@ -316,7 +316,7 @@ internal class SOPSettingView @JvmOverloads constructor(
clickEventAnalytics("V2N场景进PNC",isChecked)
hmiAction("SOP V2N场景进PNC, ", isChecked)
CallerAutoPilotControlManager.sendV2nToPncCmd(isChecked)
FunctionBuildConfig.isV2NPnc = isChecked
FunctionBuildConfig.v2nNewLinkedToPNC = isChecked
}
//绿波通行(默认关闭)
@@ -342,7 +342,7 @@ internal class SOPSettingView @JvmOverloads constructor(
}
//V2I场景进PNC
scV2iPnc.isChecked = FunctionBuildConfig.isV2IPnc
scV2iPnc.isChecked = FunctionBuildConfig.v2iToPNC
scV2iPnc.setOnCheckedChangeListener { compoundButton, isChecked ->
if (!compoundButton.isPressed) {
return@setOnCheckedChangeListener
@@ -350,19 +350,19 @@ internal class SOPSettingView @JvmOverloads constructor(
clickEventAnalytics("V2I场景进PNC",isChecked)
hmiAction("SOP V2I场景进PNC, ", isChecked)
CallerAutoPilotControlManager.sendV2iToPncCmd(isChecked)
FunctionBuildConfig.isV2IPnc = isChecked
FunctionBuildConfig.v2iToPNC = isChecked
}
//闯红灯预警(默认关闭)
scRunRedLightSop.isChecked = HmiBuildConfig.isShowRunRedLightView
scRunRedLightSop.isChecked = HmiBuildConfig.v2iRedLightWarning
scRunRedLightSop.setOnCheckedChangeListener { compoundButton, isChecked ->
if (!compoundButton.isPressed) {
return@setOnCheckedChangeListener
}
clickEventAnalytics("闯红灯预警",isChecked)
hmiAction("SOP obu闯红灯预警, ", isChecked)
HmiBuildConfig.isShowRunRedLightView = isChecked
if (HmiBuildConfig.isShowRunRedLightView) {
HmiBuildConfig.v2iRedLightWarning = isChecked
if (HmiBuildConfig.v2iRedLightWarning) {
CallerTelematicManager.sendMsgToAllClients(
TelematicConstant.OBU_RUNREDLIGHT_WARNING,
"1".toByteArray()
@@ -376,25 +376,25 @@ internal class SOPSettingView @JvmOverloads constructor(
}
//路侧弱势交通参与者(默认开启)
scObuWeaknessTrafficSop.isChecked = HmiBuildConfig.isShowObuWeaknessTrafficView
scObuWeaknessTrafficSop.isChecked = HmiBuildConfig.v2iWeaknessTraffic
scObuWeaknessTrafficSop.setOnCheckedChangeListener { compoundButton, isChecked ->
if (!compoundButton.isPressed) {
return@setOnCheckedChangeListener
}
clickEventAnalytics("路侧弱势交通参与者",isChecked)
hmiAction("SOP obu弱势交通控制, ", isChecked)
HmiBuildConfig.isShowObuWeaknessTrafficView = isChecked
HmiBuildConfig.v2iWeaknessTraffic = isChecked
}
//V2V总开关(默认关闭)
scObuV2vView.isChecked = HmiBuildConfig.isShowObuV2vView
scObuV2vView.isChecked = HmiBuildConfig.v2vTotalSwitch
scObuV2vView.setOnCheckedChangeListener { compoundButton, isChecked ->
if (!compoundButton.isPressed) {
return@setOnCheckedChangeListener
}
clickEventAnalytics("V2V总开关",isChecked)
hmiAction("SOP obuV2V开关, ", isChecked)
HmiBuildConfig.isShowObuV2vView = isChecked
HmiBuildConfig.v2vTotalSwitch = isChecked
}
//obu总开关
@@ -599,7 +599,7 @@ internal class SOPSettingView @JvmOverloads constructor(
scExamControl.isChecked = FunctionBuildConfig.isShowExamWindow
scExamControl.setOnCheckedChangeListener { _, isChecked ->
FunctionBuildConfig.isShowExamWindow = isChecked
CallerDevaToolsManager.showExamControlWindow(this,isChecked)
CallerDevaToolsManager.showExamControlWindow(isChecked)
hmiAction("SOP 考试功能面板, ", isChecked)
clickEventAnalytics("考试功能面板",isChecked)
}

View File

@@ -15,7 +15,6 @@ import com.mogo.eagle.core.function.angle.scenes.Default
import com.mogo.eagle.core.function.angle.scenes.LongSight
import com.mogo.eagle.core.function.api.map.angle.IMoGoVisualAngleChangeProvider
import com.mogo.eagle.core.function.api.map.angle.Scene
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.kotlin.scope
@@ -85,8 +84,6 @@ class VisualAngleToggleView : FrameLayout, IMoGoVisualAngleChangeProvider.OnMoGo
override fun onAnimationEnd(animation: Animator, isReverse: Boolean) {
super.onAnimationEnd(animation, isReverse)
iv_toggle_block?.isEnabled = true
//TODO renwj
CallerHmiManager.toggleOperatePanel(false)
}
})
animator.interpolator = AccelerateDecelerateInterpolator()
@@ -114,8 +111,6 @@ class VisualAngleToggleView : FrameLayout, IMoGoVisualAngleChangeProvider.OnMoGo
override fun onAnimationEnd(animation: Animator, isReverse: Boolean) {
iv_toggle_block?.isEnabled = true
//TODO renwj
CallerHmiManager.toggleOperatePanel(true)
}
})
animator.interpolator = AccelerateDecelerateInterpolator()

Binary file not shown.

After

Width:  |  Height:  |  Size: 727 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="true" android:state_checked="true" android:drawable="@drawable/icon_operate_panel_checkbox_checked" />
<item android:state_enabled="true" android:state_checked="false" android:drawable="@drawable/icon_operate_panel_checkbox_unchecked" />
<item android:state_enabled="false" android:drawable="@drawable/icon_operate_panel_checkbox_disabled" />
</selector>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true">
<shape android:shape="rectangle">
<corners android:radius="@dimen/dp_8" />
<stroke android:width="@dimen/dp_2" android:color="#2EACFF" />
<solid android:color="#4D4D4D" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<corners android:radius="@dimen/dp_8" />
<solid android:color="#4D4D4D" />
</shape>
</item>
</selector>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="true" android:state_pressed="false" android:drawable="@drawable/icon_operate_panel_ok_enabled" />
<item android:state_enabled="true" android:state_pressed="true" android:drawable="@drawable/icon_operate_panel_ok_pressed" />
<item android:drawable="@drawable/icon_operate_panel_ok_disabled" android:state_enabled="false"/>
</selector>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#1AFFFFFF" />
<corners android:radius="@dimen/dp_30" />
</shape>

View File

@@ -6,5 +6,5 @@
<corners android:radius="@dimen/dp_30" />
</shape>
</item>
<item android:drawable="@android:color/transparent" />
<item android:drawable="@android:color/transparent"/>
</selector>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="true" android:state_checked="true" android:drawable="@drawable/icon_operate_panel_switch_compat_checked" />
<item android:state_enabled="true" android:state_checked="false" android:drawable="@drawable/icon_operate_panel_switch_compat_unchecked" />
<item android:state_enabled="false" android:drawable="@drawable/icon_operate_panel_switch_compat_disabled" />
</selector>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="@dimen/dp_8" />
<solid android:color="#4d4d4d" />
</shape>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true" android:drawable="@drawable/icon_operate_panel_unman_interval_checked"/>
<item>
<shape android:shape="rectangle">
<corners android:radius="@dimen/dp_20" />
<solid android:color="@android:color/transparent" />
</shape>
</item>
</selector>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="@dimen/dp_20" />
<solid android:color="#4d4d4d" />
</shape>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/recycler_view"
android:paddingTop="0dip"
android:paddingBottom="@dimen/dp_20" />

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<com.mogo.eagle.core.function.hmi.ui.operate.OperatePanelLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"/>

View File

@@ -9,5 +9,7 @@
android:textSize="@dimen/dp_30"
android:paddingTop="@dimen/dp_30"
android:paddingStart="@dimen/dp_30"
android:background="@android:color/transparent"
tools:text="地图效果"
android:gravity="start" />
android:gravity="start"
tools:ignore="RtlSymmetry,SpUsage" />

View File

@@ -6,6 +6,7 @@
android:layout_height="wrap_content"
android:paddingStart="@dimen/dp_30"
android:paddingEnd="@dimen/dp_30"
android:background="@android:color/transparent"
android:orientation="horizontal"
tools:background="#83000000">

View File

@@ -10,5 +10,8 @@
android:paddingTop="@dimen/dp_25"
android:paddingBottom="@dimen/dp_25"
android:paddingStart="@dimen/dp_30"
android:layout_marginEnd="@dimen/dp_30"
android:background="@drawable/bg_operate_panel_preference_header"
tools:text="地图效果"
android:gravity="start" />
android:gravity="start"
tools:ignore="RtlSymmetry,SpUsage" />

View File

@@ -7,6 +7,7 @@
android:paddingStart="@dimen/dp_30"
android:paddingEnd="@dimen/dp_30"
android:orientation="horizontal"
android:background="@android:color/transparent"
tools:background="#83000000">
<TextView
@@ -17,7 +18,8 @@
android:textSize="@dimen/dp_34"
android:layout_gravity="center_vertical"
android:textColor="#FFFFFF"
tools:text="V2X总开关"/>
tools:text="V2X总开关"
tools:ignore="SpUsage" />
<LinearLayout
android:id="@android:id/widget_frame"

View File

@@ -7,6 +7,7 @@
android:paddingStart="@dimen/dp_60"
android:paddingEnd="@dimen/dp_30"
android:orientation="horizontal"
android:background="@android:color/transparent"
tools:background="#83000000">
<TextView
@@ -17,7 +18,8 @@
android:textSize="@dimen/dp_34"
android:layout_gravity="center_vertical"
android:textColor="#FFFFFF"
tools:text="V2X总开关"/>
tools:text="V2X总开关"
tools:ignore="SpUsage" />
<LinearLayout
android:id="@android:id/widget_frame"

View File

@@ -5,4 +5,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:clickable="false" />
android:clickable="false"
android:button="@null"
android:background="@drawable/bg_operate_panel_checkbox"/>

View File

@@ -1,6 +1,72 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.SwitchCompat xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="false"
android:clickable="false" />
android:orientation="horizontal"
android:layout_marginTop="@dimen/dp_20"
tools:background="#83000000">
<LinearLayout
android:id="@+id/ll_speed"
android:layout_width="@dimen/dp_214"
android:layout_height="@dimen/dp_60"
android:background="@drawable/bg_operate_panel_edit"
android:layout_gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:id="@+id/iv_speed_minus"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:paddingStart="@dimen/dp_15"
android:src="@drawable/icon_operate_panel_minus"
tools:ignore="ContentDescription,RtlSymmetry" />
<TextView
android:id="@+id/tv_speed_limit"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:gravity="center"
android:textColor="#ffffff"
android:textSize="@dimen/dp_32"
tools:ignore="SpUsage"
tools:text="65" />
<ImageView
android:id="@+id/iv_speed_add"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:paddingEnd="@dimen/dp_15"
android:src="@drawable/icon_operate_panel_add"
tools:ignore="ContentDescription,RtlSymmetry" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="@dimen/dp_10"
android:text="km/h"
android:textColor="#ffffff"
android:textSize="@dimen/dp_30"
tools:ignore="HardcodedText,SpUsage" />
<Space
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1" />
<Button
android:id="@+id/bt_ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:background="@drawable/bg_operate_panel_edit_button"
android:enabled="false" />
</LinearLayout>

View File

@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.SwitchCompat xmlns:android="http://schemas.android.com/apk/res/android"
<Button xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/bt_mofang"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:enabled="false"
android:clickable="false" />

View File

@@ -1,6 +1,72 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.SwitchCompat xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:clickable="false" />
<RadioGroup xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/rg_root"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_60"
android:layout_marginTop="@dimen/dp_20"
android:orientation="horizontal"
android:background="@drawable/bg_radio_group_operate_panel_unman_interval">
<RadioButton
android:id="@+id/rb_5s"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="5s"
android:textSize="@dimen/dp_30"
android:textColor="#ffffff"
android:gravity="center"
android:button="@null"
android:background="@drawable/bg_radio_button_operate_panel_unman_interval"
tools:ignore="HardcodedText,SpUsage" />
<RadioButton
android:id="@+id/rb_15s"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="15s"
android:textSize="@dimen/dp_30"
android:textColor="#ffffff"
android:gravity="center"
android:button="@null"
android:background="@drawable/bg_radio_button_operate_panel_unman_interval"
tools:ignore="HardcodedText,SpUsage" />
<RadioButton
android:id="@+id/rb_30s"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="30s"
android:textSize="@dimen/dp_30"
android:textColor="#ffffff"
android:gravity="center"
android:button="@null"
android:background="@drawable/bg_radio_button_operate_panel_unman_interval"
tools:ignore="HardcodedText,SpUsage" />
<RadioButton
android:id="@+id/rb_45s"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="45s"
android:textSize="@dimen/dp_30"
android:textColor="#ffffff"
android:gravity="center"
android:button="@null"
android:background="@drawable/bg_radio_button_operate_panel_unman_interval"
tools:ignore="HardcodedText,SpUsage" />
<RadioButton
android:id="@+id/rb_never"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="从不"
android:textSize="@dimen/dp_30"
android:textColor="#ffffff"
android:gravity="center"
android:button="@null"
android:background="@drawable/bg_radio_button_operate_panel_unman_interval"
tools:ignore="HardcodedText,SpUsage" />
</RadioGroup>

View File

@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.SwitchCompat xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/switchWidget"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:clickable="false" />
android:clickable="false"
android:button="@null"
android:thumb="@null"
android:background="@drawable/bg_operate_panel_switch_compat"/>

View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="@dimen/dp_30"
android:paddingEnd="@dimen/dp_30"
android:background="@android:color/transparent"
android:orientation="horizontal"
tools:background="#83000000">
<EditText
android:id="@+id/et_welcome_words"
android:layout_width="0dip"
android:layout_height="@dimen/dp_60"
android:paddingStart="@dimen/dp_20"
android:paddingEnd="@dimen/dp_20"
android:background="@drawable/bg_operate_panel_welcome_words_edit"
android:textColor="#ffffff"
android:layout_weight="1"
tools:ignore="Autofill,LabelFor,TextFields" />
<Button
android:id="@+id/bt_ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_20"
android:enabled="false"
android:background="@drawable/bg_operate_panel_edit_button"/>
</LinearLayout>

View File

@@ -6,9 +6,9 @@
android:layout_height="wrap_content"
android:paddingStart="@dimen/dp_30"
android:paddingEnd="@dimen/dp_30"
android:background="@android:color/transparent"
android:orientation="vertical"
tools:background="#83000000">
<TextView
android:id="@android:id/title"
android:layout_width="wrap_content"
@@ -16,13 +16,11 @@
android:textSize="@dimen/dp_34"
android:layout_gravity="center_vertical"
android:textColor="#FFFFFF"
tools:text="V2X总开关"/>
tools:text="V2X总开关"
tools:ignore="SpUsage" />
<LinearLayout
android:id="@android:id/widget_frame"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_20"
android:visibility="gone"
android:orientation="vertical"/>
</LinearLayout>

View File

@@ -43,5 +43,12 @@
android:layout_gravity="top"
android:visibility="gone" />
<ViewStub
android:id="@id/vs_operate_panel"
android:layout_width="@dimen/dp_1046"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/dp_72"
android:inflatedId="@id/id_operate_panel"
android:layout_gravity="start|top"
android:layout="@layout/layout_operate_panel_holder" />
</FrameLayout>

View File

@@ -26,6 +26,7 @@
app:bottomPadding="160"
app:carDrawable="@drawable/taxt_u_p_map_car"
app:compassDrawable="@drawable/taxt_u_p_map_car_light"
app:startPointDrawable="@drawable/taxi_overmap_startpoint"
app:endPointDrawable="@drawable/taxi_overmap_endpoint"
app:globalPathColor="#39BA90"
app:layout_constraintBottom_toBottomOf="parent"
@@ -39,6 +40,21 @@
app:roadTrajectoryDrawable="@drawable/taxi_orvermap_road_trajectory"
app:topPadding="70" />
<com.mogo.eagle.core.function.hmi.ui.viewport.VisualAngleToggleView
android:id="@+id/visualAngleToggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_50"
android:layout_marginBottom="@dimen/dp_30"
app:layout_constraintBottom_toTopOf="@+id/shadowView"
app:layout_constraintEnd_toEndOf="parent" />
<com.mogo.eagle.core.function.hmi.ui.mofang.MoFangStatusView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintEnd_toStartOf="@+id/visualAngleToggle"
app:layout_constraintTop_toTopOf="@+id/visualAngleToggle" />
<View
android:id="@+id/shadowView"
android:layout_width="270dp"

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools">
<dimen name="preferences_header_width" tools:override='true'>@dimen/dp_290</dimen>
</resources>

View File

@@ -7,46 +7,55 @@
android:key="red_or_green_light_marker"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="红绿灯标识"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<SwitchPreferenceCompat
android:key="red_or_green_light_merge_marker"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="红绿灯融合标识"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<SwitchPreferenceCompat
android:key="fault_report_tip"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="异常上报提示"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<SwitchPreferenceCompat
android:key="limit_speed_marker"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="限速标识"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<SwitchPreferenceCompat
android:key="self_routing_verify_mode"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="自主算路验证模式"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<SwitchPreferenceCompat
android:key="look_around_360"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="360环视"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<SwitchPreferenceCompat
android:key="weather_effect_switch"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="天气效果开关"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<SwitchPreferenceCompat
android:key="system_boot_status_show"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="系统启动状态展示"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<Preference
<com.mogo.eagle.core.function.hmi.ui.operate.preferences.PreferenceWithUnmanInterval
android:key="unmanned_demo_pull_interval"
android:layout="@layout/layout_operate_panel_preference_with_title_above"
android:title="无人化演练任务拉取时间间隔"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_radio_group_custom" />
</PreferenceCategory>
</androidx.preference.PreferenceScreen>

View File

@@ -4,16 +4,19 @@
<SwitchPreferenceCompat
android:key="demo_switch"
android:title="美化模式"
android:persistent="false"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<SwitchPreferenceCompat
android:key="record_bag_dialog"
android:title="录包弹窗"
android:persistent="false"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<SwitchPreferenceCompat
android:key="take_over_wake"
android:title="接管提醒"
android:persistent="false"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
</PreferenceCategory>

View File

@@ -4,21 +4,28 @@
<SwitchPreferenceCompat
android:key="danger_obstacles_color_mark"
android:title="危险障碍物颜色标记"
android:defaultValue="@bool/hd_is_pnc_warning"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<SwitchPreferenceCompat
android:key="route_guide_line_dynamic_effect"
android:title="引导线动态效果"
android:defaultValue="@bool/hd_route_dynamic_effect"
android:persistent="false"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<SwitchPreferenceCompat
android:key="point_cloud_effect"
android:title="点云效果"
android:defaultValue="@bool/hd_is_point_cloud_effect"
android:persistent="false"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<SwitchPreferenceCompat
android:key="self_car_aperture"
android:title="自车光圈"
android:defaultValue="@bool/hd_is_self_car_anim"
android:persistent="false"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
</PreferenceCategory>

View File

@@ -3,15 +3,17 @@
<PreferenceCategory
android:layout="@layout/layout_operate_panel_preference_category_title"
android:title="蘑方">
<Preference
<com.mogo.eagle.core.function.hmi.ui.operate.preferences.PreferenceWithMoFang
android:key="mofang_connect"
android:title="连接蘑方"
android:persistent="false"
android:layout="@layout/layout_operate_panel_preference_mofang_connect"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_mofang_connect"/>
<SwitchPreferenceCompat
android:key="mofang_command_test"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="蘑方指令测试"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
</PreferenceCategory>
</androidx.preference.PreferenceScreen>

View File

@@ -4,62 +4,92 @@
<SwitchPreferenceCompat
android:key="v2x_total_switch"
android:title="V2X总开关"
android:persistent="false"
android:disableDependentsState="false"
android:defaultValue="@bool/v2x_total_switch"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<SwitchPreferenceCompat
android:key="v2n_total_switch"
android:title="V2N总开关"
android:persistent="false"
android:disableDependentsState="false"
android:dependency="v2x_total_switch"
android:defaultValue="@bool/v2n_total_switch"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<SwitchPreferenceCompat
android:key="v2n_new_linked"
android:title="V2N新链路"
android:persistent="false"
android:dependency="v2n_total_switch"
android:defaultValue="@bool/v2n_new_linked"
android:layout="@layout/layout_operate_panel_preference_switch_compat_dependee"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<SwitchPreferenceCompat
android:key="v2n_new_linked_from_pnc"
android:key="v2n_new_linked_to_pnc"
android:title="V2N场景进PNC"
android:persistent="false"
android:dependency="v2n_total_switch"
android:defaultValue="@bool/v2n_new_linked_to_pnc"
android:layout="@layout/layout_operate_panel_preference_switch_compat_dependee"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<SwitchPreferenceCompat
android:key="v2n_new_linked_green_wave"
android:title="绿波通行"
android:persistent="false"
android:defaultValue="@bool/v2n_green_wave"
android:dependency="v2n_total_switch"
android:layout="@layout/layout_operate_panel_preference_switch_compat_dependee"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<SwitchPreferenceCompat
android:key="v2i_total_switch"
android:title="V2I总开关"
android:persistent="false"
android:dependency="v2x_total_switch"
android:disableDependentsState="false"
android:defaultValue="@bool/v2i_total_switch"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<SwitchPreferenceCompat
android:key="v2i_from_pnc"
android:key="v2i_to_pnc"
android:title="V2I场景进PNC"
android:persistent="false"
android:defaultValue="@bool/v2i_from_pnc"
android:dependency="v2i_total_switch"
android:layout="@layout/layout_operate_panel_preference_switch_compat_dependee"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<SwitchPreferenceCompat
android:key="v2i_run_on_red_light"
android:key="v2i_red_light_warning"
android:title="闯红灯预警"
android:persistent="false"
android:dependency="v2i_total_switch"
android:defaultValue="@bool/v2i_red_green_warning"
android:layout="@layout/layout_operate_panel_preference_switch_compat_dependee"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<SwitchPreferenceCompat
android:key="v2i_weakness_participant"
android:key="v2i_weakness_traffic"
android:title="路侧弱势交通参与者"
android:persistent="false"
android:dependency="v2i_total_switch"
android:defaultValue="@bool/v2i_weakness_traffic"
android:layout="@layout/layout_operate_panel_preference_switch_compat_dependee"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<SwitchPreferenceCompat
android:key="v2v_total_switch"
android:title="V2V总开关"
android:persistent="false"
android:defaultValue="@bool/v2v_total_switch"
android:disableDependentsState="false"
android:dependency="v2x_total_switch"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
<SwitchPreferenceCompat
android:key="obu_total_switch"
android:title="OBU总开关"
android:persistent="false"
android:defaultValue="@bool/obu_total_switch"
android:dependency="v2x_total_switch"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
</PreferenceCategory>

View File

@@ -7,75 +7,90 @@
android:key="pnc_park_intersection_car"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="PNC-Park-会车"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<SwitchPreferenceCompat
android:key="pnc_park_overtake_car"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="PNC-Park-超车"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<SwitchPreferenceCompat
android:key="detour_retard_park"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="绕障减速停车"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<SwitchPreferenceCompat
android:key="rain_day"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="雨天模式"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<SwitchPreferenceCompat
android:key="fault_deceleration_park"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="故障减速停车"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<SwitchPreferenceCompat
android:key="weak_net_deceleration_park"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="弱网减速停车"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<SwitchPreferenceCompat
android:key="exam_function_panel"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="考试功能面板"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<CheckBoxPreference
android:key="all_merge_mode"
android:layout="@layout/layout_operate_panel_preference_checkbox_compat"
android:title="全融合模式"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_checkbox_compat" />
<CheckBoxPreference
android:key="blind_area_mode"
android:layout="@layout/layout_operate_panel_preference_checkbox_compat"
android:title="盲区模式"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_checkbox_compat" />
<CheckBoxPreference
android:key="beyond_visual_range_mode"
android:layout="@layout/layout_operate_panel_preference_checkbox_compat"
android:title="超视距模式"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_checkbox_compat" />
<CheckBoxPreference
android:key="transparent_transfer_mode"
android:layout="@layout/layout_operate_panel_preference_checkbox_compat"
android:title="超视距模式"
android:title="透传模式"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_checkbox_compat" />
<CheckBoxPreference
android:key="pure_obu_mode"
android:layout="@layout/layout_operate_panel_preference_checkbox_compat"
android:title="纯路侧模式"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_checkbox_compat" />
<Preference
<com.mogo.eagle.core.function.hmi.ui.operate.preferences.PreferenceWithSpeedSetting
android:key="auto_pilot_speed_thresholds"
android:layout="@layout/layout_operate_panel_preference_with_title_above"
android:title="自动驾驶速度阈值"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_edit_with_button" />
<Preference
<com.mogo.eagle.core.function.hmi.ui.operate.preferences.PreferenceWithSpeedSetting
android:key="change_lane_speed_thresholds"
android:title="变道速度阈值"
android:persistent="false"
android:layout="@layout/layout_operate_panel_preference_with_title_above"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_edit_with_button" />
<Preference
<com.mogo.eagle.core.function.hmi.ui.operate.preferences.PreferenceWithSpeedSetting
android:key="overtake_speed_thresholds"
android:title="超车速度阈值"
android:persistent="false"
android:layout="@layout/layout_operate_panel_preference_with_title_above"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_edit_with_button" />
</PreferenceCategory>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
android:layout="@layout/layout_operate_panel_preference_category_title"
android:title="外屏欢迎语(1-9个字符避免生僻字符)">
<com.mogo.eagle.core.function.hmi.ui.operate.preferences.PreferenceWithWelcomeWords
android:key="welcome_words"
android:persistent="false"
android:layout="@layout/layout_operate_panel_preference_with_edit_button"/>
</PreferenceCategory>
</androidx.preference.PreferenceScreen>

View File

@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<Preference
android:fragment="com.mogo.eagle.core.function.hmi.ui.operate.OperatePanelLayout$V2XPreferenceFragmentCompat"
android:key="v2x"
android:selectable="true"
android:layout="@layout/layout_operate_panel_preference_header"
android:title="V2X" />
<Preference
@@ -31,4 +31,10 @@
android:key="mofang"
android:layout="@layout/layout_operate_panel_preference_header"
android:title="蘑方" />
<Preference
android:fragment="com.mogo.eagle.core.function.hmi.ui.operate.OperatePanelLayout$WelcomeWordsPreferenceCompat"
android:key="welcome_words"
android:layout="@layout/layout_operate_panel_preference_header"
android:title="欢迎语"/>
</androidx.preference.PreferenceScreen>

View File

@@ -226,7 +226,7 @@ class TravelRealityView @JvmOverloads constructor(
*/
@Volatile
private var isSmallMap: Boolean = true
private var iconRes = R.drawable.map_car_icon
private var iconRes = R.drawable.small_map_car
private var globalPathResp: MessagePad.GlobalPathResp? = null
private val mCoordinatesLatLng: MutableList<LatLng> = ArrayList()
private var mSmallCarMarker: Marker? = null
@@ -394,13 +394,6 @@ class TravelRealityView @JvmOverloads constructor(
mAMap?.isTrafficEnabled = false
// 设置 锚点 图标
if (isInit) {
iconRes = if (AppIdentityModeUtils.isB1(FunctionBuildConfig.appIdentityMode)) {
R.drawable.map_bus_icon
} else if (AppIdentityModeUtils.isB2(FunctionBuildConfig.appIdentityMode) || AppIdentityModeUtils.isM1(FunctionBuildConfig.appIdentityMode)) {
R.drawable.map_m2_icon
} else {
R.drawable.map_car_icon
}
mSmallCarMarker = mAMap?.addMarker(
MarkerOptions()
.icon(BitmapDescriptorFactory.fromResource(iconRes))
@@ -408,11 +401,11 @@ class TravelRealityView @JvmOverloads constructor(
)
mSmallStartMarker = mAMap?.addMarker(
MarkerOptions()
.icon(BitmapDescriptorFactory.fromResource(R.drawable.module_small_map_view_dir_start))
.icon(BitmapDescriptorFactory.fromResource(R.drawable.small_map_start))
)
mSmallEndMarker = mAMap?.addMarker(
MarkerOptions()
.icon(BitmapDescriptorFactory.fromResource(R.drawable.module_small_map_view_dir_end))
.icon(BitmapDescriptorFactory.fromResource(R.drawable.small_map_end))
)
// 加载自定义样式
val customMapStyleOptions = CustomMapStyleOptions()
@@ -671,7 +664,16 @@ class TravelRealityView @JvmOverloads constructor(
// roadWidth = maxRoadWidth
// globalWidth = maxGlobalWidth
// }
val optionList = ArrayList<MarkerOptions>()
optionList.add(
MarkerOptions().apply {
icon(BitmapDescriptorFactory.fromResource(startPointDrawable))
position(coordinateConverterWgsToGcj(
globalData[0].lat,
globalData[0].lon
))
}
)
val endOption = MarkerOptions()
endOption.icon(BitmapDescriptorFactory.fromResource(endPointDrawable))
endOption.position(
@@ -680,8 +682,9 @@ class TravelRealityView @JvmOverloads constructor(
globalData[globalData.size - 1].lon
)
)
// 绘制终点
drawEndMarker(endOption)
optionList.add(endOption)
// 绘制起终点
drawStartEndMarker(optionList)
// 绘制全局轨迹
drawPolyline(DRAW_POLY_LINE, globalOptions)
}
@@ -1315,7 +1318,7 @@ class TravelRealityView @JvmOverloads constructor(
}
}
private fun drawEndMarker(options: MarkerOptions) {
private fun drawStartEndMarker(options: List<MarkerOptions>) {
Message.obtain().apply {
what = DRAW_END_MARKER
obj = options
@@ -1493,6 +1496,11 @@ class TravelRealityView @JvmOverloads constructor(
30
)
)
mPolyline = mAMap!!.addPolyline(
PolylineOptions()
.color(Color.argb(255, 77, 212, 100))// 255, 31, 127, 255
.width(12f)
)
// 绘制线
mPolyline?.points = mCoordinatesLatLng
CallerLogger.d(
@@ -1766,7 +1774,7 @@ class TravelRealityView @JvmOverloads constructor(
DRAW_END_MARKER -> {
removeMessages(DRAW_END_MARKER)
if (isMapDestroyed) return
realDrawEndMarker(msg.obj as MarkerOptions)
realDrawEndMarker(msg.obj as ArrayList<MarkerOptions>)
}
UPDATE_VIDEO_MARKER -> {
@@ -1975,13 +1983,22 @@ class TravelRealityView @JvmOverloads constructor(
}
}
private fun realDrawEndMarker(options: MarkerOptions) {
private fun realDrawEndMarker(options: List<MarkerOptions>) {
Log.d(TAG, "realDrawEndMarker")
mStartMarker?.destroy()
mStartMarker = null
mEndMarker?.destroy()
mEndMarker = null
if (options.size < 2) return
if (startPointDrawable != -1) {
mStartMarker = mAMap?.addMarker(
options[0]
)
mStartMarker?.isClickable = false
}
if (endPointDrawable != -1) {
mEndMarker = mAMap?.addMarker(
options
options[1]
)
mEndMarker?.isClickable = false
}
@@ -1994,6 +2011,8 @@ class TravelRealityView @JvmOverloads constructor(
private fun realClearAllMarkersAndPolyline() {
Log.d(TAG, "realClearAllMarkersAndPolyline")
// 清除终点
mStartMarker?.destroy()
mStartMarker = null
mEndMarker?.destroy()
mEndMarker = null
// 清除道路事件icon

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -1,8 +1,10 @@
package com.mogo.eagle.core.data.config
import chassis.Chassis
import com.mogo.eagle.core.data.R
import com.mogo.eagle.core.data.app.UrlConfig
import com.mogo.eagle.core.utilcode.util.GsonUtils
import com.mogo.eagle.core.utilcode.util.Utils
/**
* @author xiaoyuzhou
@@ -11,6 +13,7 @@ import com.mogo.eagle.core.utilcode.util.GsonUtils
*/
object FunctionBuildConfig {
/**
* 是否是演示(美化)模式
* 1.当点击【开始服务taxi/滑动出发bus】btn后不管实际自动驾驶按钮「state值」如何变更自动驾驶按钮都呈现2的状态。
@@ -245,7 +248,7 @@ object FunctionBuildConfig {
*/
@Volatile
@JvmField
var isDisplayAnimEnable = true
var isDisplayAnimEnable = Utils.getApp().resources.getBoolean(R.bool.hd_is_self_car_anim)
/**
* 地图是否忽略判断条件直接绘制工控机引导线数据&全局路径规划
@@ -301,28 +304,35 @@ object FunctionBuildConfig {
*/
@Volatile
@JvmField
var v2xMainSwitch = true
var v2xTotalSwitch = Utils.getApp().resources.getBoolean(R.bool.v2x_total_switch)
/**
* V2N总开关,其子开关包括V2N新链路、V2N场景进PNC、绿波通行
*/
@Volatile
@JvmField
var v2nMainSwitch = true
var v2nTotalSwitch = Utils.getApp().resources.getBoolean(R.bool.v2n_total_switch)
/**
* V2N事件-绿波通行开关
*/
@Volatile
@JvmField
var v2nGreenWave = Utils.getApp().resources.getBoolean(R.bool.v2n_green_wave)
/**
* 是否是V2N新链路(云->工控机->App)
*/
@Volatile
@JvmField
var isNewV2NData = false
var v2nNewLinked = false
/**
* 是否开启PNC障碍物颜色提醒
*/
@Volatile
@JvmField
var isPNCWarning = true
var isPNCWarning = Utils.getApp().resources.getBoolean(R.bool.hd_is_pnc_warning)
/**
* 最外层设置的Url
@@ -350,14 +360,14 @@ object FunctionBuildConfig {
*/
@Volatile
@JvmField
var isV2NPnc = false
var v2nNewLinkedToPNC = false
/**
* 是否开启V2I场景进PNC的开关开关默认关闭
*/
@Volatile
@JvmField
var isV2IPnc = false
var v2iToPNC = false
@Volatile
@JvmField
@@ -417,4 +427,18 @@ object FunctionBuildConfig {
@JvmField
var isSupportJunkDetect = false
/**
* 天气效果开关
*/
@Volatile
@JvmField
var weatherEffectSwitch = false
/**
* 外屏欢迎语
*/
@Volatile
@JvmField
var welcomeWords: String? = null
}

View File

@@ -1,6 +1,8 @@
package com.mogo.eagle.core.data.config
import com.mogo.eagle.core.data.R
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.util.Utils
/**
* @author xiaoyuzhou
@@ -63,7 +65,7 @@ object HmiBuildConfig {
*/
@JvmField
@Volatile
var isShowObuWeaknessTrafficView = false
var v2iWeaknessTraffic = Utils.getApp().resources.getBoolean(R.bool.v2i_weakness_traffic)
/**
* 是否展示云端的弱势交通
@@ -77,28 +79,28 @@ object HmiBuildConfig {
*/
@JvmField
@Volatile
var isShowObuV2vView = false
var v2vTotalSwitch = Utils.getApp().resources.getBoolean(R.bool.v2v_total_switch)
/**
* 是否展示obu的v2i
*/
@JvmField
@Volatile
var isShowObuV2iView = false
var v2iTotalSwitch = Utils.getApp().resources.getBoolean(R.bool.v2i_total_switch)
/**
* 是否展示绿波通行
*/
@JvmField
@Volatile
var isShowGreenWaveView = false
var isShowGreenWaveView = Utils.getApp().resources.getBoolean(R.bool.v2n_green_wave)
/**
* 是否展示闯红灯预警
*/
@JvmField
@Volatile
var isShowRunRedLightView = false
var v2iRedLightWarning = Utils.getApp().resources.getBoolean(R.bool.v2i_red_green_warning)
/**
* 是否展示转向灯

View File

@@ -14,7 +14,6 @@ import com.mogo.eagle.core.data.deva.scene.SceneModule
import com.mogo.eagle.core.data.deva.scene.SceneTAG
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.takeover.TakeOverAnnotation
import com.mogo.eagle.core.function.api.devatools.apm.*
import com.mogo.eagle.core.function.api.devatools.block.*
import com.mogo.eagle.core.function.api.devatools.strict.*
import com.mogo.eagle.core.function.api.devatools.download.*
@@ -126,7 +125,7 @@ interface IDevaToolsProvider : IProvider {
/**
* 展示考试车辆控制窗口
*/
fun showExamControlWindow(view: View,isShow: Boolean)
fun showExamControlWindow(isShow: Boolean)
/**
* 当工控机回调时调用

View File

@@ -33,36 +33,36 @@ interface IMoGoMoFangProvider {
/**
* 魔方已连接
*/
fun onMoFangConnected()
fun onMoFangConnected() {}
/**
* 魔方断开连接了
*/
fun onMoFangDisconnected()
fun onMoFangDisconnected() {}
/**
* 魔方电量变化了
*/
fun onMoFangBatteryChanged(battery: Int)
fun onMoFangBatteryChanged(battery: Int) {}
/**
* 魔方单键点击了
*/
fun onMoFangClicked(keyCode: Int)
fun onMoFangClicked(keyCode: Int) {}
/**
* 魔方单键长按了
*/
fun onMoFangLongClicked(keyCode: Int)
fun onMoFangLongClicked(keyCode: Int) {}
/**
* 魔方触发了组合键
*/
fun onMoFangCombineClicked(vararg keyCodes: Int)
fun onMoFangCombineClicked(vararg keyCodes: Int) {}
/**
* 魔方状态异常
*/
fun onMoFangStatusError(msg: String)
fun onMoFangStatusError(msg: String) {}
}
}

View File

@@ -4,7 +4,6 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.function.api.autopilot.IMoGoV2XListener
import com.mogo.eagle.core.function.call.autopilot.CallerV2XListenerManager.V2NCarTypeCheck.Companion.verifyCarType
import com.mogo.eagle.core.function.call.base.CallerBase
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import mogo.v2x.MogoV2X
/**
@@ -36,7 +35,7 @@ object CallerV2XListenerManager : CallerBase<IMoGoV2XListener>() {
override fun doSomeAfterAddListener(tag: String, listener: IMoGoV2XListener) {
if (eventCountTmp >= 0) {
if (verifyCarType() && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) {
if (verifyCarType() && FunctionBuildConfig.v2nTotalSwitch && FunctionBuildConfig.v2nNewLinked) {
listener.onV2nGlobalPathEvents(eventCountTmp, constructTmp, triangleTmp, congestionTmp, parkingViolationTmp)
}
}
@@ -53,7 +52,7 @@ object CallerV2XListenerManager : CallerBase<IMoGoV2XListener>() {
parkingViolationTmp = parkingViolation
M_LISTENERS.forEach {
val listener = it.value
if (verifyCarType() && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) {
if (verifyCarType() && FunctionBuildConfig.v2nTotalSwitch && FunctionBuildConfig.v2nNewLinked) {
listener.onV2nGlobalPathEvents(eventCount, construct, triangle, congestion, parkingViolation)
}
}

View File

@@ -168,8 +168,8 @@ object CallerDevaToolsManager {
/**
* 展示考试车辆控制窗口
*/
fun showExamControlWindow(view: View,isShow: Boolean){
devaToolsProviderApi?.showExamControlWindow(view,isShow)
fun showExamControlWindow(isShow: Boolean){
devaToolsProviderApi?.showExamControlWindow(isShow)
}
/**

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@@ -5,4 +5,7 @@
<item name="click_pressed_attr_replaced" type="id" />
<item name="click_pressed_attr_replaced_color" type="id" />
<item name="action_wrapper_tag_id" type="id" />
<item name="id_operate_panel" type="id" />
<item name="vs_operate_panel" type="id" />
<item name="operate_panel_header_last_selected" type="id" />
</resources>

View File

@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- V2X总开关-->
<bool name="v2x_total_switch">true</bool>
<!-- V2N总开关,其子开关包括V2N新链路、V2N场景进PNC、绿波通行-->
<bool name="v2n_total_switch">true</bool>
<!-- 是否是V2N新链路(云->工控机->App)-->
<bool name="v2n_new_linked">false</bool>
<!-- V2N场景进PNC -->
<bool name="v2n_new_linked_to_pnc">false</bool>
<!-- 是否开启绿波通行, 默认关闭 -->
<bool name="v2n_green_wave">false</bool>
<!-- 是否展示obu的v2i-->
<bool name="v2i_total_switch">false</bool>
<!-- 是否展示闯红灯预警-->
<bool name="v2i_red_green_warning">false</bool>
<!-- 是否开启路侧弱势交通参与者-->
<bool name="v2i_weakness_traffic">false</bool>
<!-- 是否开启V2I场景进PNC -->
<bool name="v2i_from_pnc">false</bool>
<!-- 是否开启v2v总开关 -->
<bool name="v2v_total_switch">false</bool>
<!-- 是否开启obu总开关 -->
<bool name="obu_total_switch">false</bool>
<!-- 危险障碍物颜色标记开关-->
<bool name="hd_is_pnc_warning">true</bool>
<!-- 是否绘制点云效果-->
<bool name="hd_is_point_cloud_effect">false</bool>
<!-- 是否绘制自车光圈-->
<bool name="hd_is_self_car_anim">true</bool>
<!-- 是否绘制引导线动态效果-->
<bool name="hd_route_dynamic_effect">true</bool>
</resources>