Merge branch 'dev_arch_opt_3.0' into dev_robobus-m1-p-app-module_1.0.0_230112_1.0.0

# Conflicts:
#	OCH/mogo-och-bus-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/ui/BusPassengerTrafficLightView.java
#	OCH/mogo-och-bus-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/ui/BusPassengerTrafficLightView.kt
This commit is contained in:
yangyakun
2023-02-02 12:05:53 +08:00
188 changed files with 2670 additions and 2203 deletions

View File

@@ -44,8 +44,7 @@ public class BusPassengerRouteFragment extends
private final String TAG = "BusPassengerRouteFragment";
private BusPassengerTrafficLightView mTrafficLightView;
private List<BusPassengerStation> mStationsList = new ArrayList<>();
private final List<BusPassengerStation> mStationsList = new ArrayList<>();
private TextView mSpeedTv;
private ConstraintLayout mNoLineInfoView;
@@ -75,8 +74,6 @@ public class BusPassengerRouteFragment extends
@Override
protected void initViews() {
super.initViews();
mTrafficLightView = findViewById(R.id.bus_p_traffic_light_view);
CallerHmiManager.INSTANCE.setProxyTrafficLightView(mTrafficLightView);
mSpeedTv = findViewById(R.id.bus_p_speed_tv);

View File

@@ -1,194 +0,0 @@
package com.mogo.och.bus.passenger.ui;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.mogo.eagle.core.function.api.hmi.view.IViewTrafficLight;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
import com.mogo.och.bus.passenger.R;
import org.jetbrains.annotations.Nullable;
/**
* bus乘客端红绿灯view
*
* Created on 2022/3/14
*/
public class BusPassengerTrafficLightView extends IViewTrafficLight {
private ImageView mLightIconIV;
private TextView mLightTimeTV;
private int mCurrentLightId;
private ImageView mLightIconBG;
public BusPassengerTrafficLightView(@Nullable Context context) {
this(context, null, 0);
}
public BusPassengerTrafficLightView(@Nullable Context context, @Nullable AttributeSet attrs) {
this(context, attrs, 0);
}
public BusPassengerTrafficLightView(@Nullable Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init(context);
}
private void init(Context context) {
LayoutInflater.from(context).inflate(R.layout.bus_p_traffic_light_view, this, true);
mLightIconIV = findViewById(R.id.bus_p_traffic_light_iv);
mLightTimeTV = findViewById(R.id.bus_p_traffic_light_time_tv);
mLightIconBG = findViewById(R.id.bus_p_traffic_light_bg);
}
/**
* 展示红绿灯预警
*
* @param checkLightId 0-都是默认1-红2-黄3-绿
* @param lightSource 1:云端下发2:自车感知
*/
@Override
public void showWarningTrafficLight(int checkLightId,int lightSource) {
super.showWarningTrafficLight(checkLightId,lightSource);
mCurrentLightId = checkLightId;
updateTrafficLightIcon(checkLightId);
}
/**
* 关闭红绿灯预警展示,并重制灯态
*/
@Override
public void disableWarningTrafficLight() {
super.disableWarningTrafficLight();
UiThreadHandler.post(() -> {
mCurrentLightId = 0;
BusPassengerTrafficLightView.this.setVisibility(GONE);
});
}
/**
* @param redNum 红灯倒计时
* @param yellowNum 黄灯倒计时
* @param greenNum 绿灯倒计时
*/
@Override
public void changeCountdownTrafficLightNum(int redNum, int yellowNum, int greenNum) {
super.changeCountdownTrafficLightNum(redNum, yellowNum, greenNum);
resetView();
switch (mCurrentLightId) {
case 1:
changeCountdownRed(redNum);
break;
case 2:
changeCountdownYellow(yellowNum);
break;
case 3:
changeCountdownGreen(greenNum);
break;
default:
UiThreadHandler.post(() -> {
mLightTimeTV.setText("");
});
break;
}
}
@Override
public void changeCountdownRed(int redNum) {
super.changeCountdownRed(redNum);
UiThreadHandler.post(() -> {
if (redNum > 0) {
resetView();
mLightTimeTV.setText(String.valueOf(redNum));
} else {
disableCountdown();
mLightTimeTV.setText("");
}
});
}
@Override
public void changeCountdownGreen(int greenNum) {
super.changeCountdownGreen(greenNum);
UiThreadHandler.post(() -> {
if (greenNum > 0) {
resetView();
mLightTimeTV.setText(String.valueOf(greenNum));
} else {
disableCountdown();
mLightTimeTV.setText("");
}
});
}
@Override
public void changeCountdownYellow(int yellowNum) {
super.changeCountdownYellow(yellowNum);
UiThreadHandler.post(() -> {
if (yellowNum > 0) {
resetView();
mLightTimeTV.setText(String.valueOf(yellowNum));
} else {
disableCountdown();
mLightTimeTV.setText("");
}
});
}
/**
* 更新红绿灯icon
*
* @param lightId 0-都是默认1-红2-黄3-绿
*/
private void updateTrafficLightIcon(int lightId) {
UiThreadHandler.post(() -> {
switch (lightId) {
case 1:
mLightIconIV.setBackgroundResource(R.drawable.bus_p_light_red_nor);
BusPassengerTrafficLightView.this.setVisibility(VISIBLE);
break;
case 2:
mLightIconIV.setBackgroundResource(R.drawable.bus_p_light_yellow_nor);
BusPassengerTrafficLightView.this.setVisibility(VISIBLE);
break;
case 3:
mLightIconIV.setBackgroundResource(R.drawable.bus_p_light_green_nor);
BusPassengerTrafficLightView.this.setVisibility(VISIBLE);
break;
default:
BusPassengerTrafficLightView.this.setVisibility(GONE);
break;
}
});
}
@Override
public void disableCountdown() {
super.disableCountdown();
UiThreadHandler.post(() ->{
ViewGroup.LayoutParams layoutParams = getLayoutParams();
if (layoutParams instanceof MarginLayoutParams){
MarginLayoutParams lp = (MarginLayoutParams) layoutParams;
lp.width = (int) getResources().getDimension(R.dimen.bus_p_traffic_light_icon_size);
setLayoutParams(lp);
mLightTimeTV.setVisibility(GONE);
mLightIconBG.getLayoutParams().width = (int)getResources().getDimension(R.dimen.dp_90);
}
});
}
private void resetView(){
ViewGroup.LayoutParams layoutParams = getLayoutParams();
if (layoutParams instanceof MarginLayoutParams) {
MarginLayoutParams lp = (MarginLayoutParams) layoutParams;
lp.width = (int) getResources().getDimension(R.dimen.bus_p_route_traffic_light_view_width);
setLayoutParams(lp);
mLightTimeTV.setVisibility(VISIBLE);
mLightIconBG.getLayoutParams().width = (int) getResources().getDimension(R.dimen.bus_p_traffic_light_bg_width);
}
}
}

View File

@@ -0,0 +1,179 @@
package com.mogo.och.bus.passenger.ui
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.widget.LinearLayout
import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.data.enums.TrafficLightEnum
import com.mogo.eagle.core.function.api.trafficlight.IMoGoTrafficLightListener
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.mogo.och.bus.passenger.R
import kotlinx.android.synthetic.main.bus_p_traffic_light_view.view.*
/**
* bus乘客端红绿灯view
*
* Created on 2022/3/14
*/
class BusPassengerTrafficLightView @JvmOverloads constructor(
context: Context?,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : LinearLayout(context, attrs, defStyleAttr), IMoGoTrafficLightListener {
companion object {
private const val TAG = "BusPassengerTrafficLightView"
}
private var mCurrentLightId = TrafficLightEnum.BLACK
init {
init(context)
}
private fun init(context: Context?) {
LayoutInflater.from(context).inflate(R.layout.bus_p_traffic_light_view, this, true)
}
override fun onAttachedToWindow() {
super.onAttachedToWindow()
CallerTrafficLightListenerManager.addListener(TAG, this)
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
CallerTrafficLightListenerManager.removeListener(TAG)
}
/**
* 展示红绿灯预警
*
* @param checkLightId 0-都是默认1-红2-黄3-绿
* @param lightSource 1:云端下发2:自车感知
*/
override fun showTrafficLight(checkLightId: TrafficLightEnum, lightSource: DataSourceType) {
super.showTrafficLight(checkLightId, lightSource)
mCurrentLightId = checkLightId
updateTrafficLightIcon(checkLightId)
}
/**
* 关闭红绿灯预警展示,并重制灯态
*/
override fun disableTrafficLight() {
super.disableTrafficLight()
UiThreadHandler.post {
mCurrentLightId = TrafficLightEnum.BLACK
this@BusPassengerTrafficLightView.visibility = GONE
}
}
/**
* @param redNum 红灯倒计时
* @param yellowNum 黄灯倒计时
* @param greenNum 绿灯倒计时
*/
override fun changeCountdownTrafficLightNum(redNum: Int, yellowNum: Int, greenNum: Int) {
super.changeCountdownTrafficLightNum(redNum, yellowNum, greenNum)
resetView()
when (mCurrentLightId) {
TrafficLightEnum.RED -> changeCountdownRed(redNum)
TrafficLightEnum.YELLOW -> changeCountdownYellow(yellowNum)
TrafficLightEnum.GREEN -> changeCountdownGreen(greenNum)
else -> UiThreadHandler.post { bus_p_traffic_light_time_tv.text = "" }
}
}
override fun changeCountdownRed(redNum: Int) {
super.changeCountdownRed(redNum)
UiThreadHandler.post {
if (redNum > 0) {
resetView()
bus_p_traffic_light_time_tv.text = redNum.toString()
} else {
disableTrafficLightCountDown()
bus_p_traffic_light_time_tv.text = ""
}
}
}
override fun changeCountdownGreen(greenNum: Int) {
super.changeCountdownGreen(greenNum)
UiThreadHandler.post {
if (greenNum > 0) {
resetView()
bus_p_traffic_light_time_tv.text = greenNum.toString()
} else {
disableTrafficLightCountDown()
bus_p_traffic_light_time_tv.text = ""
}
}
}
override fun changeCountdownYellow(yellowNum: Int) {
super.changeCountdownYellow(yellowNum)
UiThreadHandler.post {
if (yellowNum > 0) {
resetView()
bus_p_traffic_light_time_tv.text = yellowNum.toString()
} else {
disableTrafficLightCountDown()
bus_p_traffic_light_time_tv.text = ""
}
}
}
/**
* 更新红绿灯icon
*
* @param lightId 0-都是默认1-红2-黄3-绿
*/
private fun updateTrafficLightIcon(lightId: TrafficLightEnum) {
UiThreadHandler.post {
when (lightId) {
TrafficLightEnum.RED -> {
bus_p_traffic_light_iv.setBackgroundResource(R.drawable.bus_p_light_red_nor)
this@BusPassengerTrafficLightView.visibility = VISIBLE
}
TrafficLightEnum.YELLOW -> {
bus_p_traffic_light_iv.setBackgroundResource(R.drawable.bus_p_light_yellow_nor)
this@BusPassengerTrafficLightView.visibility = VISIBLE
}
TrafficLightEnum.GREEN -> {
bus_p_traffic_light_iv.setBackgroundResource(R.drawable.bus_p_light_green_nor)
this@BusPassengerTrafficLightView.visibility = VISIBLE
}
else -> this@BusPassengerTrafficLightView.visibility = GONE
}
}
}
override fun disableTrafficLightCountDown() {
super.disableTrafficLightCountDown()
UiThreadHandler.post {
val layoutParams = layoutParams
if (layoutParams is MarginLayoutParams) {
val lp = layoutParams
lp.width = resources.getDimension(R.dimen.bus_p_traffic_light_icon_size).toInt()
setLayoutParams(lp)
bus_p_traffic_light_time_tv.visibility = GONE
bus_p_traffic_light_bg.layoutParams.width =
resources.getDimension(R.dimen.dp_90).toInt()
}
}
}
private fun resetView() {
val layoutParams = layoutParams
if (layoutParams is MarginLayoutParams) {
val lp = layoutParams
lp.width = resources.getDimension(R.dimen.bus_p_route_traffic_light_view_width).toInt()
setLayoutParams(lp)
bus_p_traffic_light_time_tv.visibility = VISIBLE
bus_p_traffic_light_bg.layoutParams.width =
resources.getDimension(R.dimen.bus_p_traffic_light_bg_width).toInt()
}
}
}

View File

@@ -29,6 +29,9 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListener
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager;
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
import com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxBubbleView;
import com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxButtonView;
import com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxListView;
import com.mogo.eagle.core.function.hmi.ui.widget.TrafficDataView;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.mogo.view.OnPreventFastClickListener;
@@ -77,6 +80,11 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
private ImageView mSwitchMapModeImage;
private LinearLayout mSwitchMapModeLayout;
//消息盒子
private DriverMsgBoxButtonView viewDriverMsgBoxButton;
private DriverMsgBoxListView viewDriverMsgBoxList;
private DriverMsgBoxBubbleView viewDriverMsgBoxBubble;
private ObjectAnimator autopilotLoadingAnimator;
public boolean isAnimateRunning = false;
@@ -194,6 +202,22 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
if (mAICollectBtn != null) {
CallerDevaToolsManager.INSTANCE.initAiCollect(mAICollectBtn);
}
//消息盒子
viewDriverMsgBoxButton = findViewById(R.id.viewDriverMsgBoxButton);
viewDriverMsgBoxList = findViewById(R.id.viewDriverMsgBoxList);
viewDriverMsgBoxBubble = findViewById(R.id.viewDriverMsgBoxBubble);
viewDriverMsgBoxButton.setClickListener(show -> {
if(show){
viewDriverMsgBoxList.setVisibility(View.VISIBLE);
viewDriverMsgBoxList.notifyData();
viewDriverMsgBoxBubble.setVisibility(View.GONE);
viewDriverMsgBoxBubble.isShowData(false);
}else{
viewDriverMsgBoxList.setVisibility(View.GONE);
viewDriverMsgBoxBubble.setVisibility(View.VISIBLE);
viewDriverMsgBoxBubble.isShowData(true);
}
});
}
@Nullable

View File

@@ -1,167 +0,0 @@
package com.mogo.och.bus.ui;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.ImageView;
import com.mogo.eagle.core.function.api.hmi.view.IViewTrafficLight;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
import com.mogo.och.bus.R;
import com.mogo.och.common.module.wigets.OCHGradientTextView;
import org.jetbrains.annotations.Nullable;
/**
* Bus司机端红绿灯view
*
* Created on 2022/3/29
*/
public class BusTrafficLightView extends IViewTrafficLight {
private ImageView mLightIconIV;
private OCHGradientTextView mLightTimeTV;
private int mCurrentLightId;
public BusTrafficLightView(@Nullable Context context) {
this(context, null, 0);
}
public BusTrafficLightView(@Nullable Context context, @Nullable AttributeSet attrs) {
this(context, attrs, 0);
}
public BusTrafficLightView(@Nullable Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init(context);
}
private void init(Context context) {
LayoutInflater.from(context).inflate(R.layout.bus_traffic_light_view, this, true);
mLightIconIV = findViewById(R.id.bus_traffic_light_iv);
mLightTimeTV = findViewById(R.id.bus_traffic_light_time_tv);
}
/**
* 展示红绿灯预警
*
* @param checkLightId 0-都是默认1-红2-黄3-绿
* @param lightSource 1:云端下发2:自车感知
*/
@Override
public void showWarningTrafficLight(int checkLightId,int lightSource) {
super.showWarningTrafficLight(checkLightId,lightSource);
mCurrentLightId = checkLightId;
updateTrafficLightIcon(checkLightId);
}
/**
* 关闭红绿灯预警展示,并重制灯态
*/
@Override
public void disableWarningTrafficLight() {
super.disableWarningTrafficLight();
UiThreadHandler.post(() -> {
mCurrentLightId = 0;
BusTrafficLightView.this.setVisibility(GONE);
});
}
/**
* @param redNum 红灯倒计时
* @param yellowNum 黄灯倒计时
* @param greenNum 绿灯倒计时
*/
@Override
public void changeCountdownTrafficLightNum(int redNum, int yellowNum, int greenNum) {
super.changeCountdownTrafficLightNum(redNum, yellowNum, greenNum);
switch (mCurrentLightId) {
case 1:
changeCountdownRed(redNum);
break;
case 2:
changeCountdownYellow(yellowNum);
break;
case 3:
changeCountdownGreen(greenNum);
break;
default:
UiThreadHandler.post(() -> {
mLightTimeTV.setText("");
});
break;
}
}
@Override
public void changeCountdownRed(int redNum) {
super.changeCountdownRed(redNum);
UiThreadHandler.post(() -> {
if (redNum > 0) {
mLightTimeTV.setVertrial(true);
mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.bus_traffic_light_red_color_up),
getResources().getColor(R.color.bus_traffic_light_red_color_down)});
mLightTimeTV.setText(String.valueOf(redNum));
} else {
mLightTimeTV.setText("");
}
});
}
@Override
public void changeCountdownGreen(int greenNum) {
super.changeCountdownGreen(greenNum);
UiThreadHandler.post(() -> {
if (greenNum > 0) {
mLightTimeTV.setVertrial(true);
mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.bus_traffic_light_green_color_up),
getResources().getColor(R.color.bus_traffic_light_green_color_down)});
mLightTimeTV.setText(String.valueOf(greenNum));
} else {
mLightTimeTV.setText("");
}
});
}
@Override
public void changeCountdownYellow(int yellowNum) {
super.changeCountdownYellow(yellowNum);
UiThreadHandler.post(() -> {
if (yellowNum > 0) {
mLightTimeTV.setVertrial(true);
mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.bus_traffic_light_yellow_color_up),
getResources().getColor(R.color.bus_traffic_light_yellow_color_down)});
mLightTimeTV.setText(String.valueOf(yellowNum));
} else {
mLightTimeTV.setText("");
}
});
}
/**
* 更新红绿灯icon
*
* @param lightId 0-都是默认1-红2-黄3-绿
*/
private void updateTrafficLightIcon(int lightId) {
UiThreadHandler.post(() -> {
switch (lightId) {
case 1:
mLightIconIV.setBackgroundResource(R.drawable.bus_light_red_nor);
BusTrafficLightView.this.setVisibility(VISIBLE);
break;
case 2:
mLightIconIV.setBackgroundResource(R.drawable.bus_lightyellow_nor);
BusTrafficLightView.this.setVisibility(VISIBLE);
break;
case 3:
mLightIconIV.setBackgroundResource(R.drawable.bus_light_green_nor);
BusTrafficLightView.this.setVisibility(VISIBLE);
break;
default:
BusTrafficLightView.this.setVisibility(GONE);
break;
}
});
}
}

View File

@@ -56,6 +56,7 @@
android:layout_width="120dp"
android:layout_height="120dp"
android:layout_marginTop="45dp"
android:layout_marginEnd="40dp"
app:layout_constraintRight_toLeftOf="@id/viewTrafficLightVr"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="SpeakableTextPresentCheck"
@@ -63,6 +64,7 @@
<!--限速牌子-->
<com.mogo.eagle.core.function.hmi.ui.widget.LimitingVelocityView
android:id="@+id/viewLimitingVelocity"
android:layout_width="120dp"
android:layout_height="120dp"
android:layout_marginTop="30dp"
@@ -77,6 +79,35 @@
app:layout_constraintTop_toBottomOf="@+id/ivCameraIcon"
tools:visibility="visible"/>
<!--消息盒子选择入口-->
<com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxButtonView
android:id="@+id/viewDriverMsgBoxButton"
android:layout_width="150dp"
android:layout_height="150dp"
android:layout_marginTop="15dp"
android:layout_marginEnd="25dp"
app:layout_constraintRight_toLeftOf="@id/viewLimitingVelocity"
app:layout_constraintTop_toBottomOf="@+id/ivCameraIcon"
/>
<!--消息盒子打开视图-->
<com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxListView
android:id="@+id/viewDriverMsgBoxList"
android:layout_width="864dp"
android:layout_height="746dp"
android:layout_marginEnd="40dp"
android:visibility="gone"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/viewDriverMsgBoxButton" />
<!--消息盒子气泡视图-->
<com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxBubbleView
android:id="@+id/viewDriverMsgBoxBubble"
android:layout_width="864dp"
android:layout_height="wrap_content"
android:layout_marginEnd="40dp"
android:visibility="visible"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/viewDriverMsgBoxButton" />
<!--红绿灯-->
<com.mogo.eagle.core.function.hmi.ui.widget.SingleTrafficLightView
android:id="@+id/viewTrafficLightVr"

View File

@@ -1,35 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="@dimen/bus_traffic_light_layout_width"
android:layout_height="@dimen/bus_traffic_light_layout_height"
android:visibility="visible">
<ImageView
android:layout_width="@dimen/bus_traffic_light_bg_width"
android:layout_height="@dimen/bus_traffic_light_bg_height"
android:background="@drawable/bg_bus_traffic_light_background"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginLeft="@dimen/bus_traffic_light_bg_margin_left"
android:layout_marginTop="@dimen/bus_traffic_light_bg_margin_top"/>
<ImageView
android:id="@+id/bus_traffic_light_iv"
android:layout_width="@dimen/bus_traffic_light_icon_size"
android:layout_height="@dimen/bus_traffic_light_icon_size"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
<com.mogo.och.common.module.wigets.OCHGradientTextView
android:id="@+id/bus_traffic_light_time_tv"
android:layout_width="@dimen/bus_traffic_light_time_view_width"
android:layout_height="match_parent"
android:textSize="@dimen/bus_traffic_light_time_size"
android:textStyle="bold"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,158 +0,0 @@
package com.mogo.och.sweeper.view;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.ImageView;
import android.widget.TextView;
import com.mogo.eagle.core.function.api.hmi.view.IViewTrafficLight;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
import com.mogo.och.sweeper.R;
import org.jetbrains.annotations.Nullable;
/**
* 清扫车红绿灯view-
*
* Created on 2022/3/29
*/
public class SweeperTrafficLightView extends IViewTrafficLight {
private ImageView mLightIconIV;
private TextView mLightTimeTV;
private int mCurrentLightId;
public SweeperTrafficLightView(@Nullable Context context) {
this(context, null, 0);
}
public SweeperTrafficLightView(@Nullable Context context, @Nullable AttributeSet attrs) {
this(context, attrs, 0);
}
public SweeperTrafficLightView(@Nullable Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init(context);
}
private void init(Context context) {
LayoutInflater.from(context).inflate(R.layout.sweeper_traffic_light_view, this, true);
mLightIconIV = findViewById(R.id.sweeper_traffic_light_iv);
mLightTimeTV = findViewById(R.id.sweeper_traffic_light_time_tv);
}
/**
* 展示红绿灯预警
*
* @param checkLightId 0-都是默认1-红2-黄3-绿
* @param lightSource 1:云端下发2:自车感知
*/
@Override
public void showWarningTrafficLight(int checkLightId,int lightSource) {
super.showWarningTrafficLight(checkLightId,lightSource);
mCurrentLightId = checkLightId;
updateTrafficLightIcon(checkLightId);
}
/**
* 关闭红绿灯预警展示,并重制灯态
*/
@Override
public void disableWarningTrafficLight() {
super.disableWarningTrafficLight();
UiThreadHandler.post(() -> {
mCurrentLightId = 0;
SweeperTrafficLightView.this.setVisibility(GONE);
});
}
/**
* @param redNum 红灯倒计时
* @param yellowNum 黄灯倒计时
* @param greenNum 绿灯倒计时
*/
@Override
public void changeCountdownTrafficLightNum(int redNum, int yellowNum, int greenNum) {
super.changeCountdownTrafficLightNum(redNum, yellowNum, greenNum);
switch (mCurrentLightId) {
case 1:
changeCountdownRed(redNum);
break;
case 2:
changeCountdownYellow(yellowNum);
break;
case 3:
changeCountdownGreen(greenNum);
break;
default:
UiThreadHandler.post(() -> {
mLightTimeTV.setText("");
});
break;
}
}
@Override
public void changeCountdownRed(int redNum) {
super.changeCountdownRed(redNum);
UiThreadHandler.post(() -> {
if (redNum > 0) {
mLightTimeTV.setText(String.valueOf(redNum));
} else {
mLightTimeTV.setText("");
}
});
}
@Override
public void changeCountdownGreen(int greenNum) {
super.changeCountdownGreen(greenNum);
UiThreadHandler.post(() -> {
if (greenNum > 0) {
mLightTimeTV.setText(String.valueOf(greenNum));
} else {
mLightTimeTV.setText("");
}
});
}
@Override
public void changeCountdownYellow(int yellowNum) {
super.changeCountdownYellow(yellowNum);
UiThreadHandler.post(() -> {
if (yellowNum > 0) {
mLightTimeTV.setText(String.valueOf(yellowNum));
} else {
mLightTimeTV.setText("");
}
});
}
/**
* 更新红绿灯icon
*
* @param lightId 0-都是默认1-红2-黄3-绿
*/
private void updateTrafficLightIcon(int lightId) {
UiThreadHandler.post(() -> {
switch (lightId) {
case 1:
mLightIconIV.setBackgroundResource(R.drawable.sweeper_light_red_nor);
SweeperTrafficLightView.this.setVisibility(VISIBLE);
break;
case 2:
mLightIconIV.setBackgroundResource(R.drawable.sweeper_lightyellow_nor);
SweeperTrafficLightView.this.setVisibility(VISIBLE);
break;
case 3:
mLightIconIV.setBackgroundResource(R.drawable.sweeper_light_green_nor);
SweeperTrafficLightView.this.setVisibility(VISIBLE);
break;
default:
SweeperTrafficLightView.this.setVisibility(GONE);
break;
}
});
}
}

View File

@@ -0,0 +1,139 @@
package com.mogo.och.sweeper.view
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.widget.LinearLayout
import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.data.enums.TrafficLightEnum
import com.mogo.eagle.core.function.api.trafficlight.IMoGoTrafficLightListener
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.mogo.och.sweeper.R
import kotlinx.android.synthetic.main.sweeper_traffic_light_view.view.*
/**
* 清扫车红绿灯view-
*
* Created on 2022/3/29
*/
class SweeperTrafficLightView @JvmOverloads constructor(
context: Context?,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : LinearLayout(context, attrs, defStyleAttr), IMoGoTrafficLightListener {
companion object {
private const val TAG = "SweeperTrafficLightView"
}
private var mCurrentLightId = TrafficLightEnum.BLACK
init {
init(context)
}
private fun init(context: Context?) {
LayoutInflater.from(context).inflate(R.layout.sweeper_traffic_light_view, this, true)
}
override fun onAttachedToWindow() {
super.onAttachedToWindow()
CallerTrafficLightListenerManager.addListener(TAG, this)
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
CallerTrafficLightListenerManager.removeListener(TAG)
}
/**
* 展示红绿灯预警
*
* @param checkLightId 0-都是默认1-红2-黄3-绿
* @param lightSource 1:云端下发2:自车感知
*/
override fun showTrafficLight(checkLightId: TrafficLightEnum, lightSource: DataSourceType) {
mCurrentLightId = checkLightId
updateTrafficLightIcon(checkLightId)
}
/**
* 关闭红绿灯预警展示,并重制灯态
*/
override fun disableTrafficLight() {
UiThreadHandler.post {
mCurrentLightId = TrafficLightEnum.BLACK
this@SweeperTrafficLightView.visibility = GONE
}
}
/**
* @param redNum 红灯倒计时
* @param yellowNum 黄灯倒计时
* @param greenNum 绿灯倒计时
*/
override fun changeCountdownTrafficLightNum(redNum: Int, yellowNum: Int, greenNum: Int) {
when (mCurrentLightId) {
TrafficLightEnum.RED -> changeCountdownRed(redNum)
TrafficLightEnum.YELLOW -> changeCountdownYellow(yellowNum)
TrafficLightEnum.GREEN -> changeCountdownGreen(greenNum)
else -> UiThreadHandler.post { sweeper_traffic_light_time_tv.text = "" }
}
}
override fun changeCountdownRed(redNum: Int) {
UiThreadHandler.post {
if (redNum > 0) {
sweeper_traffic_light_time_tv.text = redNum.toString()
} else {
sweeper_traffic_light_time_tv.text = ""
}
}
}
override fun changeCountdownGreen(greenNum: Int) {
UiThreadHandler.post {
if (greenNum > 0) {
sweeper_traffic_light_time_tv.text = greenNum.toString()
} else {
sweeper_traffic_light_time_tv.text = ""
}
}
}
override fun changeCountdownYellow(yellowNum: Int) {
UiThreadHandler.post {
if (yellowNum > 0) {
sweeper_traffic_light_time_tv.text = yellowNum.toString()
} else {
sweeper_traffic_light_time_tv.text = ""
}
}
}
/**
* 更新红绿灯icon
*
* @param lightId 0-都是默认1-红2-黄3-绿
*/
private fun updateTrafficLightIcon(lightId: TrafficLightEnum) {
UiThreadHandler.post {
when (lightId) {
TrafficLightEnum.RED -> {
sweeper_traffic_light_iv.setBackgroundResource(R.drawable.sweeper_light_red_nor)
this@SweeperTrafficLightView.visibility = VISIBLE
}
TrafficLightEnum.YELLOW -> {
sweeper_traffic_light_iv.setBackgroundResource(R.drawable.sweeper_lightyellow_nor)
this@SweeperTrafficLightView.visibility = VISIBLE
}
TrafficLightEnum.GREEN -> {
sweeper_traffic_light_iv.setBackgroundResource(R.drawable.sweeper_light_green_nor)
this@SweeperTrafficLightView.visibility = VISIBLE
}
else -> this@SweeperTrafficLightView.visibility = GONE
}
}
}
}

View File

@@ -8,7 +8,7 @@ import com.mogo.och.taxi.passenger.mulprocess.ICallback;
interface ILeftMenuService {
/**
* 向主进程传选中的item
* Pass the selected item to the main process
*/
void transmissionIndex(int index);

View File

@@ -26,6 +26,7 @@ import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo;
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
import com.mogo.eagle.core.data.enums.DataSourceType;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.data.msgbox.MsgBoxBean;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
@@ -607,6 +608,26 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
};
private final IMsgBoxEventListener iMsgBoxEventListener = new IMsgBoxEventListener() {
@Override
public void onBubbleReportClickEvent(@NonNull MsgBoxBean msgBoxBean) {
}
@Override
public void onBubbleV2XClickEvent(@NonNull MsgBoxBean msgBoxBean) {
}
@Override
public void onBubbleOperationClickEvent(@NonNull MsgBoxBean msgBoxBean) {
}
@Override
public void onUpdateTipEvent(boolean isShow) {
}
@Override
public void onSummaryClickEvent() {
if (mCurrentOCHOrder == null){

View File

@@ -15,12 +15,13 @@ import androidx.fragment.app.FragmentTransaction;
import com.mogo.commons.module.status.MogoStatusManager;
import com.mogo.commons.mvp.MvpFragment;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
import com.mogo.eagle.core.function.api.hmi.IMoGoHmiViewProxy;
import com.mogo.eagle.core.function.api.hmi.view.IViewNotification;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
import com.mogo.eagle.core.function.call.map.CallerSmpManager;
import com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxBubbleView;
import com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxButtonView;
import com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxListView;
import com.mogo.eagle.core.utilcode.util.OverlayViewUtils;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
import com.mogo.map.listener.IMogoMapListener;
@@ -55,12 +56,15 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
private ImageView mAutopilotImage;
private ImageView mMapswitchBtn;
private TaxiPassengerTrafficLightView mTrafficLightView;
private WeakReference<TaxiPassengerArrivedView> mArrivedEndView;
private WeakReference<TaxiPassengerCheckView> mArrivedCheckView;
private WeakReference<TaxiPassengerStartAutopilotView> mStartAutopilotView;
protected TaxiPassengerServingOrderFragment ochServingOrderFragment = null;
//消息盒子
private PassengerMsgBoxButtonView viewPassengerMsgBoxButton;
private PassengerMsgBoxBubbleView viewPassengerMsgBoxBubble;
private PassengerMsgBoxListView viewPassengerMsgBoxList;
private final Handler mHandler = new Handler(Looper.getMainLooper());
@@ -87,10 +91,6 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
hideEagleConfig();
mAutopilotImage = findViewById(R.id.module_och_autopilot_iv);
mTrafficLightView = findViewById(R.id.traffic_light_view);
CallerHmiManager.INSTANCE.setProxyTrafficLightView(mTrafficLightView);
mMapswitchBtn = findViewById(R.id.module_och_taxi_swich_map_iv);
updateSwitchMapIcon();
initListener();
@@ -100,6 +100,22 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
switchVRFlatMode(MogoStatusManager.getInstance().isVrMode());
//预加载视频进程
EmptyService.Companion.startService(getContext());
//消息盒子
viewPassengerMsgBoxButton = findViewById(R.id.viewPassengerMsgBoxButton);
viewPassengerMsgBoxBubble = findViewById(R.id.viewPassengerMsgBoxBubble);
viewPassengerMsgBoxList = findViewById(R.id.viewPassengerMsgBoxList);
viewPassengerMsgBoxButton.setClickListener(show -> {
if(show){
viewPassengerMsgBoxList.setVisibility(View.VISIBLE);
viewPassengerMsgBoxBubble.setVisibility(View.GONE);
viewPassengerMsgBoxBubble.isShowData(false);
}else{
viewPassengerMsgBoxList.setVisibility(View.GONE);
viewPassengerMsgBoxBubble.setVisibility(View.VISIBLE);
viewPassengerMsgBoxBubble.isShowData(true);
}
});
}
private void updateSwitchMapIcon() {

View File

@@ -1,202 +0,0 @@
package com.mogo.och.taxi.passenger.ui;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.mogo.eagle.core.function.api.hmi.view.IViewTrafficLight;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
import com.mogo.och.common.module.wigets.OCHGradientTextView;
import com.mogo.och.taxi.passenger.R;
import org.jetbrains.annotations.Nullable;
/**
* Taxi乘客端红绿灯view
*
* Created on 2022/3/14
*/
public class TaxiPassengerTrafficLightView extends IViewTrafficLight {
private ImageView mLightIconIV;
private OCHGradientTextView mLightTimeTV;
private int mCurrentLightId;
private ImageView mLightIconBG;
public TaxiPassengerTrafficLightView(@Nullable Context context) {
this(context, null, 0);
}
public TaxiPassengerTrafficLightView(@Nullable Context context, @Nullable AttributeSet attrs) {
this(context, attrs, 0);
}
public TaxiPassengerTrafficLightView(@Nullable Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init(context);
}
private void init(Context context) {
LayoutInflater.from(context).inflate(R.layout.taxi_p_traffic_light_view, this, true);
mLightIconIV = findViewById(R.id.taxi_p_traffic_light_iv);
mLightTimeTV = findViewById(R.id.taxi_p_traffic_light_time_tv);
mLightIconBG = findViewById(R.id.taxi_p_traffic_light_bg);
}
/**
* 展示红绿灯预警
*
* @param checkLightId 0-都是默认1-红2-黄3-绿
* @param lightSource 1:云端下发2:自车感知
*/
@Override
public void showWarningTrafficLight(int checkLightId,int lightSource) {
super.showWarningTrafficLight(checkLightId,lightSource);
mCurrentLightId = checkLightId;
updateTrafficLightIcon(checkLightId);
}
/**
* 关闭红绿灯预警展示,并重制灯态
*/
@Override
public void disableWarningTrafficLight() {
super.disableWarningTrafficLight();
UiThreadHandler.post(() -> {
mCurrentLightId = 0;
TaxiPassengerTrafficLightView.this.setVisibility(GONE);
});
}
/**
* @param redNum 红灯倒计时
* @param yellowNum 黄灯倒计时
* @param greenNum 绿灯倒计时
*/
@Override
public void changeCountdownTrafficLightNum(int redNum, int yellowNum, int greenNum) {
super.changeCountdownTrafficLightNum(redNum, yellowNum, greenNum);
resetView();
switch (mCurrentLightId) {
case 1:
changeCountdownRed(redNum);
break;
case 2:
changeCountdownYellow(yellowNum);
break;
case 3:
changeCountdownGreen(greenNum);
break;
default:
UiThreadHandler.post(() -> {
mLightTimeTV.setText("");
});
break;
}
}
@Override
public void changeCountdownRed(int redNum) {
super.changeCountdownRed(redNum);
UiThreadHandler.post(() -> {
if (redNum > 0) {
resetView();
mLightTimeTV.setVertrial(true);
mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.taxi_p_traffic_light_red_color_up),
getResources().getColor(R.color.taxi_p_traffic_light_red_color_down)});
mLightTimeTV.setText(String.valueOf(redNum));
} else {
disableCountdown();
mLightTimeTV.setText("");
}
});
}
@Override
public void changeCountdownGreen(int greenNum) {
super.changeCountdownGreen(greenNum);
UiThreadHandler.post(() -> {
if (greenNum > 0) {
resetView();
mLightTimeTV.setVertrial(true);
mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.taxi_p_traffic_light_green_color_up),
getResources().getColor(R.color.taxi_p_traffic_light_green_color_down)});
mLightTimeTV.setText(String.valueOf(greenNum));
} else {
disableCountdown();
mLightTimeTV.setText("");
}
});
}
@Override
public void changeCountdownYellow(int yellowNum) {
super.changeCountdownYellow(yellowNum);
UiThreadHandler.post(() -> {
if (yellowNum > 0) {
resetView();
mLightTimeTV.setVertrial(true);
mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.taxi_p_traffic_light_yellow_color_up),
getResources().getColor(R.color.taxi_p_traffic_light_yellow_color_down)});
mLightTimeTV.setText(String.valueOf(yellowNum));
} else {
disableCountdown();
mLightTimeTV.setText("");
}
});
}
/**
* 更新红绿灯icon
*
* @param lightId 0-都是默认1-红2-黄3-绿
*/
private void updateTrafficLightIcon(int lightId) {
UiThreadHandler.post(() -> {
switch (lightId) {
case 1:
mLightIconIV.setBackgroundResource(R.drawable.taxi_p_light_red_nor);
TaxiPassengerTrafficLightView.this.setVisibility(VISIBLE);
break;
case 2:
mLightIconIV.setBackgroundResource(R.drawable.taxi_p_lightyellow_nor);
TaxiPassengerTrafficLightView.this.setVisibility(VISIBLE);
break;
case 3:
mLightIconIV.setBackgroundResource(R.drawable.taxi_p_light_green_nor);
TaxiPassengerTrafficLightView.this.setVisibility(VISIBLE);
break;
default:
TaxiPassengerTrafficLightView.this.setVisibility(GONE);
break;
}
});
}
@Override
public void disableCountdown() {
super.disableCountdown();
UiThreadHandler.post(() ->{
ViewGroup.LayoutParams layoutParams = getLayoutParams();
if (layoutParams instanceof MarginLayoutParams){
MarginLayoutParams lp = (MarginLayoutParams) layoutParams;
lp.width = (int) getResources().getDimension(R.dimen.taxi_p_traffic_light_icon_size);
setLayoutParams(lp);
mLightTimeTV.setVisibility(GONE);
mLightIconBG.getLayoutParams().width = (int)getResources().getDimension(R.dimen.dp_124);
}
});
}
private void resetView(){
ViewGroup.LayoutParams layoutParams = getLayoutParams();
if (layoutParams instanceof MarginLayoutParams) {
MarginLayoutParams lp = (MarginLayoutParams) layoutParams;
lp.width = (int) getResources().getDimension(R.dimen.taxi_p_traffic_light_layout_width);
setLayoutParams(lp);
mLightTimeTV.setVisibility(VISIBLE);
mLightIconBG.getLayoutParams().width = (int) getResources().getDimension(R.dimen.taxi_p_traffic_light_bg_width);
}
}
}

View File

@@ -0,0 +1,200 @@
package com.mogo.och.taxi.passenger.ui
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.widget.LinearLayout
import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.data.enums.TrafficLightEnum
import com.mogo.eagle.core.function.api.trafficlight.IMoGoTrafficLightListener
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.mogo.och.taxi.passenger.R
import kotlinx.android.synthetic.main.taxi_p_traffic_light_view.view.*
/**
* Taxi乘客端红绿灯view
*
* Created on 2022/3/14
*/
class TaxiPassengerTrafficLightView @JvmOverloads constructor(
context: Context?,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : LinearLayout(context, attrs, defStyleAttr), IMoGoTrafficLightListener {
companion object {
private const val TAG = "TaxiPassengerTrafficLightView"
}
private var mCurrentLightId = TrafficLightEnum.BLACK
init {
init(context)
}
private fun init(context: Context?) {
LayoutInflater.from(context).inflate(R.layout.taxi_p_traffic_light_view, this, true)
}
override fun onAttachedToWindow() {
super.onAttachedToWindow()
CallerTrafficLightListenerManager.addListener(TAG, this)
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
CallerTrafficLightListenerManager.removeListener(TAG)
}
/**
* 展示红绿灯预警
*
* @param checkLightId 0-都是默认1-红2-黄3-绿
* @param lightSource 1:云端下发2:自车感知
*/
override fun showTrafficLight(checkLightId: TrafficLightEnum, lightSource: DataSourceType) {
super.showTrafficLight(checkLightId, lightSource)
mCurrentLightId = checkLightId
updateTrafficLightIcon(checkLightId)
}
/**
* 关闭红绿灯预警展示,并重制灯态
*/
override fun disableTrafficLight() {
super.disableTrafficLight()
UiThreadHandler.post {
mCurrentLightId = TrafficLightEnum.BLACK
this@TaxiPassengerTrafficLightView.visibility = GONE
}
}
/**
* @param redNum 红灯倒计时
* @param yellowNum 黄灯倒计时
* @param greenNum 绿灯倒计时
*/
override fun changeCountdownTrafficLightNum(redNum: Int, yellowNum: Int, greenNum: Int) {
super.changeCountdownTrafficLightNum(redNum, yellowNum, greenNum)
resetView()
when (mCurrentLightId) {
TrafficLightEnum.RED -> changeCountdownRed(redNum)
TrafficLightEnum.YELLOW -> changeCountdownYellow(yellowNum)
TrafficLightEnum.GREEN -> changeCountdownGreen(greenNum)
else -> UiThreadHandler.post { taxi_p_traffic_light_time_tv.text = "" }
}
}
override fun changeCountdownRed(redNum: Int) {
super.changeCountdownRed(redNum)
UiThreadHandler.post {
if (redNum > 0) {
resetView()
taxi_p_traffic_light_time_tv.setVertrial(true)
taxi_p_traffic_light_time_tv.setmColorList(
intArrayOf(
resources.getColor(R.color.taxi_p_traffic_light_red_color_up),
resources.getColor(R.color.taxi_p_traffic_light_red_color_down)
)
)
taxi_p_traffic_light_time_tv.text = redNum.toString()
} else {
disableTrafficLightCountDown()
taxi_p_traffic_light_time_tv.text = ""
}
}
}
override fun changeCountdownGreen(greenNum: Int) {
super.changeCountdownGreen(greenNum)
UiThreadHandler.post {
if (greenNum > 0) {
resetView()
taxi_p_traffic_light_time_tv.setVertrial(true)
taxi_p_traffic_light_time_tv.setmColorList(
intArrayOf(
resources.getColor(R.color.taxi_p_traffic_light_green_color_up),
resources.getColor(R.color.taxi_p_traffic_light_green_color_down)
)
)
taxi_p_traffic_light_time_tv.text = greenNum.toString()
} else {
disableTrafficLightCountDown()
taxi_p_traffic_light_time_tv.text = ""
}
}
}
override fun changeCountdownYellow(yellowNum: Int) {
super.changeCountdownYellow(yellowNum)
UiThreadHandler.post {
if (yellowNum > 0) {
resetView()
taxi_p_traffic_light_time_tv.setVertrial(true)
taxi_p_traffic_light_time_tv.setmColorList(
intArrayOf(
resources.getColor(R.color.taxi_p_traffic_light_yellow_color_up),
resources.getColor(R.color.taxi_p_traffic_light_yellow_color_down)
)
)
taxi_p_traffic_light_time_tv.text = yellowNum.toString()
} else {
disableTrafficLightCountDown()
taxi_p_traffic_light_time_tv.text = ""
}
}
}
/**
* 更新红绿灯icon
*
* @param lightId 0-都是默认1-红2-黄3-绿
*/
private fun updateTrafficLightIcon(lightId: TrafficLightEnum) {
UiThreadHandler.post {
when (lightId) {
TrafficLightEnum.RED -> {
taxi_p_traffic_light_iv.setBackgroundResource(R.drawable.taxi_p_light_red_nor)
this@TaxiPassengerTrafficLightView.visibility = VISIBLE
}
TrafficLightEnum.YELLOW -> {
taxi_p_traffic_light_iv.setBackgroundResource(R.drawable.taxi_p_lightyellow_nor)
this@TaxiPassengerTrafficLightView.visibility = VISIBLE
}
TrafficLightEnum.GREEN -> {
taxi_p_traffic_light_iv.setBackgroundResource(R.drawable.taxi_p_light_green_nor)
this@TaxiPassengerTrafficLightView.visibility = VISIBLE
}
else -> this@TaxiPassengerTrafficLightView.visibility = GONE
}
}
}
override fun disableTrafficLightCountDown() {
super.disableTrafficLightCountDown()
UiThreadHandler.post {
val layoutParams = layoutParams
if (layoutParams is MarginLayoutParams) {
layoutParams.width =
resources.getDimension(R.dimen.taxi_p_traffic_light_icon_size).toInt()
setLayoutParams(layoutParams)
taxi_p_traffic_light_time_tv.visibility = GONE
taxi_p_traffic_light_bg.layoutParams.width =
resources.getDimension(R.dimen.dp_124).toInt()
}
}
}
private fun resetView() {
val layoutParams = layoutParams
if (layoutParams is MarginLayoutParams) {
val lp = layoutParams
lp.width = resources.getDimension(R.dimen.taxi_p_traffic_light_layout_width).toInt()
setLayoutParams(lp)
taxi_p_traffic_light_time_tv.visibility = VISIBLE
taxi_p_traffic_light_bg.layoutParams.width =
resources.getDimension(R.dimen.taxi_p_traffic_light_bg_width).toInt()
}
}
}

View File

@@ -50,6 +50,36 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" />
<!--消息盒子-->
<com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxButtonView
android:id="@+id/viewPassengerMsgBoxButton"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_marginStart="320dp"
android:layout_marginBottom="50dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
/>
<com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxBubbleView
android:id="@+id/viewPassengerMsgBoxBubble"
android:layout_width="650dp"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@id/viewPassengerMsgBoxButton"
app:layout_constraintLeft_toLeftOf="@id/viewPassengerMsgBoxButton"
app:layout_constraintRight_toRightOf="@id/viewPassengerMsgBoxButton" />
<com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxListView
android:id="@+id/viewPassengerMsgBoxList"
android:layout_width="650dp"
android:layout_height="750dp"
android:layout_marginBottom="20dp"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@id/viewPassengerMsgBoxButton"
app:layout_constraintLeft_toLeftOf="@id/viewPassengerMsgBoxButton"
app:layout_constraintRight_toRightOf="@id/viewPassengerMsgBoxButton" />
<ImageView
android:id="@+id/iv_temp"
android:layout_width="300dp"

View File

@@ -32,6 +32,9 @@ import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager;
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
import com.mogo.eagle.core.function.call.map.CallerSmpManager;
import com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxBubbleView;
import com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxButtonView;
import com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxListView;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.mogo.view.OnPreventFastClickListener;
import com.mogo.eagle.core.utilcode.util.ToastUtils;
@@ -74,6 +77,11 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
protected RelativeLayout mSettingBtn;
protected LinearLayout mBadcaseBtn;
protected LinearLayout mAICollectBtn;
//消息盒子
protected DriverMsgBoxButtonView driverMsgBoxButtonView;
protected DriverMsgBoxListView viewDriverMsgBoxList;
protected DriverMsgBoxBubbleView viewDriverMsgBoxBubble;
protected TaxiAmapNaviFragment ochAmapNaviFragment = null;
protected TaxiRottingNaviFragment taxiRottingNaviFragment = null;
// protected TaxiTrafficLightView mTrafficLightView;
@@ -153,7 +161,9 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
mAnimFlowIv = findViewById(R.id.anim_flow_iv);
mAutopilotTv = findViewById(R.id.module_och_autopilot_tv);
flStationPanelContainer = findViewById(R.id.module_mogo_och_station_panel_container);
driverMsgBoxButtonView = findViewById(R.id.viewDriverMsgBoxButton);
viewDriverMsgBoxList = findViewById(R.id.viewDriverMsgBoxList);
viewDriverMsgBoxBubble = findViewById(R.id.viewDriverMsgBoxBubble);
// mTrafficLightView = findViewById(R.id.taxi_traffic_light_view);
// CallerHmiManager.INSTANCE.setProxyTrafficLightView(mTrafficLightView);
@@ -267,6 +277,19 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
showAmapNaviToStationFragment(false);
showRottingToStationFragment(false);
});
driverMsgBoxButtonView.setClickListener(show -> {
if(show){
viewDriverMsgBoxList.setVisibility(View.VISIBLE);
viewDriverMsgBoxList.notifyData();
viewDriverMsgBoxBubble.setVisibility(View.GONE);
viewDriverMsgBoxBubble.isShowData(false);
}else{
viewDriverMsgBoxList.setVisibility(View.GONE);
viewDriverMsgBoxBubble.setVisibility(View.VISIBLE);
viewDriverMsgBoxBubble.isShowData(true);
}
});
}
protected void onChangeOperationStatus() {

View File

@@ -1,167 +0,0 @@
package com.mogo.och.taxi.ui;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.ImageView;
import com.mogo.eagle.core.function.api.hmi.view.IViewTrafficLight;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
import com.mogo.och.common.module.wigets.OCHGradientTextView;
import com.mogo.och.taxi.R;
import org.jetbrains.annotations.Nullable;
/**
* Taxi司机端红绿灯view
*
* Created on 2022/3/29
*/
public class TaxiTrafficLightView extends IViewTrafficLight {
private ImageView mLightIconIV;
private OCHGradientTextView mLightTimeTV;
private int mCurrentLightId;
public TaxiTrafficLightView(@Nullable Context context) {
this(context, null, 0);
}
public TaxiTrafficLightView(@Nullable Context context, @Nullable AttributeSet attrs) {
this(context, attrs, 0);
}
public TaxiTrafficLightView(@Nullable Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init(context);
}
private void init(Context context) {
LayoutInflater.from(context).inflate(R.layout.taxi_traffic_light_view, this, true);
mLightIconIV = findViewById(R.id.taxi_traffic_light_iv);
mLightTimeTV = findViewById(R.id.taxi_traffic_light_time_tv);
}
/**
* 展示红绿灯预警
*
* @param checkLightId 0-都是默认1-红2-黄3-绿
* @param lightSource 1:云端下发2:自车感知
*/
@Override
public void showWarningTrafficLight(int checkLightId,int lightSource) {
super.showWarningTrafficLight(checkLightId,lightSource);
mCurrentLightId = checkLightId;
updateTrafficLightIcon(checkLightId);
}
/**
* 关闭红绿灯预警展示,并重制灯态
*/
@Override
public void disableWarningTrafficLight() {
super.disableWarningTrafficLight();
UiThreadHandler.post(() -> {
mCurrentLightId = 0;
TaxiTrafficLightView.this.setVisibility(GONE);
});
}
/**
* @param redNum 红灯倒计时
* @param yellowNum 黄灯倒计时
* @param greenNum 绿灯倒计时
*/
@Override
public void changeCountdownTrafficLightNum(int redNum, int yellowNum, int greenNum) {
super.changeCountdownTrafficLightNum(redNum, yellowNum, greenNum);
switch (mCurrentLightId) {
case 1:
changeCountdownRed(redNum);
break;
case 2:
changeCountdownYellow(yellowNum);
break;
case 3:
changeCountdownGreen(greenNum);
break;
default:
UiThreadHandler.post(() -> {
mLightTimeTV.setText("");
});
break;
}
}
@Override
public void changeCountdownRed(int redNum) {
super.changeCountdownRed(redNum);
UiThreadHandler.post(() -> {
if (redNum > 0) {
mLightTimeTV.setVertrial(true);
mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.taxi_traffic_light_red_color_up),
getResources().getColor(R.color.taxi_traffic_light_red_color_down)});
mLightTimeTV.setText(String.valueOf(redNum));
} else {
mLightTimeTV.setText("");
}
});
}
@Override
public void changeCountdownGreen(int greenNum) {
super.changeCountdownGreen(greenNum);
UiThreadHandler.post(() -> {
if (greenNum > 0) {
mLightTimeTV.setVertrial(true);
mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.taxi_traffic_light_green_color_up),
getResources().getColor(R.color.taxi_traffic_light_green_color_down)});
mLightTimeTV.setText(String.valueOf(greenNum));
} else {
mLightTimeTV.setText("");
}
});
}
@Override
public void changeCountdownYellow(int yellowNum) {
super.changeCountdownYellow(yellowNum);
UiThreadHandler.post(() -> {
if (yellowNum > 0) {
mLightTimeTV.setVertrial(true);
mLightTimeTV.setmColorList(new int[]{getResources().getColor(R.color.taxi_traffic_light_yellow_color_up),
getResources().getColor(R.color.taxi_traffic_light_yellow_color_down)});
mLightTimeTV.setText(String.valueOf(yellowNum));
} else {
mLightTimeTV.setText("");
}
});
}
/**
* 更新红绿灯icon
*
* @param lightId 0-都是默认1-红2-黄3-绿
*/
private void updateTrafficLightIcon(int lightId) {
UiThreadHandler.post(() -> {
switch (lightId) {
case 1:
mLightIconIV.setBackgroundResource(R.drawable.taxi_light_red_nor);
TaxiTrafficLightView.this.setVisibility(VISIBLE);
break;
case 2:
mLightIconIV.setBackgroundResource(R.drawable.taxi_lightyellow_nor);
TaxiTrafficLightView.this.setVisibility(VISIBLE);
break;
case 3:
mLightIconIV.setBackgroundResource(R.drawable.taxi_light_green_nor);
TaxiTrafficLightView.this.setVisibility(VISIBLE);
break;
default:
TaxiTrafficLightView.this.setVisibility(GONE);
break;
}
});
}
}

View File

@@ -121,6 +121,7 @@
<!--限速牌子-->
<com.mogo.eagle.core.function.hmi.ui.widget.LimitingVelocityView
android:id="@+id/viewLimitingVelocity"
android:layout_width="120dp"
android:layout_height="120dp"
android:layout_marginTop="30dp"
@@ -135,6 +136,35 @@
app:layout_constraintTop_toBottomOf="@+id/ivCameraIcon"
tools:visibility="visible"/>
<!--消息盒子选择入口-->
<com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxButtonView
android:id="@+id/viewDriverMsgBoxButton"
android:layout_width="150dp"
android:layout_height="150dp"
android:layout_marginTop="15dp"
android:layout_marginEnd="25dp"
app:layout_constraintRight_toLeftOf="@id/viewLimitingVelocity"
app:layout_constraintTop_toBottomOf="@+id/ivCameraIcon"
/>
<!--消息盒子打开视图-->
<com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxListView
android:id="@+id/viewDriverMsgBoxList"
android:layout_width="864dp"
android:layout_height="746dp"
android:layout_marginEnd="40dp"
android:visibility="gone"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/viewDriverMsgBoxButton" />
<!--消息盒子气泡视图-->
<com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxBubbleView
android:id="@+id/viewDriverMsgBoxBubble"
android:layout_width="864dp"
android:layout_height="wrap_content"
android:layout_marginEnd="40dp"
android:visibility="visible"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/viewDriverMsgBoxButton" />
<!--红绿灯-->
<com.mogo.eagle.core.function.hmi.ui.widget.SingleTrafficLightView
android:id="@+id/viewTrafficLightVr"

View File

@@ -1,62 +0,0 @@
package com.mogo.launcher.lancet
import android.database.sqlite.*
import androidx.annotation.*
import com.knightboost.lancet.api.*
import com.knightboost.lancet.api.annotations.*
import com.knightboost.lancet.api.annotations.Weaver
/**
* 此类主要用来修正三方库引起的崩溃
*/
@Keep
@Weaver
@Group("leak_canary_crash_fix")
class LeakCanaryCrashFix {
@Insert
@TargetClass("leakcanary.internal.activity.db.ScopedLeaksDb\$DbOpener")
@TargetMethod(methodName = "getReadableDatabase")
fun proxyGetReadableSQLiteDb(): SQLiteDatabase? {
try {
return Origin.call() as SQLiteDatabase?
} catch (t: Throwable) {
t.printStackTrace()
}
return null
}
@Insert
@TargetClass("leakcanary.internal.activity.db.ScopedLeaksDb\$DbOpener")
@TargetMethod(methodName = "getWritableDatabase")
fun proxyGetWritableSQLiteDb(): SQLiteDatabase? {
try {
return Origin.call() as SQLiteDatabase?
} catch (t: Throwable) {
t.printStackTrace()
}
return null
}
@Insert
@TargetClass("leakcanary.internal.activity.db.ScopedLeaksDb\$DbOpener")
@TargetMethod(methodName = "close")
fun proxyClose() {
try {
Origin.callVoid()
} catch (t: Throwable) {
t.printStackTrace()
}
}
@Insert
@TargetClass("leakcanary.internal.activity.db.Io\$execute\$2")
@TargetMethod(methodName = "run")
fun proxyRun() {
try {
Origin.callVoid()
} catch (t: Throwable) {
t.printStackTrace()
}
}
}

View File

@@ -89,8 +89,6 @@ object ConfigStartUp {
HdMapBuildConfig.currentCarVrIconRes = R.raw.chuzuche
} else if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
HdMapBuildConfig.currentCarVrIconRes = R.raw.xiaobache
// HmiBuildConfig.isShowBrakeLightView = false
// HmiBuildConfig.isShowTurnLightView = false
} else if (AppIdentityModeUtils.isSweeper(FunctionBuildConfig.appIdentityMode)) {
HdMapBuildConfig.currentCarVrIconRes = R.raw.huanwei
}

View File

@@ -153,6 +153,32 @@ public class DataDistribution {
private long listBagManagerCmdSize = 0;
private long listObuWarningDataSize = 0;
public void clearCount() {
listTrajectorySize = 1;
listTrackedObjectsSize = 1;
listGnssInfoSize = 1;
listVehicleStateSize = 1;
listAutopilotStateSize = 1;
listMogoReportMessageSize = 1;
listPerceptionTrafficLightSize = 1;
listPredictionObstacleTrajectorySize = 1;
listRecordPanelSize = 1;
listGlobalPathRespSize = 1;
listWarnSize = 1;
listArrivalNotificationSize = 1;
listStatusInfoSize = 1;
listRecordDataConfigSize = 1;
listErrorDataSize = 1;
listOriginalPointCloudSize = 1;
listPlanningObjectsSize = 1;
listPlanningDecisionStateSize = 1;
listChassisStatesSize = 1;
listFSMFunctionStatesSize = 1;
listRoboSweeperTaskIndexSize = 1;
listBagManagerCmdSize = 1;
listObuWarningDataSize = 1;
}
public String cutDown(String str) {
if (isCutDown && str.length() > 650) {
str = str.substring(0, 650) + "\n已缩短。如需查看完整数据请勾选日志存储复选框";

View File

@@ -12,6 +12,7 @@ import android.os.Build;
import android.os.Bundle;
import android.os.Message;
import android.os.PowerManager;
import android.os.SystemClock;
import android.provider.Settings;
import android.text.Editable;
import android.text.Html;
@@ -43,6 +44,8 @@ import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.SimpleItemAnimator;
import com.google.protobuf.TextFormat;
import com.mogo.support.obu.ObuPenetrate;
import com.mogo.support.obu.ObuScene;
import com.mogo.telematic.MogoProtocolMsg;
import com.mogo.telematic.NSDNettyManager;
import com.mogo.telematic.client.listener.NettyClientListener;
@@ -138,6 +141,9 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
private static final int WHAT_IPC_IP = 0x00;
private static final int WHAT_DRIVER_IP = 0x01;
private static final int WHAT_IPC_CONNECT_STATE = 0x02;
private static final int WHAT_RECEIVE_ERROR_DATA_SHOW = 0x03;
private static final int WHAT_RECEIVE_ERROR_DATA_HINT = 0x04;
private static final int WHAT_RECEIVE_ERROR_DATA_STOP = 0x05;
private EditText etIp;
private ImageView role;
private ImageView tvIp;
@@ -181,6 +187,7 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
private boolean isAutopilotAbility = true;
private String autopilotAbilityReason;
private List<SpecialVehicleBean> specialVehicleBeanList;//特种车辆
private long errorDataUpdateTime = 0;
// @Override
// protected void onStart() {
// super.onStart();
@@ -548,7 +555,14 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
title.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showLocalIP();
if (TextUtils.equals(title.getText(), getString(R.string.have_error_data))) {
int position=titleFragmentData.size() - 1;
infoFragment.smoothScrollToPosition(position);
fragmentAdapter.setSelectedPosition(position);
showFragment(Constants.TITLE.RECEIVE_ERROR);
} else {
showLocalIP();
}
}
});
title.setOnLongClickListener(new View.OnLongClickListener() {
@@ -829,6 +843,18 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
@Override
public void onError(ProtocolStatus status, byte[] bytes) {
long errorDataReceiveTime = SystemClock.elapsedRealtime();
if (errorDataUpdateTime == 0) {
errorDataUpdateTime = errorDataReceiveTime + 800;
}
if (errorDataReceiveTime > errorDataUpdateTime) {
errorDataUpdateTime = 0;
getHandler().sendEmptyMessage(WHAT_RECEIVE_ERROR_DATA_SHOW);
if (getHandler().hasMessages(WHAT_RECEIVE_ERROR_DATA_STOP)) {
getHandler().removeMessages(WHAT_RECEIVE_ERROR_DATA_STOP);
}
getHandler().sendEmptyMessageDelayed(WHAT_RECEIVE_ERROR_DATA_STOP, 1500);
}
ErrorData base = new ErrorData(status, bytes);
DataDistribution.getInstance().addData(base);
}
@@ -1045,6 +1071,26 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
DataDistribution.getInstance().addData(base);
}
@Override
public void onoObuSpatWarning(MessagePad.Header header, ObuScene.SpatWarningData spatWarningData) {
}
@Override
public void onoObuRsiWarning(MessagePad.Header header, ObuScene.RsiWarningData rsiWarningData) {
}
@Override
public void onoObuRsmWarning(MessagePad.Header header, ObuScene.RsmWarningData rsmWarningData) {
}
@Override
public void onoObuObuMapMath(MessagePad.Header header, ObuScene.MapMatchData mapMatchData) {
}
@Override
public void onFunctionStates(MessagePad.Header header, FunctionStates.FSMFunctionStates functionStates) {
FSMFunctionStates base = new FSMFunctionStates(header, functionStates, sdf);
@@ -1177,6 +1223,7 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
connectStatus = ipcConnectionStatus;
String status = onUpdateConnectStateView();
if (connectStatus == IPC_CONNECTION_STATUS.CONNECTED) {
DataDistribution.getInstance().clearCount();
getHandler().sendEmptyMessage(WHAT_IPC_IP);
String tem = getIPCIP();
if (!TextUtils.isEmpty(tem)) {
@@ -1581,6 +1628,21 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
tvConnectState.setText(status.status);
tvConnectState.setTextColor(getResources().getColor(status.color));
break;
case WHAT_RECEIVE_ERROR_DATA_SHOW:
title.setText(R.string.have_error_data);
title.setTextColor(getColor(android.R.color.holo_red_light));
title.setVisibility(View.VISIBLE);
getHandler().sendEmptyMessageDelayed(WHAT_RECEIVE_ERROR_DATA_HINT, 500);
break;
case WHAT_RECEIVE_ERROR_DATA_HINT:
title.setVisibility(View.INVISIBLE);
break;
case WHAT_RECEIVE_ERROR_DATA_STOP:
title.setText(R.string.app_name);
title.setTextColor(getColor(R.color.colorWhile));
title.setVisibility(View.VISIBLE);
errorDataUpdateTime = 0;
break;
}
}
}

View File

@@ -17,6 +17,7 @@
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:minWidth="110dp"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:text="@string/app_name"

View File

@@ -1,5 +1,6 @@
<resources>
<string name="app_name">工控机监控</string>
<string name="have_error_data">存在错误数据</string>
<string name="action_settings">添加</string>
<string name="action_save">保存</string>
<string name="action_del">删除</string>

View File

@@ -33,6 +33,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.SimpleItemAnimator;
import com.mogo.support.obu.ObuScene;
import com.zhidao.adas.magic.R;
import com.zhidao.adas.magic.adapter.InfoTitleAdapter;
import com.zhidao.adas.magic.base.BaseActivity;
@@ -551,6 +552,26 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
}
@Override
public void onoObuSpatWarning(MessagePad.Header header, ObuScene.SpatWarningData spatWarningData) {
}
@Override
public void onoObuRsiWarning(MessagePad.Header header, ObuScene.RsiWarningData rsiWarningData) {
}
@Override
public void onoObuRsmWarning(MessagePad.Header header, ObuScene.RsmWarningData rsmWarningData) {
}
@Override
public void onoObuObuMapMath(MessagePad.Header header, ObuScene.MapMatchData mapMatchData) {
}
@Override
public void onFunctionStates(MessagePad.Header header, FunctionStates.FSMFunctionStates functionStates) {

View File

@@ -1,65 +0,0 @@
package com.mogo.eagle.function.biz.v2x.trafficlight
import com.mogo.eagle.core.data.trafficlight.*
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
class TrafficLightHMIManager {
companion object {
const val TAG = "TrafficLightHMIManager"
val INSTANCE: TrafficLightHMIManager by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
TrafficLightHMIManager()
}
}
private var initView: Boolean = false
fun isWarningTrafficLightShow(): Boolean {
return CallerHmiManager.isWarningTrafficLightShow()
}
fun updateTrafficLight(trafficLightResult: TrafficLightResult) {
val currentTrafficLight = trafficLightResult.currentRoadTrafficLight()
currentTrafficLight?.let {
if (!initView) {
initView = true
CallerHmiManager.showWarningTrafficLight(0,1)
}
callerHMIToChangeLight(it)
}
}
private fun callerHMIToChangeLight(trafficLightStatus: TrafficLightStatus) {
val remain = if (trafficLightStatus.remain > 99) {
99
} else {
trafficLightStatus.remain
}
when {
trafficLightStatus.isGreen() || trafficLightStatus.isFlashGreen() -> {
CallerHmiManager.showWarningTrafficLight(3,1)
CallerHmiManager.changeCountdownGreen(remain)
// CallerHmiManager.changeCountdownRed(-1)
// CallerHmiManager.changeCountdownYellow(-1)
}
trafficLightStatus.isYellow() -> {
CallerHmiManager.showWarningTrafficLight(2,1)
CallerHmiManager.changeCountdownYellow(remain)
// CallerHmiManager.changeCountdownGreen(-1)
// CallerHmiManager.changeCountdownRed(-1)
}
trafficLightStatus.isRed() -> {
CallerHmiManager.showWarningTrafficLight(1,1)
CallerHmiManager.changeCountdownRed(remain)
// CallerHmiManager.changeCountdownGreen(-1)
// CallerHmiManager.changeCountdownYellow(-1)
}
}
}
fun hideTrafficLight() {
initView = false
CallerHmiManager.disableWarningTrafficLight()
}
}

View File

@@ -8,14 +8,13 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Liste
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
import com.mogo.eagle.function.biz.v2x.trafficlight.TrafficLightHMIManager
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
import com.mogo.eagle.function.biz.v2x.trafficlight.core.TrafficLightThreadHandler.Companion.MSG_WHAT_LOOP_SEARCH_CROSS_ROAD
import com.mogo.eagle.function.biz.v2x.trafficlight.core.TrafficLightThreadHandler.Companion.MSG_WHAT_LOOP_SEARCH_TRAFFIC_LIGHT
import com.mogo.eagle.function.biz.v2x.trafficlight.core.TrafficLightThreadHandler.Companion.MSG_WHAT_STOP_SEARCH_CROSS_ROAD
import com.mogo.eagle.function.biz.v2x.trafficlight.core.TrafficLightThreadHandler.Companion.MSG_WHAT_STOP_SEARCH_TRAFFIC_LIGHT
import com.mogo.eagle.function.biz.v2x.trafficlight.network.TrafficLightNetWorkModel
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
import mogo.telematics.pad.MessagePad
class MogoTrafficLightManager : IMoGoChassisLocationGCJ02Listener {
@@ -46,9 +45,8 @@ class MogoTrafficLightManager : IMoGoChassisLocationGCJ02Listener {
mThreadHandler =
TrafficLightThreadHandler(Looper.getMainLooper(), {
//第一次查询路口时,如果红绿灯显示,则隐藏掉
if (firstLoopCrossRoad && TrafficLightHMIManager.INSTANCE.isWarningTrafficLightShow()) {
TrafficLightHMIManager.INSTANCE.hideTrafficLight()
CallerTrafficLightListenerManager.resetTrafficLightData()
if (firstLoopCrossRoad) {
CallerTrafficLightListenerManager.resetTrafficLightStatus()
}
firstLoopCrossRoad = false
mLocation?.let { it ->
@@ -98,10 +96,7 @@ class MogoTrafficLightManager : IMoGoChassisLocationGCJ02Listener {
2_000L
)
}
if (TrafficLightHMIManager.INSTANCE.isWarningTrafficLightShow()) {
TrafficLightHMIManager.INSTANCE.hideTrafficLight()
CallerTrafficLightListenerManager.resetTrafficLightData()
}
CallerTrafficLightListenerManager.resetTrafficLightStatus()
CallerTrafficLightListenerManager.invokeTrafficRequestError()
})
@@ -137,8 +132,7 @@ class MogoTrafficLightManager : IMoGoChassisLocationGCJ02Listener {
trafficLightResult = null
firstLoopCrossRoad = true
mThreadHandler?.sendEmptyMessage(MSG_WHAT_STOP_SEARCH_TRAFFIC_LIGHT)
TrafficLightHMIManager.INSTANCE.hideTrafficLight()
CallerTrafficLightListenerManager.resetTrafficLightData()
CallerTrafficLightListenerManager.resetTrafficLightStatus()
}
}
}

View File

@@ -2,25 +2,23 @@ package com.mogo.eagle.function.biz.v2x.trafficlight.core
import android.content.Context
import android.os.Handler
import com.mogo.eagle.core.data.trafficlight.TrafficLightResult
import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.data.enums.TrafficLightEnum
import com.mogo.eagle.core.data.trafficlight.*
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener
import com.mogo.eagle.core.function.api.obu.IMoGoObuTrafficLightListener
import com.mogo.eagle.core.function.api.trafficlight.IMoGoTrafficLightListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.obu.CallerObuTrafficLightListenerManager
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
import com.mogo.eagle.function.biz.v2x.trafficlight.TrafficLightHMIManager
import perception.TrafficLightOuterClass
import perception.TrafficLightOuterClass.TrafficLight
/**
* @author XuXinChao
* @description 对多个红绿灯信号来源进行统一调度AI云、工控机
* @description 对多个红绿灯信号来源进行统一调度AI云、工控机、OBU
* @优先级OBU,云,工控
* @since: 2022/4/28
*/
class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLightListener,
IMoGoObuTrafficLightListener {
class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLightListener {
companion object {
const val TAG = "TrafficLightDispatcher"
@@ -34,6 +32,7 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
//是否有AI获取红绿灯灯态
private var hasAiLightStatus: Boolean = false
//obu数据
private var hasObuLightStatus: Boolean = false
@@ -41,14 +40,8 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
mContext = context
//注册监听AI云获取红绿灯状态
CallerTrafficLightListenerManager.addListener(TAG, this)
//注册监听AI云进入路口
CallerTrafficLightListenerManager.addListener(TAG, this)
//注册监听红绿灯请求失败
CallerTrafficLightListenerManager.addListener(TAG, this)
//注册监听工控机感知红绿灯
CallerAutopilotIdentifyListenerManager.addListener(TAG, this)
//obu红绿灯数据
CallerObuTrafficLightListenerManager.addListener(TAG, this)
}
/**
@@ -71,27 +64,36 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
}
if (light == null) {
//隐藏红绿灯显示
TrafficLightHMIManager.INSTANCE.hideTrafficLight()
CallerTrafficLightListenerManager.disableTrafficLight()
} else {
when (light.state) {
TrafficLightOuterClass.LightState.STATE_RED -> {
//红灯
CallerHmiManager.showWarningTrafficLight(1, 2)
CallerHmiManager.changeCountdownGreen(0)
CallerTrafficLightListenerManager.showTrafficLight(
TrafficLightEnum.RED,
DataSourceType.TELEMATIC
)
CallerTrafficLightListenerManager.changeCountdownRed(0)
}
TrafficLightOuterClass.LightState.STATE_YELLOW -> {
//黄灯
CallerHmiManager.showWarningTrafficLight(2, 2)
CallerHmiManager.changeCountdownGreen(0)
CallerTrafficLightListenerManager.showTrafficLight(
TrafficLightEnum.YELLOW,
DataSourceType.TELEMATIC
)
CallerTrafficLightListenerManager.changeCountdownYellow(0)
}
TrafficLightOuterClass.LightState.STATE_GREEN -> {
//绿灯
CallerHmiManager.showWarningTrafficLight(3, 2)
CallerHmiManager.changeCountdownGreen(0)
CallerTrafficLightListenerManager.showTrafficLight(
TrafficLightEnum.GREEN,
DataSourceType.TELEMATIC
)
CallerTrafficLightListenerManager.changeCountdownGreen(0)
}
TrafficLightOuterClass.LightState.STATE_OFF -> {
//黑灯,隐藏红绿灯显示
TrafficLightHMIManager.INSTANCE.hideTrafficLight()
CallerTrafficLightListenerManager.disableTrafficLight()
}
else -> {}
}
@@ -107,7 +109,7 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
*/
override fun onTrafficLightStatus(trafficLightResult: TrafficLightResult) {
if (!hasObuLightStatus) {
TrafficLightHMIManager.INSTANCE.updateTrafficLight(trafficLightResult)
updateTrafficLight(trafficLightResult)
hasAiLightStatus = true
}
}
@@ -122,11 +124,8 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
hasAiLightStatus = false
hasObuLightStatus = false
}, 5000)
CallerTrafficLightListenerManager.resetTrafficLightData()
//如果没有OBU灯态则进行隐藏如果有OBU灯态则交由OBU管理
if(!hasObuLightStatus){
TrafficLightHMIManager.INSTANCE.hideTrafficLight()
}
CallerTrafficLightListenerManager.resetTrafficLightStatus(!hasObuLightStatus)
}
}
@@ -135,21 +134,41 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
*/
override fun onTrafficRequestError() {
hasAiLightStatus = false
CallerTrafficLightListenerManager.resetTrafficLightData()
if(!hasObuLightStatus){
if (TrafficLightHMIManager.INSTANCE.isWarningTrafficLightShow()) {
TrafficLightHMIManager.INSTANCE.hideTrafficLight()
}
}
CallerTrafficLightListenerManager.resetTrafficLightStatus(!hasObuLightStatus)
}
/**
* obu 红绿灯数据
*/
override fun onObuTrafficLight(light: Int) {
super.onObuTrafficLight(light)
override fun onObuTrafficLightStatus(light: TrafficLightEnum) {
super.onObuTrafficLightStatus(light)
hasObuLightStatus = true
CallerHmiManager.showWarningTrafficLight(light, 3)
CallerTrafficLightListenerManager.showTrafficLight(light, DataSourceType.OBU)
}
private fun updateTrafficLight(trafficLightResult: TrafficLightResult) {
val currentTrafficLight = trafficLightResult.currentRoadTrafficLight()
currentTrafficLight?.let {
val remain = if (it.remain > 99) {
99
} else {
it.remain
}
when {
it.isGreen() || it.isFlashGreen() -> {
CallerTrafficLightListenerManager.showTrafficLight(TrafficLightEnum.GREEN, DataSourceType.AICLOUD)
CallerTrafficLightListenerManager.changeCountdownGreen(remain)
}
it.isYellow() -> {
CallerTrafficLightListenerManager.showTrafficLight(TrafficLightEnum.YELLOW, DataSourceType.AICLOUD)
CallerTrafficLightListenerManager.changeCountdownYellow(remain)
}
it.isRed() -> {
CallerTrafficLightListenerManager.showTrafficLight(TrafficLightEnum.RED, DataSourceType.AICLOUD)
CallerTrafficLightListenerManager.changeCountdownRed(remain)
}
}
}
}
fun destroy() {
@@ -157,10 +176,6 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
CallerTrafficLightListenerManager.removeListener(TAG)
//取消注册监听工控机感知红绿灯
CallerAutopilotIdentifyListenerManager.removeListener(TAG)
//取消注册监听红绿灯请求失败
CallerTrafficLightListenerManager.removeListener(TAG)
//取消注册监听AI云进入路口
CallerTrafficLightListenerManager.removeListener(TAG)
}
}

View File

@@ -51,10 +51,14 @@ import com.mogo.eagle.core.function.call.autopilot.CallerPlanningActionsListener
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager.invokeAutopilotRotting
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningTrajectoryListenerManager.invokeAutopilotTrajectory
import com.mogo.eagle.core.function.call.autopilot.CallerStartAutopilotFailedListenerManager.invokeStartAutopilotFailed
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.mogo.eagle.core.function.call.obu.CallerObuMapMathListenerManager
import com.mogo.eagle.core.function.call.obu.CallerObuWarningRsiListenerManager
import com.mogo.eagle.core.function.call.obu.CallerObuWarningRsmListenerManager
import com.mogo.eagle.core.function.call.obu.CallerObuWarningSpatListenerManager
import com.mogo.eagle.core.function.call.obucombine.CallerObuDcCombineListenerManager
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
import com.mogo.support.obu.ObuScene
import com.zhidao.support.adas.high.AdasManager
import com.zhidao.support.adas.high.OnAdasListener
import com.zhidao.support.adas.high.bean.AutopilotAbility
@@ -130,7 +134,7 @@ class MoGoAdasListenerImpl : OnAdasListener {
paramIndexes = [0, 1],
clientPkFileName = "sn"
)
override fun onGnssInfo(header: MessagePad.Header, gnssInfo: MessagePad.GnssInfo?) {
override fun onGnssInfo(header: MessagePad.Header, gnssInfo: MessagePad.GnssInfo) {
// WGS84坐标系高精度位置信息
invokeChassisLocationWGS84(gnssInfo)
// GCJ02高德坐标系位置信息
@@ -537,6 +541,44 @@ class MoGoAdasListenerImpl : OnAdasListener {
CallerObuDcCombineListenerManager.invokeObuDcData(obuWarningData)
}
/**
* OBU 红绿灯预警信息
*
* @param header 头
* @param spatWarningData 数据
*/
override fun onoObuSpatWarning(header: MessagePad.Header?, spatWarningData: ObuScene.SpatWarningData?) {
CallerObuWarningSpatListenerManager.invokeObuSpatWarning(spatWarningData!!)
}
/**
* OBU RSI预警信息
*
* @param header 头
* @param rsiWarningData 数据
*/
override fun onoObuRsiWarning(header: MessagePad.Header?, rsiWarningData: ObuScene.RsiWarningData?) {
CallerObuWarningRsiListenerManager.invokeObuRsiWarning(rsiWarningData!!)
}
/**
* OBU RSM预警信息
*
* @param header 头
* @param rsmWarningData 数据
*/
override fun onoObuRsmWarning(header: MessagePad.Header?, rsmWarningData: ObuScene.RsmWarningData?) {
CallerObuWarningRsmListenerManager.invokeObuRsmWarning(rsmWarningData!!)
}
/**
* OBU 地图匹配结果
*
* @param header 头
* @param mapMatchData 数据
*/
override fun onoObuObuMapMath(header: MessagePad.Header?, mapMatchData: ObuScene.MapMatchData?) {
CallerObuMapMathListenerManager.invokeObuMapMath(mapMatchData!!)
}
/**
* 重构后的功能状态
*

View File

@@ -0,0 +1,16 @@
package com.mogo.eagle.core.function.datacenter.location
import com.mogo.eagle.core.data.enums.DataSourceType
import mogo.telematics.pad.MessagePad
/**
* 位置回调监听
*/
interface IMoGoLocationListener {
/**
* 位置改变回调用
* @param gnssInfo 位置信息
* @param sourceType 数据来源
*/
fun onLocationChanged(gnssInfo: MessagePad.GnssInfo, sourceType: DataSourceType)
}

View File

@@ -0,0 +1,71 @@
package com.mogo.eagle.core.function.datacenter.location
import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener
import com.mogo.eagle.core.function.api.obu.IMoGoObuLocationWGS84Listener
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
import com.mogo.eagle.core.function.call.base.CallerBase
import com.mogo.eagle.core.utilcode.util.TimeUtils
import com.mogo.support.obu.model.MogoObuHvBasicsData
import mogo.telematics.pad.MessagePad
/**
* 融合定位服务,这里同时监听多来源的位置信息,并支持修改频率
*
* @author donghongyu
*/
object MoGoLocationManager :
CallerBase<IMoGoLocationListener>(),
IMoGoChassisLocationWGS84Listener,
IMoGoObuLocationWGS84Listener {
private val TAG = "MoGoLocationManager"
init {
CallerChassisLocationWGS84ListenerManager.addListener(TAG, this)
}
override fun onChassisLocationWGS84(gnssInfo: MessagePad.GnssInfo) {
M_LISTENERS.forEach {
val tag = it.key
// 获取数据监听需要的HZ
val hz = M_LISTENERS_HZ[tag]
if (hz != null && hz > 0) {
val hzTime = (1.0 / hz.toDouble()) * 1000
// 获取最后一次回调的时间
val hzLastSendTime = M_LISTENERS_HZ_LAST_SEND_TIME[tag]
if (hzLastSendTime != null && hzLastSendTime > 0) {
// 计算是否进入下一次回调周期
val nowTime = TimeUtils.getNowMills()
if (nowTime - hzLastSendTime > hzTime) {
syncLocationCallback(tag, it, gnssInfo, DataSourceType.TELEMATIC)
}
} else {
syncLocationCallback(tag, it, gnssInfo, DataSourceType.TELEMATIC)
}
} else {
syncLocationCallback(tag, it, gnssInfo, DataSourceType.TELEMATIC)
}
}
}
/**
* 向订阅位置信息的发出定位信息
*/
private fun syncLocationCallback(
tag: String,
it: Map.Entry<String, IMoGoLocationListener>,
gnssInfo: MessagePad.GnssInfo,
sourceType: DataSourceType
) {
// 记录最后一次回调时间
M_LISTENERS_HZ_LAST_SEND_TIME[tag] = TimeUtils.getNowMills()
val listener = it.value
listener.onLocationChanged(gnssInfo, sourceType)
}
override fun onObuLocationWGS84(data: MogoObuHvBasicsData) {
}
}

View File

@@ -0,0 +1,17 @@
#### 说明
##### 位置回调融合工控机、OBU、高德地图
```kotlin
// 注册监听位置变换
MoGoLocationManager.addListener(Companion.functionName, object : IMoGoLocationListener {
override fun onLocationChanged(
gnssInfo: MessagePad.GnssInfo,
sourceType: DataSourceType
) {
TODO("Not yet implemented")
}
})
// 设置数据回调频率单位HZ1HZ的周期是1秒50HZ的周期是1/50=0.02秒10HZ的周期是1/10=0.1秒。
MoGoLocationManager.setListenerHz(Companion.functionName, 20)
```

View File

@@ -37,9 +37,8 @@ class MoGoObuProvider : IMoGoObuProvider {
MogoObuDcCombineManager.INSTANCE.init(context)
CallerLogger.d("$M_OBU$TAG", "初始化蘑菇自研OBU…… localIp = " + CommonUtils.getLocalIPAddress())
//bus乘客版本obu功能去掉
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) && AppIdentityModeUtils.isPassenger(
FunctionBuildConfig.appIdentityMode
)
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)
&& AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)
) {
//不处理
} else {
@@ -73,9 +72,8 @@ class MoGoObuProvider : IMoGoObuProvider {
* 通过控制面板设置ip进行传递
*/
override fun connect(ipAddress: String) {
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) && AppIdentityModeUtils.isPassenger(
FunctionBuildConfig.appIdentityMode
)
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)
&& AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)
) {
//不处理
} else {

View File

@@ -5,6 +5,7 @@ import com.mogo.eagle.core.data.config.HmiBuildConfig
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.data.enums.TrafficLightEnum
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgBoxType
import com.mogo.eagle.core.data.msgbox.V2XMsg
@@ -14,6 +15,7 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.eagle.core.function.call.obucombine.CallerObuDcCombineListenerManager
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
import com.mogo.eagle.core.function.call.v2x.CallerLimitingVelocityListenerManager
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OBU
@@ -511,7 +513,7 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuDcCombineListener
// 删除
MogoObuConstants.STATUS.DELETE -> {
// 移除顶部弹窗,当收不到信号的时候触发一次
CallerHmiManager.disableWarningTrafficLight()
CallerTrafficLightListenerManager.disableTrafficLight()
CallerHmiManager.disableWarningV2X(appId.toString())
isShowGreenWave = false
isShowRunRedLight = false
@@ -626,7 +628,7 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuDcCombineListener
when (currentLight.light) {
// 灯光不可用
0 -> {
CallerHmiManager.showWarningTrafficLight(0, 2)
CallerTrafficLightListenerManager.showTrafficLight(TrafficLightEnum.BLACK, DataSourceType.TELEMATIC)
}
// 红灯
@@ -636,9 +638,9 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuDcCombineListener
isRedLight = true
}
isGreenLight = false
CallerHmiManager.showWarningTrafficLight(1, 2)
CallerTrafficLightListenerManager.showTrafficLight(TrafficLightEnum.RED, DataSourceType.TELEMATIC)
val red = currentLight.countDown / 10
CallerHmiManager.changeCountdownRed(red)
CallerTrafficLightListenerManager.changeCountdownRed(red)
}
// 绿灯
@@ -648,17 +650,17 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuDcCombineListener
isGreenLight = true
}
isRedLight = false
CallerHmiManager.showWarningTrafficLight(3, 2)
CallerTrafficLightListenerManager.showTrafficLight(TrafficLightEnum.GREEN, DataSourceType.TELEMATIC)
val green = currentLight.countDown / 10
CallerHmiManager.changeCountdownGreen(green)
CallerTrafficLightListenerManager.changeCountdownGreen(green)
}
// 黄灯
7, 8 -> {
CallerHmiManager.disableWarningV2X(appId.toString())
CallerHmiManager.showWarningTrafficLight(2, 2)
CallerTrafficLightListenerManager.showTrafficLight(TrafficLightEnum.YELLOW, DataSourceType.TELEMATIC)
val yellow = currentLight.countDown / 10
CallerHmiManager.changeCountdownYellow(yellow)
CallerTrafficLightListenerManager.changeCountdownYellow(yellow)
}
}
}

View File

@@ -15,13 +15,12 @@ import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.Default
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.TooClose
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.eagle.core.function.call.obu.CallerObuListenerManager
import com.mogo.eagle.core.function.call.obu.CallerObuTrafficLightListenerManager
import com.mogo.eagle.core.function.call.obu.CallerObuConnectListenerManager
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
import com.mogo.eagle.core.function.call.v2x.CallerLimitingVelocityListenerManager
import com.mogo.eagle.core.function.datacenter.obu.utils.TrafficDataConvertUtilsNew
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OBU
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.mogo.support.obu.MogoObuManager
import com.mogo.support.obu.OnMogoObuListener
@@ -48,9 +47,7 @@ class MogoPrivateObuNewManager private constructor() {
}
}
private var mContext: Context? = null
private var mObuStatusInfo = CallerObuListenerManager.getObuStatusInfo()
private var mObuStatusInfo = CallerObuConnectListenerManager.getObuStatusInfo()
fun connectObu(context: Context, obuIpAddress: String, padIpAddress: String) {
MogoObuManager.getInstance().registerMogoObuListener(mogoObuListener)
@@ -100,16 +97,10 @@ class MogoPrivateObuNewManager private constructor() {
override fun onConnectStatus(connectStatus: Int) {
if (connectStatus == 0) { //断开连接
mObuStatusInfo.obuStatus = false
mObuStatusInfo.obuHvStatus = false
mObuStatusInfo.obuRvStatus = false
CallerObuListenerManager.invokeListener(mObuStatusInfo)
mContext?.let { SharedPrefsMgr.getInstance(it).putBoolean("OBU", false) }
mContext?.let { SharedPrefsMgr.getInstance(it).putBoolean("OBU_HV", false) }
mContext?.let { SharedPrefsMgr.getInstance(it).putBoolean("OBU_RV", false) }
CallerObuConnectListenerManager.invokeObuConnectListener(mObuStatusInfo)
} else if (connectStatus == 1) { //连接成功
mObuStatusInfo.obuStatus = true
CallerObuListenerManager.invokeListener(mObuStatusInfo)
mContext?.let { SharedPrefsMgr.getInstance(it).putBoolean("OBU", true) }
CallerObuConnectListenerManager.invokeObuConnectListener(mObuStatusInfo)
}
}
@@ -117,9 +108,6 @@ class MogoPrivateObuNewManager private constructor() {
* HV车辆基础信息 CvxHvCarIndInfo CvxHvInfoIndInfo
*/
override fun onMogoObuHvBasics(p0: MogoObuHvBasicsData?) {
mObuStatusInfo.obuHvStatus = true
CallerObuListenerManager.invokeListener(mObuStatusInfo)
if (p0 != null && p0.vehBasicsMsg != null) {
CallerLogger.d(
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
@@ -168,8 +156,6 @@ class MogoPrivateObuNewManager private constructor() {
override fun onMogoObuRvWarning(data: MogoObuRvWarningData) {
super.onMogoObuRvWarning(data)
// if (HmiBuildConfig.isShowObuV2vView) { //TODO 临时需要关闭v2v开关
mObuStatusInfo.obuRvStatus = true
CallerObuListenerManager.invokeListener(mObuStatusInfo)
if (!data.warningMsg.warningData.isNullOrEmpty()) {
// 更新数据远车数据之前要匹配uuid
TrafficDataConvertUtilsNew.cvxRvInfoIndInfo2TrafficData(data)?.let {
@@ -192,9 +178,7 @@ class MogoPrivateObuNewManager private constructor() {
appId = data.warningMsg.warningData[0].warningType.toString()
status = data.warningMsg.warningData[0].status
//拼凑数据
if (appId != null) {
handleSdkObu(appId, direction, status, level, data)
}
handleSdkObu(appId, direction, status, level, data)
}
}
@@ -215,15 +199,11 @@ class MogoPrivateObuNewManager private constructor() {
*/
override fun onMogoObuSpatWarning(data: MogoObuSpatWarningData) {
super.onMogoObuSpatWarning(data)
if (data != null) {
// if (HmiBuildConfig.isShowObuV2iView) {
handlerTrafficLight(
data.warningType,
data.status,
data.lights
)
// }
}
handlerTrafficLight(
data.warningType,
data.status,
data.lights
)
}
/**
@@ -232,7 +212,7 @@ class MogoPrivateObuNewManager private constructor() {
override fun onMogoObuRsiWarning(data: MogoObuRsiWarningData) {
super.onMogoObuRsiWarning(data)
// if (HmiBuildConfig.isShowObuV2iView) {
if (data != null && data.warningMsg != null && data.warningMsg.size > 0) {
if (data.warningMsg != null && data.warningMsg.size > 0) {
var alertContent = ""
var ttsContent = ""
var appId = data.warningMsg[0].sceneType.toString()
@@ -411,7 +391,7 @@ class MogoPrivateObuNewManager private constructor() {
//显示警告红边
// CallerHmiManager.showWarning(direction)
//不显示弹框,语音提示,数据在消息盒子里面展示,此处不在处理弹框
if (alertContent.isNullOrEmpty() || ttsContent.isNullOrEmpty()) {
if (alertContent.isEmpty() || ttsContent.isEmpty()) {
return
}
CallerMsgBoxManager.saveMsgBox(
@@ -571,7 +551,7 @@ class MogoPrivateObuNewManager private constructor() {
?.updateITrafficThreatLevelInfo(it)
}
if (alertContent.isNullOrEmpty() || ttsContent.isNullOrEmpty()) {
if (alertContent.isEmpty() || ttsContent.isEmpty()) {
return
}
//显示警告红边
@@ -650,7 +630,10 @@ class MogoPrivateObuNewManager private constructor() {
MogoObuConstants.STATUS.DELETE -> { // 删除
UiThreadHandler.post {
CallerLimitingVelocityListenerManager.invokeOnLimitingVelocityChange(-1,DataSourceType.OBU)
CallerLimitingVelocityListenerManager.invokeOnLimitingVelocityChange(
-1,
DataSourceType.OBU
)
}
}
}
@@ -926,7 +909,7 @@ private fun handlerTrafficLight(appId: Int, status: Int, lights: List<SpatLight>
// 删除
MogoObuConstants.STATUS.DELETE -> {
// 移除顶部弹窗
CallerHmiManager.disableWarningTrafficLight()
CallerTrafficLightListenerManager.disableTrafficLight()
CallerHmiManager.disableWarningV2X(appId.toString())
isShowGreenWave = false
isShowRunRedLight = false
@@ -1069,7 +1052,7 @@ private fun changeTrafficLightStatus(
when (currentLight.light) {
// 灯光不可用
0 -> {
CallerObuTrafficLightListenerManager.invokeObuTrafficLight(0)
CallerTrafficLightListenerManager.invokeObuTrafficLightStatus(TrafficLightEnum.BLACK)
}
// 红灯
2, 3 -> {
@@ -1079,9 +1062,8 @@ private fun changeTrafficLightStatus(
}
isGreenLight = false
isYellowLight = false
CallerObuTrafficLightListenerManager.invokeObuTrafficLight(1)
CallerTrafficLightListenerManager.invokeObuTrafficLightStatus(TrafficLightEnum.RED)
val red = currentLight.countDown.toInt()
CallerHmiManager.changeCountdownRed(red)
}
// 绿灯
@@ -1092,9 +1074,8 @@ private fun changeTrafficLightStatus(
}
isRedLight = false
isYellowLight = false
CallerObuTrafficLightListenerManager.invokeObuTrafficLight(3)
CallerTrafficLightListenerManager.invokeObuTrafficLightStatus(TrafficLightEnum.GREEN)
val green = currentLight.countDown.toInt()
CallerHmiManager.changeCountdownGreen(green)
}
// 黄灯
@@ -1105,9 +1086,8 @@ private fun changeTrafficLightStatus(
isRedLight = false
isGreenLight = false
CallerHmiManager.disableWarningV2X(appId.toString())
CallerObuTrafficLightListenerManager.invokeObuTrafficLight(2)
CallerTrafficLightListenerManager.invokeObuTrafficLightStatus(TrafficLightEnum.YELLOW)
val yellow = currentLight.countDown.toInt()
CallerHmiManager.changeCountdownYellow(yellow)
}
}
}

View File

@@ -0,0 +1,90 @@
package com.mogo.eagle.core.function.datacenter.obu.adapter
import com.mogo.eagle.core.function.call.obu.*
import com.mogo.support.obu.OnMogoObuListener
import com.mogo.support.obu.constants.Define.ConnectStatus
import com.mogo.support.obu.model.*
/**
* 适配 OBU 回调监听分发,这里不做业务,只做数据包装及分发处理
* @author dong hong yu
*/
object MoGoObuListenerImpl : OnMogoObuListener() {
/**
* 连接状态
*
* @param connectStatus 连接状态
* @since 1.0.0
*/
override fun onConnectStatus(@ConnectStatus connectStatus: Int) {
//断开连接
if (connectStatus == 0) {
CallerObuConnectListenerManager.getObuStatusInfo().obuStatus = false
}
//连接成功
else if (connectStatus == 1) {
CallerObuConnectListenerManager.getObuStatusInfo().obuStatus = true
}
CallerObuConnectListenerManager.invokeObuConnectListener()
}
/**
* HV车辆基础信息
*
* @param data 数据
* @since 1.0.0
*/
override fun onMogoObuHvBasics(data: MogoObuHvBasicsData) {
CallerObuLocationWGS84ListenerManager.invokeObuLocationWGS84(data)
}
/**
* V2V预警信息
*
* @param data 数据
* @since 1.0.0
*/
override fun onMogoObuRvWarning(data: MogoObuRvWarningData) {
CallerObuWarningRvListenerManager.invokeObuRvWarning(data)
}
/**
* 红绿灯预警信息
*
* @param data 数据
* @since 1.0.0
*/
override fun onMogoObuSpatWarning(data: MogoObuSpatWarningData) {
}
/**
* RSI预警信息
*
* @param data 数据
* @since 1.0.0
*/
override fun onMogoObuRsiWarning(data: MogoObuRsiWarningData) {
}
/**
* RSM预警信息
*
* @param data 数据
* @since 1.0.0
*/
override fun onMogoObuRsmWarning(data: MogoObuRsmWarningData) {
}
/**
* 地图匹配结果
*
* @param data 数据
* @since 1.0.0
*/
override fun onMogoObuMapMath(data: MogoObuMapMathData) {
}
}

View File

@@ -353,9 +353,9 @@ class AIDataCollectWindow constructor(activity: Activity) : View.OnTouchListener
fun closeWindow()
}
override fun onChassisLocationWGS84(gnssInfo: MessagePad.GnssInfo?) {
latitude = gnssInfo?.latitude
longitude = gnssInfo?.longitude
override fun onChassisLocationWGS84(gnssInfo: MessagePad.GnssInfo) {
latitude = gnssInfo.latitude
longitude = gnssInfo.longitude
}
}

View File

@@ -394,9 +394,9 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
fun closeWindow()
}
override fun onChassisLocationWGS84(gnssInfo: MessagePad.GnssInfo?) {
latitude = gnssInfo?.latitude
longitude = gnssInfo?.longitude
override fun onChassisLocationWGS84(gnssInfo: MessagePad.GnssInfo) {
latitude = gnssInfo.latitude
longitude = gnssInfo.longitude
}
}

View File

@@ -380,7 +380,7 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
fun closeWindow()
}
override fun onChassisLocationWGS84(gnssInfo: MessagePad.GnssInfo?) {
override fun onChassisLocationWGS84(gnssInfo: MessagePad.GnssInfo) {
latitude = gnssInfo?.latitude
longitude = gnssInfo?.longitude
}

View File

@@ -85,7 +85,7 @@ internal class RTKImpl(ctx: Context): IFlow<RTKStatus>(ctx), IMoGoAutopilotStatu
}
}
override fun onChassisLocationWGS84(gnssInfo: GnssInfo?) {
override fun onChassisLocationWGS84(gnssInfo: GnssInfo) {
if (isOldVersion.get()) {
if (isRTKEnabled()) {
send(RTKStatus("RTK", 0))

View File

@@ -3,7 +3,9 @@ package com.mogo.eagle.core.function.hmi.receiver
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.data.enums.TrafficLightEnum
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
import com.mogo.eagle.core.function.hmi.WaringConst
/**
@@ -57,11 +59,17 @@ class V2XTrafficLightBroadcastReceiver : BroadcastReceiver() {
* @param trafficLightCountDown 对应交通灯倒计时如果倒计时为0则disable
*/
private fun dispatchShowWaring(trafficLightCheckType: Int, trafficLightCountDown: Int) {
CallerHmiManager.showWarningTrafficLight(trafficLightCheckType,1)
val trafficLightType = when(trafficLightCheckType){
1 -> TrafficLightEnum.RED
2 -> TrafficLightEnum.YELLOW
3 -> TrafficLightEnum.GREEN
else -> TrafficLightEnum.BLACK
}
CallerTrafficLightListenerManager.showTrafficLight(trafficLightType,DataSourceType.DEFAULT)
when(trafficLightCheckType){
1 -> CallerHmiManager.changeCountdownRed(trafficLightCountDown)
2 -> CallerHmiManager.changeCountdownYellow(trafficLightCountDown)
3 -> CallerHmiManager.changeCountdownGreen(trafficLightCountDown)
1 -> CallerTrafficLightListenerManager.changeCountdownRed(trafficLightCountDown)
2 -> CallerTrafficLightListenerManager.changeCountdownYellow(trafficLightCountDown)
3 -> CallerTrafficLightListenerManager.changeCountdownGreen(trafficLightCountDown)
}
}
@@ -69,6 +77,6 @@ class V2XTrafficLightBroadcastReceiver : BroadcastReceiver() {
* 关闭交通灯
*/
private fun dispatchCloseWaring() {
CallerHmiManager.disableWarningTrafficLight()
CallerTrafficLightListenerManager.disableTrafficLight()
}
}

View File

@@ -29,8 +29,6 @@ import com.mogo.eagle.core.data.map.Infrastructure
import com.mogo.eagle.core.data.notice.NoticeNormalData
import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData
import com.mogo.eagle.core.data.report.ReportEntity
import com.mogo.eagle.core.function.api.hmi.IMoGoHmiViewProxy
import com.mogo.eagle.core.function.api.hmi.view.IViewTrafficLight
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoHmiProvider
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
@@ -78,17 +76,12 @@ import java.util.concurrent.atomic.AtomicReference
@Route(path = MoGoFragmentPaths.PATH_FRAGMENT_HMI)
class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
IMoGoHmiProvider,
IMoGoHmiViewProxy,
MoGoHmiContract.View {
companion object {
private const val TAG = "MoGoHmiFragment"
}
// HMI 视图控件代理
// todo 需要统一数据源 红绿灯 View代理
private var mViewTrafficLight: IViewTrafficLight? = null
private val lastSpeakJob by lazy { AtomicReference<Job>() }
private var lastShowV2XJob: Job? = null
@@ -98,24 +91,6 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
}
// todo 新超
override fun updateDriverMsgBoxTipView(show: Boolean) {
}
// todo 新超
override fun updatePassengerMsgBoxTipView(show: Boolean) {
}
/** todo ----------------------------------------------**/
/**
* 设置 红绿灯 代理View
*/
override fun setProxyTrafficLightView(view: IViewTrafficLight) {
mViewTrafficLight = view
}
/**
* ok
* 工控机重启返回结果
@@ -319,55 +294,6 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
}
}
/**
* 展示红绿灯预警
*
* @param checkLightId 0-都是默认不亮起1-红2-黄3-绿
* @param lightSource 1:云端下发2:自车感知
*/
override fun showWarningTrafficLight(checkLightId: Int, lightSource: Int) {
mViewTrafficLight?.showWarningTrafficLight(checkLightId, lightSource)
}
override fun isWarningTrafficLightShow(): Boolean {
return mViewTrafficLight?.visibility == View.VISIBLE
}
/**
* 关闭红绿灯预警展示,并重制灯态
*/
override fun disableWarningTrafficLight() {
mViewTrafficLight?.disableWarningTrafficLight()
}
/**
* 关闭红绿灯倒计时
*/
override fun disableWarningTrafficLightCountDown() {
mViewTrafficLight?.disableCountdown()
}
override fun changeCountdownRed(redNum: Int) {
mViewTrafficLight?.changeCountdownRed(redNum)
}
override fun changeCountdownYellow(yellowNum: Int) {
mViewTrafficLight?.changeCountdownYellow(yellowNum)
}
override fun changeCountdownGreen(greenNum: Int) {
mViewTrafficLight?.changeCountdownGreen(greenNum)
}
/**
* @param readNum 红灯倒计时
* @param yellowNum 黄灯倒计时
* @param greenNum 绿灯倒计时
*/
override fun changeCountdownTrafficLightNum(readNum: Int, yellowNum: Int, greenNum: Int) {
mViewTrafficLight?.changeCountdownTrafficLightNum(readNum, yellowNum, greenNum)
}
/**
* 展示指定方位上的红框预警
* @param direction
@@ -519,7 +445,6 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
"${SceneConstant.M_DEVA}${"TurnLight"}",
"---showTurnLight = $light ---isLeftLight = $isLeftLight ---isRightLight = $isRightLight"
)
if (HmiBuildConfig.isShowTurnLightView) {
ThreadUtils.runOnUiThread {
if (light == 1 || light == 2) {
if (!isVisualAngleChanged) {
@@ -567,7 +492,6 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
}
}
}
}
}
private var isBrake: Boolean = false
@@ -576,7 +500,6 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
* 显示刹车效果
*/
override fun showBrakeLight(light: Int) {
if (HmiBuildConfig.isShowBrakeLightView) {
ThreadUtils.runOnUiThread {
if (light == 1) { //刹车灯亮
if (!isBrake) {
@@ -597,8 +520,8 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(3, 500)
}
}
//brakeView.setBrakeLight(light)
}
}
}
/** todo----------------------------------------------- **/
@@ -668,14 +591,6 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
}
}
override fun setTurnLightFunction(isOpen: Boolean) {
HmiBuildConfig.isShowTurnLightView = isOpen
}
override fun setBrakeLightFunction(isOpen: Boolean) {
HmiBuildConfig.isShowBrakeLightView = isOpen
}
override fun setSnBinding(isOpen: Boolean) {
HmiBuildConfig.isShowSnBindingView = isOpen
}

View File

@@ -13,6 +13,7 @@ import com.mogo.eagle.core.data.msgbox.MsgCategory
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxListener
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.DriverMsgBoxBubbleAdapter
@@ -83,7 +84,7 @@ class DriverMsgBoxBubbleView @JvmOverloads constructor(
}
}
if(isShowData){
CallerHmiManager.updateDriverMsgBoxTipView(true)
CallerMsgBoxEventListenerManager.invokeUpdateTipListener(true)
if(category == MsgCategory.RECORD_BAG){
//弹出被动录包弹窗
CallerDevaToolsManager.onReceiveBadCaseRecord(msgBoxBean,context as Activity,true)
@@ -98,16 +99,12 @@ class DriverMsgBoxBubbleView @JvmOverloads constructor(
override fun onAttachedToWindow() {
super.onAttachedToWindow()
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
CallerMsgBoxListenerManager.addListener(TAG,this)
}
CallerMsgBoxListenerManager.addListener(TAG,this)
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
CallerMsgBoxListenerManager.removeListener(TAG)
}
CallerMsgBoxListenerManager.removeListener(TAG)
}
}

View File

@@ -3,8 +3,13 @@ package com.mogo.eagle.core.function.hmi.ui.msgbox
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxEventListener
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
import com.mogo.eagle.core.function.hmi.R
import kotlinx.android.synthetic.main.view_driver_msg_box_button.view.*
/**
* @author XuXinChao
@@ -15,19 +20,71 @@ class DriverMsgBoxButtonView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
):ConstraintLayout(context, attrs, defStyleAttr) {
):ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxEventListener {
companion object {
const val TAG = "DriverMsgBoxButtonView"
}
private var clickListener: ClickListener? = null
init{
LayoutInflater.from(context).inflate(R.layout.view_driver_msg_box_button, this, true)
initView()
}
private fun initView(){
cbMsgBoxDriver.setOnCheckedChangeListener { _, isChecked ->
clickListener?.showMsgBoxList(isChecked)
msgBoxTipView.visibility = View.GONE
}
}
override fun onAttachedToWindow() {
super.onAttachedToWindow()
CallerMsgBoxEventListenerManager.addListener(TAG,this)
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
CallerMsgBoxEventListenerManager.removeListener(TAG)
}
override fun onSummaryClickEvent() {
}
/**
* 更新新消息提醒红点
* @param isShow true:展示false:不展示
*/
override fun onUpdateTipEvent(isShow: Boolean) {
if(isShow){
msgBoxTipView.visibility = View.VISIBLE
}else{
msgBoxTipView.visibility = View.GONE
}
}
override fun onBubbleOperationClickEvent(msgBoxBean: MsgBoxBean) {
cbMsgBoxDriver.performClick()
}
override fun onBubbleV2XClickEvent(msgBoxBean: MsgBoxBean) {
cbMsgBoxDriver.performClick()
}
override fun onBubbleReportClickEvent(msgBoxBean: MsgBoxBean) {
cbMsgBoxDriver.performClick()
}
fun setClickListener(clickListener: ClickListener) {
this.clickListener = clickListener
}
interface ClickListener{
fun showMsgBoxList(show: Boolean)
}
}

View File

@@ -7,16 +7,16 @@ import android.view.LayoutInflater
import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.recyclerview.widget.LinearLayoutManager
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgCategory
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxEventListener
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxListener
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.DriverMsgBoxListAdapter
import com.mogo.eagle.core.function.msgbox.MsgBoxConfig
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import kotlinx.android.synthetic.main.layout_driver_msg_box_list.view.*
import org.greenrobot.eventbus.EventBus
@@ -32,7 +32,7 @@ class DriverMsgBoxListView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : ConstraintLayout(context, attrs, defStyleAttr) , IMsgBoxListener {
) : ConstraintLayout(context, attrs, defStyleAttr) , IMsgBoxListener, IMsgBoxEventListener {
init {
LayoutInflater.from(context).inflate(R.layout.layout_driver_msg_box_list, this, true)
@@ -43,11 +43,13 @@ class DriverMsgBoxListView @JvmOverloads constructor(
private var ipcReportList: ArrayList<MsgBoxBean> ?= null
private var badCaseList: ArrayList<MsgBoxBean> ?= null
private var driverMsgBoxListAdapter: DriverMsgBoxListAdapter ?=null
private var linearLayoutManager: LinearLayoutManager ?= null
private fun initView() {
driverMsgBoxListAdapter= DriverMsgBoxListAdapter(context as Activity)
rvMsgBoxList.adapter = driverMsgBoxListAdapter
rvMsgBoxList.layoutManager = LinearLayoutManager(context)
linearLayoutManager = LinearLayoutManager(context)
rvMsgBoxList.layoutManager = linearLayoutManager
//获取通知消息列表
noticeList= CallerMsgBoxManager.getCachedNotifyData() as ArrayList<MsgBoxBean>?
@@ -193,18 +195,16 @@ class DriverMsgBoxListView @JvmOverloads constructor(
override fun onAttachedToWindow() {
super.onAttachedToWindow()
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
CallerMsgBoxListenerManager.addListener(TAG,this)
EventBus.getDefault().register(this)
}
CallerMsgBoxListenerManager.addListener(TAG,this)
CallerMsgBoxEventListenerManager.addListener(TAG,this)
EventBus.getDefault().register(this)
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
CallerMsgBoxListenerManager.removeListener(TAG)
EventBus.getDefault().unregister(this)
}
CallerMsgBoxListenerManager.removeListener(TAG)
CallerMsgBoxEventListenerManager.removeListener(TAG)
EventBus.getDefault().unregister(this)
}
@Subscribe(threadMode = ThreadMode.MAIN)
@@ -214,4 +214,36 @@ class DriverMsgBoxListView @JvmOverloads constructor(
it.remove(msgBoxList)
}
}
override fun onSummaryClickEvent() {
}
override fun onUpdateTipEvent(isShow: Boolean) {
}
override fun onBubbleOperationClickEvent(msgBoxBean: MsgBoxBean) {
MsgBoxConfig.setUserRecord(0)
notifyData()
noticeList?.let {
rvMsgBoxList?.scrollToPosition(it.indexOf(msgBoxBean))
}
}
override fun onBubbleV2XClickEvent(msgBoxBean: MsgBoxBean) {
MsgBoxConfig.setUserRecord(0)
notifyData()
noticeList?.let {
rvMsgBoxList?.scrollToPosition(it.indexOf(msgBoxBean))
}
}
override fun onBubbleReportClickEvent(msgBoxBean: MsgBoxBean) {
MsgBoxConfig.setUserRecord(1)
notifyData()
ipcReportList?.let {
linearLayoutManager?.scrollToPositionWithOffset(it.indexOf(msgBoxBean),0)
}
}
}

View File

@@ -12,6 +12,7 @@ import com.mogo.eagle.core.data.msgbox.MsgBoxType
import com.mogo.eagle.core.data.msgbox.MsgCategory
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxListener
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.PassengerMsgBoxBubbleAdapter
@@ -64,7 +65,7 @@ class PassengerMsgBoxBubbleView @JvmOverloads constructor(
|| msgBoxList.type == MsgBoxType.OBU){
MsgBoxConfig.noticeList.add(msgBoxList)
if(isShowData){
CallerHmiManager.updatePassengerMsgBoxTipView(true)
CallerMsgBoxEventListenerManager.invokeUpdateTipListener(true)
dataList.add(msgBoxList)
passengerMsgBoxBubbleAdapter?.setData(dataList)
}
@@ -75,18 +76,12 @@ class PassengerMsgBoxBubbleView @JvmOverloads constructor(
override fun onAttachedToWindow() {
super.onAttachedToWindow()
if(AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode) &&
AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)){
CallerMsgBoxListenerManager.addListener(TAG,this)
}
CallerMsgBoxListenerManager.addListener(TAG,this)
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
if(AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode) &&
AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)){
CallerMsgBoxListenerManager.removeListener(TAG)
}
CallerMsgBoxListenerManager.removeListener(TAG)
}
}

View File

@@ -3,8 +3,13 @@ package com.mogo.eagle.core.function.hmi.ui.msgbox
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxEventListener
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
import com.mogo.eagle.core.function.hmi.R
import kotlinx.android.synthetic.main.view_passenger_msg_box_button.view.*
/**
* @author XuXinChao
@@ -15,19 +20,70 @@ class PassengerMsgBoxButtonView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
): ConstraintLayout(context, attrs, defStyleAttr) {
): ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxEventListener {
companion object {
const val TAG = "PassengerMsgBoxButtonView"
}
private var clickListener: ClickListener? = null
init{
LayoutInflater.from(context).inflate(R.layout.view_passenger_msg_box_button, this, true)
initView()
}
private fun initView(){
cbMsgBoxPassenger.setOnCheckedChangeListener { _, isChecked ->
clickListener?.showMsgBoxList(isChecked)
msgBoxPTipView.visibility = View.GONE
}
}
override fun onAttachedToWindow() {
super.onAttachedToWindow()
CallerMsgBoxEventListenerManager.addListener(TAG,this)
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
CallerMsgBoxEventListenerManager.removeListener(TAG)
}
override fun onSummaryClickEvent() {
}
/**
* 更新新消息提醒红点
* @param isShow true:展示false:不展示
*/
override fun onUpdateTipEvent(isShow: Boolean) {
if(isShow){
msgBoxPTipView.visibility = View.VISIBLE
}else{
msgBoxPTipView.visibility = View.GONE
}
}
override fun onBubbleOperationClickEvent(msgBoxBean: MsgBoxBean) {
cbMsgBoxPassenger.performClick()
}
override fun onBubbleV2XClickEvent(msgBoxBean: MsgBoxBean) {
cbMsgBoxPassenger.performClick()
}
override fun onBubbleReportClickEvent(msgBoxBean: MsgBoxBean) {
cbMsgBoxPassenger.performClick()
}
fun setClickListener(clickListener: ClickListener) {
this.clickListener = clickListener
}
interface ClickListener{
fun showMsgBoxList(show: Boolean)
}
}

View File

@@ -11,7 +11,9 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgBoxType
import com.mogo.eagle.core.data.msgbox.MsgCategory
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxEventListener
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxListener
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.eagle.core.function.hmi.R
@@ -30,7 +32,7 @@ class PassengerMsgBoxListView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxListener {
) : ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxListener, IMsgBoxEventListener {
private val TAG = "PassengerMsgBoxListView"
var passengerMsgBoxListAdapter: PassengerMsgBoxListAdapter ?= null
@@ -75,18 +77,36 @@ class PassengerMsgBoxListView @JvmOverloads constructor(
override fun onAttachedToWindow() {
super.onAttachedToWindow()
if(AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode) &&
AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)){
CallerMsgBoxListenerManager.addListener(TAG,this)
}
CallerMsgBoxListenerManager.addListener(TAG,this)
CallerMsgBoxEventListenerManager.addListener(TAG,this)
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
if(AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode) &&
AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)){
CallerMsgBoxListenerManager.removeListener(TAG)
CallerMsgBoxListenerManager.removeListener(TAG)
CallerMsgBoxEventListenerManager.removeListener(TAG)
}
override fun onSummaryClickEvent() {
}
override fun onUpdateTipEvent(isShow: Boolean) {
}
override fun onBubbleOperationClickEvent(msgBoxBean: MsgBoxBean) {
}
override fun onBubbleV2XClickEvent(msgBoxBean: MsgBoxBean) {
noticeList?.let {
rvPassengerList.scrollToPosition(it.indexOf(msgBoxBean))
}
}
override fun onBubbleReportClickEvent(msgBoxBean: MsgBoxBean) {
}
}

View File

@@ -14,12 +14,14 @@ import com.mogo.eagle.core.data.msgbox.*
import com.mogo.eagle.core.data.report.ReportEntity
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.mogo.glide.GlideApp
import com.mogo.eagle.core.utilcode.mogo.glide.transform.GlideRoundedCornersTransform
import com.mogo.eagle.core.utilcode.util.TimeUtils
import com.mogo.eagle.core.utilcode.util.TimeUtils.getHourMinFormat
import com.mogo.eagle.core.widget.RoundCanClickConstraintLayout
/**
* @author XuXinChao
@@ -76,14 +78,19 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
when (holder) {
is BubbleOperationHolder -> {
data?.let {
val operationMsg = it[position].bean as OperationMsg
val msgBoxBean = it[position]
val operationMsg = msgBoxBean.bean as OperationMsg
holder.tvBubbleOperationTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
holder.tvBubbleOperationContent.text = operationMsg.content
holder.clBubbleOperationLayout.setOnClickListener {
CallerMsgBoxEventListenerManager.invokeBubbleOperationListener(msgBoxBean)
}
}
}
is BubbleReportHolder -> {
data?.let {
val reportEntity = it[position].bean as ReportEntity
val msgBoxBean = it[position]
val reportEntity = msgBoxBean.bean as ReportEntity
holder.tvBubbleReportTime.text = "时间:${TimeUtils.millis2String(it[position].timestamp)}"
holder.tvBubbleReceiveTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
var resultStr = "类型:"
@@ -91,6 +98,9 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
resultStr = "${resultStr}${CallerAutoPilotManager.getReportResultDesc(result)}"
}
holder.tvBubbleReportType.text = resultStr
holder.clReportLayout.setOnClickListener {
CallerMsgBoxEventListenerManager.invokeBubbleReportListener(msgBoxBean)
}
}
}
is BubbleNoticeHolder -> {
@@ -140,6 +150,9 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
holder.tvV2XContent.text = v2XMsg.content
holder.ivV2XImage.setImageDrawable(activity.resources.getDrawable(
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
holder.clV2XLayout.setOnClickListener {
CallerMsgBoxEventListenerManager.invokeBubbleV2XListener(msgBoxBean)
}
}
}
is BubbleSummaryHolder -> {
@@ -191,12 +204,14 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
var tvBubbleReportTime: TextView = itemView.findViewById(R.id.tvBubbleReportTime)
var tvBubbleReportType: TextView = itemView.findViewById(R.id.tvBubbleReportType)
var tvBubbleReceiveTime: TextView = itemView.findViewById(R.id.tvBubbleReceiveTime)
var clReportLayout: RoundCanClickConstraintLayout = itemView.findViewById(R.id.clReportLayout)
}
//运营平台
class BubbleOperationHolder(itemView: View): RecyclerView.ViewHolder(itemView){
var tvBubbleOperationTime: TextView = itemView.findViewById(R.id.tvBubbleOperationTime)
var tvBubbleOperationContent: TextView = itemView.findViewById(R.id.tvBubbleOperationContent)
var clBubbleOperationLayout: RoundCanClickConstraintLayout = itemView.findViewById(R.id.clBubbleOperationLayout)
}
//Notice
@@ -213,6 +228,7 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
var ivV2XImage: ImageView = itemView.findViewById(R.id.ivV2XImage)
var tvV2XTime: TextView = itemView.findViewById(R.id.tvV2XTime)
var tvV2XContent: TextView = itemView.findViewById(R.id.tvV2XContent)
var clV2XLayout: RoundCanClickConstraintLayout = itemView.findViewById(R.id.clV2XLayout)
}
//汇总消息

View File

@@ -19,6 +19,7 @@ import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.mogo.glide.transform.GlideRoundedCornersTransform
import com.mogo.eagle.core.utilcode.util.TimeUtils
import com.mogo.eagle.core.utilcode.util.TimeUtils.getHourMinFormat
import com.mogo.eagle.core.widget.RoundCanClickConstraintLayout
/**
* @author XuXinChao
@@ -105,6 +106,9 @@ class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView
holder.tvPassengerV2XContent.text = v2XMsg.content
holder.ivPassengerV2XImage.setImageDrawable(activity.resources.getDrawable(
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
holder.clPassengerVeXLayout.setOnClickListener {
CallerMsgBoxEventListenerManager.invokeBubbleV2XListener(msgBoxBean)
}
}
}
is BubbleSummaryHolder -> {
@@ -115,7 +119,7 @@ class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView
holder.tvPassengerSummaryCheck.setOnClickListener {
//跳转全览模式
// CallerHmiManager.showSmallFragment()
CallerMsgBoxEventListenerManager.invokeListener()
CallerMsgBoxEventListenerManager.invokeSummaryListener()
}
}
}
@@ -164,6 +168,7 @@ class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView
var ivPassengerV2XImage: ImageView = itemView.findViewById(R.id.ivPassengerV2XImage)
var tvPassengerV2XTime: TextView = itemView.findViewById(R.id.tvPassengerV2XTime)
var tvPassengerV2XContent: TextView = itemView.findViewById(R.id.tvPassengerV2XContent)
var clPassengerVeXLayout: RoundCanClickConstraintLayout = itemView.findViewById(R.id.clPassengerVeXLayout)
}
//汇总消息

View File

@@ -107,7 +107,7 @@ class PassengerMsgBoxListAdapter(private val activity: Activity): RecyclerView.A
holder.tvPassengerSummaryCheck.setOnClickListener {
//跳转全览模式
// CallerHmiManager.showSmallFragment()
CallerMsgBoxEventListenerManager.invokeListener()
CallerMsgBoxEventListenerManager.invokeSummaryListener()
}
}
}

View File

@@ -82,8 +82,8 @@ class PncActionsView @JvmOverloads constructor(
//如果是存在云端红绿灯数据条件下,设置云端数据
if (PncActionsHelper.isWaitingTrafficlight(it.drivingState.number, it.drivingAction.number)
&& mTrafficLightResult != null
&& getWaitTrafficlightTime().isNotBlank()) {
actions += ",预计${getWaitTrafficlightTime()}秒后通过"
&& getWaitTrafficLightTime().isNotBlank()) {
actions += ",预计${getWaitTrafficLightTime()}秒后通过"
} else {
mTrafficLightResult = null
}
@@ -106,7 +106,7 @@ class PncActionsView @JvmOverloads constructor(
mTrafficLightResult = trafficLightResult
}
private fun getWaitTrafficlightTime(): String {
private fun getWaitTrafficLightTime(): String {
return if (mTrafficLightResult != null
&& mTrafficLightResult!!.currentRoadTrafficLight() != null
&& mTrafficLightResult!!.currentRoadTrafficLight()!!.isRed()

View File

@@ -38,14 +38,12 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant
import com.mogo.eagle.core.data.deva.scene.SceneModule
import com.mogo.eagle.core.data.enums.TrafficTypeEnum
import com.mogo.eagle.core.data.gnss.AccelerationEntity
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.data.obu.ObuStatusInfo
import com.mogo.eagle.core.data.report.ReportEntity
import com.mogo.eagle.core.function.api.autopilot.*
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsFuncConfigListener
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener
import com.mogo.eagle.core.function.api.obu.IMoGoObuStatusListener
import com.mogo.eagle.core.function.api.obu.IMoGoObuConnectListener
import com.mogo.eagle.core.function.business.routeoverlay.*
import com.mogo.eagle.core.function.call.autopilot.*
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsFuncConfigListenerManager
@@ -55,8 +53,8 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.map.CallerHDMapManager
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.mogo.eagle.core.function.call.map.CallerSmpManager
import com.mogo.eagle.core.function.call.obu.CallerOBUManager
import com.mogo.eagle.core.function.call.obu.CallerObuListenerManager
import com.mogo.eagle.core.function.call.obu.CallerObuApiManager
import com.mogo.eagle.core.function.call.obu.CallerObuConnectListenerManager
import com.mogo.eagle.core.function.call.setting.CallerMoGoUiSettingManager
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
import com.mogo.eagle.core.function.hmi.R
@@ -100,22 +98,21 @@ internal class DebugSettingView @JvmOverloads constructor(
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : ConstraintLayout(context, attrs, defStyleAttr),
IMoGoObuStatusListener,
IMoGoAutopilotStatusListener,
IMoGoChassisLocationWGS84Listener,
IMoGoMapLocationListener,
IMoGoAutopilotIdentifyListener,
IMoGoPlanningRottingListener,
IMoGoPlanningTrajectoryListener,
IMoGoDevaToolsFuncConfigListener,
IMoGoChassisLamplightListener,
IMoGoDevaToolsListener,
IMoGoChassisAccStateListener,
IMoGoChassisSteeringStateListener,
IMoGoChassisGearStateListener,
IMoGoChassisBrakeStateListener,
IMoGoChassisThrottleStateListener,
IMoGoSweeperFutianCleanSystemListener{
IMoGoObuConnectListener,
IMoGoAutopilotStatusListener,
IMoGoChassisLocationWGS84Listener,
IMoGoAutopilotIdentifyListener,
IMoGoPlanningRottingListener,
IMoGoPlanningTrajectoryListener,
IMoGoDevaToolsFuncConfigListener,
IMoGoChassisLamplightListener,
IMoGoDevaToolsListener,
IMoGoChassisAccStateListener,
IMoGoChassisSteeringStateListener,
IMoGoChassisGearStateListener,
IMoGoChassisBrakeStateListener,
IMoGoChassisThrottleStateListener,
IMoGoSweeperFutianCleanSystemListener {
private val TAG = "DebugSettingView"
@@ -189,7 +186,7 @@ internal class DebugSettingView @JvmOverloads constructor(
override fun onAttachedToWindow() {
super.onAttachedToWindow()
// 添加 OBU状态 监听
CallerObuListenerManager.addListener(TAG, this)
CallerObuConnectListenerManager.addListener(TAG, this)
// 添加 ADAS状态 监听
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
// 添加 ADAS车辆状态&定位 监听
@@ -230,7 +227,7 @@ internal class DebugSettingView @JvmOverloads constructor(
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
// 移除 OBU状态 监听
CallerObuListenerManager.removeListener(TAG)
CallerObuConnectListenerManager.removeListener(TAG)
// 移除 ADAS状态 监听
CallerAutoPilotStatusListenerManager.removeListener(TAG)
// 移除 ADAS车辆状态&定位 监听
@@ -254,7 +251,10 @@ internal class DebugSettingView @JvmOverloads constructor(
CallerChassisLamplightListenerManager.removeListener(TAG)
// 移除 业务配置监听
CallerDevaToolsFuncConfigListenerManager.unRegisterDevaToolsFuncConfigListener( FuncBizConfig.FOUNDATION, TAG)
CallerDevaToolsFuncConfigListenerManager.unRegisterDevaToolsFuncConfigListener(
FuncBizConfig.FOUNDATION,
TAG
)
if (logInfoView != null) {
logInfoView!!.onEnterBackground()
@@ -552,7 +552,7 @@ internal class DebugSettingView @JvmOverloads constructor(
setLogCheckedChangeListener()
//OBU配置信息
tvObuInfo.text = CallerObuListenerManager.getObuStatusInfoJsonString()
tvObuInfo.text = CallerObuConnectListenerManager.getObuStatusInfoJsonString()
//工控机配置信息
tvAutopilotInfo.text =
@@ -572,14 +572,14 @@ internal class DebugSettingView @JvmOverloads constructor(
btnSetObuIP.setOnClickListener {
val obuIP = etObuIP.text.toString()
if (StringUtils.isValidIPAddress(obuIP)) {
CallerOBUManager.resetObuIpAddress(obuIP)
CallerObuApiManager.resetObuIpAddress(obuIP)
} else {
ToastUtils.showShort("请输入正确的IP地址")
}
}
btnDrawFusion.isChecked = FunctionBuildConfig.isFusionColor
btnDrawFusion.setOnCheckedChangeListener{_, isChecked ->
btnDrawFusion.setOnCheckedChangeListener { _, isChecked ->
FunctionBuildConfig.isFusionColor = isChecked
}
@@ -589,7 +589,11 @@ internal class DebugSettingView @JvmOverloads constructor(
// 演示模式
tbIsDemoMode.setOnCheckedChangeListener { _, _ ->
FunctionBuildConfig.isDemoMode = !FunctionBuildConfig.isDemoMode
CallerHmiManager.updateStatusBarLeftView(FunctionBuildConfig.isDemoMode, "demoMode", DemoModeView(context))
CallerHmiManager.updateStatusBarLeftView(
FunctionBuildConfig.isDemoMode,
"demoMode",
DemoModeView(context)
)
CallerAutoPilotManager.setDemoMode(FunctionBuildConfig.isDemoMode)
if (!FunctionBuildConfig.isDemoMode) {
//关闭美化模式时,通知工控机
@@ -1044,29 +1048,6 @@ internal class DebugSettingView @JvmOverloads constructor(
}
}
/**
* 打开、关闭转向灯控制
*/
tbOpenLight.setOnCheckedChangeListener { _, isChecked ->
if (!isChecked) {
CallerHmiManager.setTurnLightFunction(true)
} else {
CallerHmiManager.setTurnLightFunction(false)
}
}
/**
* 打开、关闭刹车控制
*/
tbOpenBrakeLight.setOnCheckedChangeListener { _, isChecked ->
if (!isChecked) {
CallerHmiManager.setBrakeLightFunction(true)
} else {
CallerHmiManager.setBrakeLightFunction(false)
}
}
/**
* sn绑定控制
*/
@@ -1691,9 +1672,9 @@ internal class DebugSettingView @JvmOverloads constructor(
mTrajectoryInfoSize = 0
mRouteInfoSize = 0
if(FunctionBuildConfig.isDemoMode){
if (FunctionBuildConfig.isDemoMode) {
tbIsDemoMode.text = "关闭美化模式"
}else{
} else {
tbIsDemoMode.text = "开启美化模式"
}
@@ -1702,7 +1683,7 @@ internal class DebugSettingView @JvmOverloads constructor(
/**
* OBU状态回调
*/
override fun onObuStatusResponse(obuStatusInfo: ObuStatusInfo) {
override fun onConnectStatus(obuStatusInfo: ObuStatusInfo) {
lifecycleOwner.lifecycleScope.launch {
tvObuInfo.text = GsonUtils.toJson(obuStatusInfo)
@@ -1782,7 +1763,7 @@ internal class DebugSettingView @JvmOverloads constructor(
when (type) {
BIZ_BEAUTY_MODE -> {
tbIsDemoMode.isClickable = !lock
val (left,top,right,bottom) = tbIsDemoMode.currentPadding()
val (left, top, right, bottom) = tbIsDemoMode.currentPadding()
if (lock) {
tbIsDemoMode.background =
resources.getDrawable(R.drawable.radio_button_lock_background)
@@ -1790,11 +1771,11 @@ internal class DebugSettingView @JvmOverloads constructor(
tbIsDemoMode.background =
resources.getDrawable(R.drawable.radio_button_normal_background_right)
}
tbIsDemoMode.setPadding(left,top,right,bottom)
tbIsDemoMode.setPadding(left, top, right, bottom)
}
BIZ_RAIN_MODE -> {
tbIsRainMode.isClickable = !lock
val (left,top,right,bottom) = tbIsRainMode.currentPadding()
val (left, top, right, bottom) = tbIsRainMode.currentPadding()
if (lock) {
tbIsRainMode.background =
resources.getDrawable(R.drawable.radio_button_lock_background)
@@ -1802,21 +1783,21 @@ internal class DebugSettingView @JvmOverloads constructor(
tbIsRainMode.background =
resources.getDrawable(R.drawable.radio_button_normal_background_right)
}
tbIsRainMode.setPadding(left,top,right,bottom)
tbIsRainMode.setPadding(left, top, right, bottom)
}
BIZ_WARNING_UPLOAD -> {
tbReportWarning.isClickable = !lock
val (left,top,right,bottom) = tbReportWarning.currentPadding()
val (left, top, right, bottom) = tbReportWarning.currentPadding()
if (lock) {
tbReportWarning.background =
resources.getDrawable(R.drawable.radio_button_lock_background)
} else {
tbReportWarning.background = null
}
tbReportWarning.setPadding(left,top,right,bottom)
tbReportWarning.setPadding(left, top, right, bottom)
}
BIZ_BAG_RECORD -> {
val (left,top,right,bottom) = btnRecordBag.currentPadding()
val (left, top, right, bottom) = btnRecordBag.currentPadding()
if (lock) {
btnRecordBag.isClickable = false
btnRecordBag.background =
@@ -1826,10 +1807,10 @@ internal class DebugSettingView @JvmOverloads constructor(
btnRecordBag.requestFocus()
btnRecordBag.background = null
}
btnRecordBag.setPadding(left,top,right,bottom)
btnRecordBag.setPadding(left, top, right, bottom)
}
BIZ_FULL_LOG -> {
val (left,top,right,bottom) = tbLogCatch.currentPadding()
val (left, top, right, bottom) = tbLogCatch.currentPadding()
if (lock) {
tbLogCatch.isClickable = false
tbLogCatch.background =
@@ -1839,12 +1820,12 @@ internal class DebugSettingView @JvmOverloads constructor(
tbLogCatch.requestFocus()
tbLogCatch.background = null
}
tbLogCatch.setPadding(left,top,right,bottom)
tbLogCatch.setPadding(left, top, right, bottom)
}
}
}
override fun onChassisLocationWGS84(gnssInfo: MessagePad.GnssInfo?) {
override fun onChassisLocationWGS84(gnssInfo: MessagePad.GnssInfo) {
mGnssInfo = gnssInfo
//实时加速度列表
ThreadUtils.runOnUiThread {
@@ -1954,31 +1935,6 @@ internal class DebugSettingView @JvmOverloads constructor(
}
}
override fun onLocationChanged(location: MogoLocation?, from: Int, isGps: Boolean) {
}
/**
* 时延显示
*/
override fun onObuV2iDelayTime(delayTime: Long) {
}
/**
* 车辆转向灯 数据
* @param lightSwitch
*/
override fun onAutopilotLightSwitchData(lightSwitch: Chassis.LightSwitch?) {
}
/**
* 车辆刹车灯 数据
* @param brakeLight
*/
override fun onAutopilotBrakeLightData(brakeLight: Boolean) {
}
/**
* 车辆方向盘转向角回调

View File

@@ -2,7 +2,6 @@ package com.mogo.eagle.core.function.hmi.ui.setting
import android.content.Context
import android.util.AttributeSet
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
@@ -14,16 +13,16 @@ import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsFuncConfigListenerManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.obu.CallerOBUManager
import com.mogo.eagle.core.function.call.obu.CallerObuApiManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.kotlin.currentPadding
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.eagle.core.function.business.routeoverlay.RouteStrategy
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
import com.mogo.eagle.core.function.hmi.ui.widget.DemoModeView
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import kotlinx.android.synthetic.main.view_debug_setting.view.*
import kotlinx.android.synthetic.main.view_sop_setting.view.*
import kotlinx.android.synthetic.main.view_sop_setting.view.tbRouteDynamicEffect
import java.util.*
@@ -141,7 +140,7 @@ internal class SOPSettingView @JvmOverloads constructor(
HmiBuildConfig.isShowTrafficLightView = false
} else {
HmiBuildConfig.isShowTrafficLightView = true
CallerHmiManager.disableWarningTrafficLight()
CallerTrafficLightListenerManager.disableTrafficLight()
}
}
@@ -187,17 +186,17 @@ internal class SOPSettingView @JvmOverloads constructor(
}
//OBU控制总开关
tbObu.isChecked = CallerOBUManager.isConnected()
tbObu.isChecked = CallerObuApiManager.isConnected()
tbObu.setOnCheckedChangeListener { _, isChecked ->
if (!isChecked) {
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
CallerOBUManager.resetObuIpAddress("192.168.1.199")
CallerObuApiManager.resetObuIpAddress("192.168.1.199")
} else if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
CallerOBUManager.resetObuIpAddress("192.168.8.199")
CallerObuApiManager.resetObuIpAddress("192.168.8.199")
}
} else {
//断开链接
CallerOBUManager.disConnectObu()
CallerObuApiManager.disConnectObu()
}
}

View File

@@ -5,13 +5,17 @@ import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
import android.widget.ImageView
import android.widget.LinearLayout
import android.widget.TextView
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.config.HmiBuildConfig
import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.data.enums.TrafficLightEnum
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.TrafficLightView_TAG
import com.mogo.eagle.core.function.api.hmi.view.IViewTrafficLight
import com.mogo.eagle.core.function.api.trafficlight.IMoGoTrafficLightListener
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
@@ -23,13 +27,18 @@ class SingleTrafficLightView @JvmOverloads constructor(
context: Context?,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : IViewTrafficLight(context, attrs, defStyleAttr), IViewControlListener {
) : LinearLayout(context, attrs, defStyleAttr), IViewControlListener, IMoGoTrafficLightListener {
companion object {
private const val TAG = "SingleTrafficLightView"
}
private var mLightIconIV: ImageView? = null
private var mLightIconBG: ImageView? = null
private var mLightTimeTV: GradientTextView? = null
private var mLightSourceTV: TextView? = null
private var mLightSourceDivider: View? = null
private var mCurrentLightId = 0
private var mCurrentLightId = TrafficLightEnum.BLACK
override fun onAttachedToWindow() {
super.onAttachedToWindow()
@@ -40,6 +49,7 @@ class SingleTrafficLightView @JvmOverloads constructor(
mLightSourceTV = findViewById(R.id.hmi_traffic_light_source)
mLightSourceDivider = findViewById(R.id.hmi_traffic_light_divider)
CallerTrafficLightListenerManager.addListener(TAG, this)
CallerHmiViewControlListenerManager.addListener(TrafficLightView_TAG, this)
}
@@ -50,6 +60,7 @@ class SingleTrafficLightView @JvmOverloads constructor(
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
CallerTrafficLightListenerManager.removeListener(TAG)
CallerHmiViewControlListenerManager.removeListener(TrafficLightView_TAG)
}
@@ -57,10 +68,10 @@ class SingleTrafficLightView @JvmOverloads constructor(
* 展示红绿灯预警
*
* @param checkLightId 0-都是默认1-红2-黄3-绿
* @param lightSource 1:云端下发2:自车感知
* @param lightSource 1:云端下发2:自车感知 3:OBU
*/
override fun showWarningTrafficLight(checkLightId: Int, lightSource: Int) {
super.showWarningTrafficLight(checkLightId, lightSource)
override fun showTrafficLight(checkLightId: TrafficLightEnum, lightSource: DataSourceType) {
super.showTrafficLight(checkLightId, lightSource)
mCurrentLightId = checkLightId
if (!HmiBuildConfig.isShowTrafficLightView) {
updateTrafficLightIcon(checkLightId, lightSource)
@@ -70,16 +81,16 @@ class SingleTrafficLightView @JvmOverloads constructor(
/**
* 关闭红绿灯预警展示,并重制灯态
*/
override fun disableWarningTrafficLight() {
super.disableWarningTrafficLight()
override fun disableTrafficLight() {
super.disableTrafficLight()
UiThreadHandler.post {
mCurrentLightId = 0
mCurrentLightId = TrafficLightEnum.BLACK
this@SingleTrafficLightView.visibility = GONE
}
}
override fun disableCountdown() {
super.disableCountdown()
override fun disableTrafficLightCountDown() {
super.disableTrafficLightCountDown()
UiThreadHandler.post {
// 小巴车的司机端需要展示红绿灯信号来源
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)
@@ -118,9 +129,9 @@ class SingleTrafficLightView @JvmOverloads constructor(
UiThreadHandler.post {
resetView()
when (mCurrentLightId) {
1 -> changeCountdownRed(redNum)
2 -> changeCountdownYellow(yellowNum)
3 -> changeCountdownGreen(greenNum)
TrafficLightEnum.RED -> changeCountdownRed(redNum)
TrafficLightEnum.YELLOW -> changeCountdownYellow(yellowNum)
TrafficLightEnum.GREEN -> changeCountdownGreen(greenNum)
else -> UiThreadHandler.post { mLightTimeTV!!.text = "" }
}
}
@@ -140,7 +151,7 @@ class SingleTrafficLightView @JvmOverloads constructor(
)
mLightTimeTV!!.text = redNum.toString()
} else {
disableCountdown()
disableTrafficLightCountDown()
mLightTimeTV!!.text = ""
}
}
@@ -160,7 +171,7 @@ class SingleTrafficLightView @JvmOverloads constructor(
)
mLightTimeTV!!.text = greenNum.toString()
} else {
disableCountdown()
disableTrafficLightCountDown()
mLightTimeTV!!.text = ""
}
}
@@ -180,7 +191,7 @@ class SingleTrafficLightView @JvmOverloads constructor(
)
mLightTimeTV!!.text = yellowNum.toString()
} else {
disableCountdown()
disableTrafficLightCountDown()
mLightTimeTV!!.text = ""
}
}
@@ -192,30 +203,33 @@ class SingleTrafficLightView @JvmOverloads constructor(
* @param lightId 0-都是默认1-红2-黄3-绿
* @param lightSource 1:云端下发2:自车感知
*/
private fun updateTrafficLightIcon(lightId: Int, lightSource: Int) {
private fun updateTrafficLightIcon(lightId: TrafficLightEnum, lightSource: DataSourceType) {
UiThreadHandler.post {
when (lightId) {
1 -> {
TrafficLightEnum.RED -> {
mLightIconIV!!.setBackgroundResource(R.drawable.hmi_light_red_nor)
this@SingleTrafficLightView.visibility = VISIBLE
}
2 -> {
TrafficLightEnum.YELLOW -> {
mLightIconIV!!.setBackgroundResource(R.drawable.hmi_lightyellow_nor)
this@SingleTrafficLightView.visibility = VISIBLE
}
3 -> {
TrafficLightEnum.GREEN -> {
mLightIconIV!!.setBackgroundResource(R.drawable.hmi_light_green_nor)
this@SingleTrafficLightView.visibility = VISIBLE
}
else -> this@SingleTrafficLightView.visibility = GONE
}
when (lightSource) {
1 -> {
DataSourceType.AICLOUD -> {
mLightSourceTV!!.text = "云端下发"
}
2 -> {
DataSourceType.TELEMATIC -> {
mLightSourceTV!!.text = "自车感知"
}
DataSourceType.OBU -> {
mLightSourceTV!!.text = "OBU"
}
else -> {
mLightSourceTV!!.visibility = GONE
}

View File

@@ -1,122 +0,0 @@
package com.mogo.eagle.core.function.hmi.ui.widget
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.eagle.core.function.api.hmi.view.IViewTrafficLight
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import kotlinx.android.synthetic.main.view_traffic_light_vr.view.*
/**
* @author xiaoyuzhou
* @date 2021/8/4 3:16 下午
* 红绿灯控件
*/
class TrafficLightView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : IViewTrafficLight(context, attrs, defStyleAttr) {
init {
LayoutInflater.from(context).inflate(R.layout.view_traffic_light_vr, this, true)
}
/**
* 展示红绿灯预警
*
* @param checkLightId 0-都是默认1-红2-黄3-绿
* @param lightSource 1:云端下发2:自车感知
*/
override fun showWarningTrafficLight(checkLightId: Int,lightSource: Int) {
UiThreadHandler.post {
visibility = View.VISIBLE
when (checkLightId) {
0 -> {
ctvRedTrafficLight.isChecked = false
ctvYellowTrafficLight.isChecked = false
ctvGreenTrafficLight.isChecked = false
}
1 -> {
ctvRedTrafficLight.isChecked = true
ctvYellowTrafficLight.isChecked = false
ctvGreenTrafficLight.isChecked = false
}
2 -> {
ctvRedTrafficLight.isChecked = false
ctvYellowTrafficLight.isChecked = true
ctvGreenTrafficLight.isChecked = false
}
3 -> {
ctvRedTrafficLight.isChecked = false
ctvYellowTrafficLight.isChecked = false
ctvGreenTrafficLight.isChecked = true
}
}
}
}
/**
* 关闭红绿灯预警展示,并重制灯态
*/
override fun disableWarningTrafficLight() {
UiThreadHandler.post {
visibility = View.GONE
ctvRedTrafficLight.isChecked = false
ctvYellowTrafficLight.isChecked = false
ctvGreenTrafficLight.isChecked = false
ctvRedTrafficLight.text = ""
ctvYellowTrafficLight.text = ""
ctvGreenTrafficLight.text = ""
}
}
/**
* @param readNum 红灯倒计时
* @param yellowNum 黄灯倒计时
* @param greenNum 绿灯倒计时
*/
override fun changeCountdownTrafficLightNum(readNum: Int, yellowNum: Int, greenNum: Int) {
UiThreadHandler.post {
changeCountdownGreen(readNum)
changeCountdownYellow(yellowNum)
changeCountdownRed(greenNum)
}
}
override fun changeCountdownGreen(greenNum: Int) {
UiThreadHandler.post {
if (greenNum > 0) {
ctvGreenTrafficLight.text = "$greenNum"
} else {
ctvGreenTrafficLight.text = ""
}
}
}
override fun changeCountdownYellow(yellowNum: Int) {
UiThreadHandler.post {
if (yellowNum > 0) {
ctvYellowTrafficLight.text = "$yellowNum"
} else {
ctvYellowTrafficLight.text = ""
}
}
}
override fun changeCountdownRed(redNum: Int) {
UiThreadHandler.post {
if (redNum > 0) {
ctvRedTrafficLight.text = "$redNum"
} else {
ctvRedTrafficLight.text = ""
}
}
}
}

View File

@@ -242,34 +242,35 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
*/
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent code = " + event.getKeyCode() + "--action = " + event.getAction() + "----" + event);
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent code = " + event.getKeyCode() + "--action = " + event.getAction() + "----" + event);
String bluetoothName = SharedPrefsMgr.getInstance(getContext()).getString(MfConstants.BLUETOOTH_NAME);
if (!isPressEnd) {
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent ---1--- bluetoothName = " + bluetoothName);
CallerLogger.INSTANCE.d(M_F + "MoFangManager","dispatchKeyEvent ---1--- bluetoothName = " + bluetoothName);
}
if (bluetoothName.equals("MINI_KEYBOARD")) {
if (!isPressEnd) {
isPressEnd = true;
startPressTime = System.currentTimeMillis();
}
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent ---2--- bluetoothName = " + bluetoothName + "--- code = " + event.getKeyCode() + "--action = " + event.getAction());
CallerLogger.INSTANCE.d(M_F + "MoFangManager","dispatchKeyEvent ---2--- bluetoothName = " + bluetoothName + "--- code = " + event.getKeyCode() + "--action = " + event.getAction());
if (event.getKeyCode() == KeyEvent.KEYCODE_A) { //单击 -1长按无操作AB组合-2
if (event.getAction() == KeyEvent.ACTION_DOWN) {
pressADownTime = System.currentTimeMillis();
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent A down pressADownTime = " + pressADownTime + "---" + (pressADownTime - startPressTime) + "----isCombinationKey = " + isCombinationKey + "--pressBDownTime = " + pressBDownTime);
if ((pressADownTime - startPressTime) > 360 && (pressADownTime - startPressTime) < 1300 && pressBDownTime > 0) {
if (isShowToast) {
ToastUtils.showShort("方块 A 按AB组合 -2 ");
ToastUtils.showShort("方块 A 按AB组合 +1 ");
}
sendAcc(true, -2);
sendAcc(true, +1);
isCombinationKey = 3;
}
if (isCombinationKey != 3 && isCombinationKey != 1) {
if ((pressADownTime - startPressTime) > 1320) {
if (isShowToast) {
ToastUtils.showShort("方块 长按A 无 操作 ");
ToastUtils.showShort("方块 长按A -2 ");
}
sendAcc(true, -2);
isCombinationKey = 2;
}
}
@@ -299,17 +300,16 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent B down pressBDownTime = " + pressBDownTime + "--差-" + (pressBDownTime - startPressTime) + "---isCombinationKey = " + isCombinationKey + "--pressADownTime = " + pressADownTime);
if ((pressBDownTime - startPressTime) > 360 && (pressBDownTime - startPressTime) < 1300 && pressADownTime > 0) {
if (isShowToast) {
ToastUtils.showShort("方块 B 按AB组合 ");
ToastUtils.showShort("方块 B 按AB组合 +1 ");
}
sendAcc(true, -2);
sendAcc(true, +1);
isCombinationKey = 3;
}
if (isCombinationKey != 3 && isCombinationKey != 1) {
if ((pressBDownTime - startPressTime) > 1320) {
if (isShowToast) {
ToastUtils.showShort("方块 长按B +1 ");
ToastUtils.showShort("方块 长按B 无操作 ");
}
sendAcc(true, +1);
isCombinationKey = 2;
}
}

View File

@@ -21,99 +21,6 @@
android:layout_height="match_parent"
android:paddingTop="72dp">
<!--消息盒子司机端选择入口-->
<CheckBox
android:id="@+id/cbMsgBoxDriver"
android:layout_width="150dp"
android:layout_height="150dp"
android:layout_marginTop="15dp"
android:layout_marginEnd="25dp"
android:background="@drawable/selector_msg_box"
android:button="@null"
android:visibility="gone"
app:layout_constraintRight_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
<!-- todo 需要放入使用方 , view先gone掉方便重组 -->
<!-- app:layout_constraintRight_toLeftOf="@id/viewLimitingVelocity"-->
<!-- app:layout_constraintTop_toBottomOf="@+id/ivCameraIcon" />-->
<!--司机端消息提示-->
<View
android:id="@+id/MsgBoxTipView"
android:layout_width="8dp"
android:layout_height="8dp"
android:background="@drawable/version_upgrade_tips_background"
android:translationZ="30dp"
android:visibility="gone"
app:layout_constraintCircle="@id/cbMsgBoxDriver"
app:layout_constraintCircleAngle="40"
app:layout_constraintCircleRadius="32dp"
tools:ignore="MissingConstraints" />
<!--消息盒子乘客端选择入口-->
<CheckBox
android:id="@+id/cbMsgBoxPassenger"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_marginStart="320dp"
android:layout_marginBottom="50dp"
android:background="@drawable/selector_msg_box_p"
android:button="@null"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" />
<!--乘客端消息提示-->
<View
android:id="@+id/MsgBoxPTipView"
android:layout_width="15dp"
android:layout_height="15dp"
android:background="@drawable/version_upgrade_tips_background"
android:translationZ="30dp"
android:visibility="gone"
app:layout_constraintCircle="@id/cbMsgBoxPassenger"
app:layout_constraintCircleAngle="40"
app:layout_constraintCircleRadius="50dp"
tools:ignore="MissingConstraints" />
<com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxListView
android:id="@+id/viewDriverMsgBoxList"
android:layout_width="864px"
android:layout_height="746px"
android:layout_marginEnd="40dp"
android:visibility="gone"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbMsgBoxDriver" />
<com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxBubbleView
android:id="@+id/viewDriverMsgBoxBubble"
android:layout_width="864px"
android:layout_height="wrap_content"
android:layout_marginEnd="40dp"
android:visibility="visible"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbMsgBoxDriver" />
<com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxBubbleView
android:id="@+id/viewPassengerMsgBoxBubble"
android:layout_width="650px"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@id/cbMsgBoxPassenger"
app:layout_constraintLeft_toLeftOf="@id/cbMsgBoxPassenger"
app:layout_constraintRight_toRightOf="@id/cbMsgBoxPassenger" />
<com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxListView
android:id="@+id/viewPassengerMsgBoxList"
android:layout_width="650px"
android:layout_height="750px"
android:layout_marginBottom="20dp"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@id/cbMsgBoxPassenger"
app:layout_constraintLeft_toLeftOf="@id/cbMsgBoxPassenger"
app:layout_constraintRight_toRightOf="@id/cbMsgBoxPassenger" />
<!--左右转向灯-->
<com.mogo.eagle.core.function.hmi.ui.turnlight.TurnLightViewStatus
android:id="@+id/turnLightView"

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<com.mogo.eagle.core.widget.RoundCanClickConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/clBubbleOperationLayout"
android:layout_width="804dp"
android:layout_height="160dp"
xmlns:app="http://schemas.android.com/apk/res-auto"
@@ -7,7 +8,8 @@
app:roundLayoutRadius="24dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="7dp"
android:layout_marginBottom="7dp">
android:layout_marginBottom="7dp"
>
<ImageView
android:id="@+id/ivBubbleOperationImage"
@@ -61,4 +63,4 @@
android:lineSpacingMultiplier="1.2"
/>
</com.mogo.eagle.core.widget.RoundConstraintLayout>
</com.mogo.eagle.core.widget.RoundCanClickConstraintLayout>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<com.mogo.eagle.core.widget.RoundCanClickConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/clReportLayout"
android:layout_width="804dp"
android:layout_height="160dp"
xmlns:app="http://schemas.android.com/apk/res-auto"
@@ -72,4 +73,4 @@
android:textSize="24dp"
/>
</com.mogo.eagle.core.widget.RoundConstraintLayout>
</com.mogo.eagle.core.widget.RoundCanClickConstraintLayout>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<com.mogo.eagle.core.widget.RoundCanClickConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/clV2XLayout"
android:layout_width="804dp"
android:layout_height="160dp"
xmlns:app="http://schemas.android.com/apk/res-auto"
@@ -44,4 +45,4 @@
android:ellipsize="end"
/>
</com.mogo.eagle.core.widget.RoundConstraintLayout>
</com.mogo.eagle.core.widget.RoundCanClickConstraintLayout>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<com.mogo.eagle.core.widget.RoundCanClickConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/clPassengerVeXLayout"
android:layout_width="650dp"
android:layout_height="160dp"
xmlns:app="http://schemas.android.com/apk/res-auto"
@@ -47,4 +48,4 @@
android:layout_marginEnd="25dp"
/>
</com.mogo.eagle.core.widget.RoundConstraintLayout>
</com.mogo.eagle.core.widget.RoundCanClickConstraintLayout>

View File

@@ -1286,30 +1286,6 @@
android:textOn="显示「小地图」"
android:textSize="@dimen/dp_24" />
<ToggleButton
android:id="@+id/tbOpenLight"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_columnWeight="1"
android:layout_margin="2dp"
android:gravity="center"
android:padding="@dimen/dp_20"
android:textOff="关闭「转向灯控制」"
android:textOn="打开「转向灯控制」"
android:textSize="@dimen/dp_24" />
<ToggleButton
android:id="@+id/tbOpenBrakeLight"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_columnWeight="1"
android:layout_margin="2dp"
android:gravity="center"
android:padding="@dimen/dp_20"
android:textOff="关闭「刹车控制」"
android:textOn="打开「刹车控制」"
android:textSize="@dimen/dp_24" />
<ToggleButton
android:id="@+id/tbOpenSnBinding"
android:layout_width="wrap_content"

View File

@@ -20,7 +20,7 @@
<!--司机端消息提示-->
<View
android:id="@+id/MsgBoxTipView"
android:id="@+id/msgBoxTipView"
android:layout_width="8dp"
android:layout_height="8dp"
android:background="@drawable/version_upgrade_tips_background"

View File

@@ -17,7 +17,7 @@
<!--乘客端消息提示-->
<View
android:id="@+id/MsgBoxPTipView"
android:id="@+id/msgBoxPTipView"
android:layout_width="15dp"
android:layout_height="15dp"
android:background="@drawable/version_upgrade_tips_background"

View File

@@ -1,63 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/clTrafficLight"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_waring_traffic_light_vr"
android:paddingStart="10dp"
android:paddingTop="10dp"
android:paddingEnd="10dp"
android:paddingBottom="10dp"
tools:visibility="visible">
<CheckedTextView
android:id="@+id/ctvRedTrafficLight"
android:layout_width="110dp"
android:layout_height="110dp"
android:background="@drawable/icon_waring_traffic_light_red_vr"
android:gravity="center"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="38dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:checked="true"
tools:text="99" />
<CheckedTextView
android:id="@+id/ctvYellowTrafficLight"
android:layout_width="110dp"
android:layout_height="110dp"
android:layout_marginStart="90dp"
android:background="@drawable/icon_waring_traffic_light_yellow_vr"
android:gravity="center"
android:singleLine="true"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="38dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="@+id/ctvRedTrafficLight"
app:layout_constraintTop_toTopOf="parent"
tools:checked="true"
tools:text="99" />
<CheckedTextView
android:id="@+id/ctvGreenTrafficLight"
android:layout_width="110dp"
android:layout_height="110dp"
android:layout_marginStart="90dp"
android:background="@drawable/icon_waring_traffic_light_green_vr"
android:gravity="center"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="38dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/ctvYellowTrafficLight"
app:layout_constraintTop_toTopOf="parent"
tools:checked="true"
tools:text="99" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -81,6 +81,7 @@ dependencies {
implementation project(':core:mogo-core-res')
implementation project(':core:mogo-core-data')
implementation project(':core:mogo-core-utils')
implementation project(':core:function-impl:mogo-core-function-datacenter')
implementation project(':core:mogo-core-function-call')
implementation project(":libraries:mogo-map")
}

View File

@@ -9,12 +9,9 @@ import com.mogo.cloud.passport.MoGoAiCloudClientConfig
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.constants.MogoServicePaths
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_MAP
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.function.api.autopilot.*
import com.mogo.eagle.core.function.api.map.collect.IMoGoMapDataCollectProvider
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener
import com.mogo.eagle.core.function.call.autopilot.*
import com.mogo.eagle.core.function.call.map.CallerMapDataCollectorManager
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
import com.zhidaoauto.map.operational.open.GatherApi

View File

@@ -5,7 +5,7 @@ import android.os.Message
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.traffic.TrafficData
import com.mogo.eagle.core.function.api.obu.IMoGoObuStatusListener
import com.mogo.eagle.core.function.call.obu.CallerObuListenerManager
import com.mogo.eagle.core.function.call.obu.CallerObuWarningListenerManager
import com.mogo.eagle.core.utilcode.mogo.thread.WorkThreadHandler
import mogo.telematics.pad.MessagePad
import mogo.telematics.pad.MessagePad.TrackedObject
@@ -30,7 +30,7 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener {
} else {
DriverIdentify.originDataDrawer
}
CallerObuListenerManager.addListener(TAG, this)
CallerObuWarningListenerManager.addListener(TAG, this)
}
private const val MSG_DATA_TRACK = 0

View File

@@ -8,8 +8,8 @@ import com.alibaba.android.arouter.facade.annotation.Route
import com.mogo.commons.mvp.MvpFragment
import com.mogo.eagle.core.data.constants.MoGoConfig
import com.mogo.eagle.core.data.constants.MoGoFragmentPaths
import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.data.map.CenterLine
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLamplightListener
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener
import com.mogo.eagle.core.function.api.map.hd.IMoGoMapFragmentProvider
@@ -18,15 +18,14 @@ import com.mogo.eagle.core.function.business.MapPointCloudSubscriber
import com.mogo.eagle.core.function.business.SpeedLimitDataManager
import com.mogo.eagle.core.function.business.identify.MapIdentifySubscriber
import com.mogo.eagle.core.function.business.routeoverlay.MogoRouteOverlayManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLamplightListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showBrakeLight
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showTurnLight
import com.mogo.eagle.core.function.call.map.CallerHDMapManager
import com.mogo.eagle.core.function.call.map.CallerMapDataCollectorManager
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
import com.mogo.eagle.core.function.datacenter.location.IMoGoLocationListener
import com.mogo.eagle.core.function.datacenter.location.MoGoLocationManager
import com.mogo.eagle.core.function.overview.InfStructureManager
import com.mogo.eagle.core.function.overview.InfStructureManager.savePlanningData
import com.mogo.eagle.core.function.overview.obtainViewModel
@@ -55,7 +54,7 @@ class MapFragment : MvpFragment<MapView?, MapPresenter?>(),
MapView,
IMoGoMapFragmentProvider,
IMoGoSkinModeChangeListener,
IMoGoChassisLocationWGS84Listener,
IMoGoLocationListener,
IMoGoPlanningRottingListener,
IMoGoChassisLamplightListener {
@@ -115,7 +114,7 @@ class MapFragment : MvpFragment<MapView?, MapPresenter?>(),
// 添加换肤监听
CallerSkinModeListenerManager.addListener(Companion.functionName, this)
CallerPlanningRottingListenerManager.addListener(Companion.functionName, this)
CallerChassisLocationWGS84ListenerManager.addListener(Companion.functionName, this)
MoGoLocationManager.addListener(Companion.functionName, this)
CallerChassisLamplightListenerManager.addListener(Companion.functionName, this)
}
@@ -219,7 +218,7 @@ class MapFragment : MvpFragment<MapView?, MapPresenter?>(),
override fun onDestroyView() {
CallerSkinModeListenerManager.removeListener(Companion.functionName)
CallerPlanningRottingListenerManager.removeListener(Companion.functionName)
CallerChassisLocationWGS84ListenerManager.removeListener(Companion.functionName)
MoGoLocationManager.removeListener(Companion.functionName)
CallerChassisLamplightListenerManager.removeListener(Companion.functionName)
if (mMogoMapView != null) {
@@ -347,7 +346,7 @@ class MapFragment : MvpFragment<MapView?, MapPresenter?>(),
private var isShowTurnLight = false
private var brakeLight = -1
override fun onChassisLocationWGS84(gnssInfo: MessagePad.GnssInfo?) {
override fun onLocationChanged(gnssInfo: MessagePad.GnssInfo,sourceType: DataSourceType) {
// 跟新地图控件
mMogoMapView?.setExtraGPSData(gnssInfo)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 11 KiB

Some files were not shown because too many files have changed in this diff Show More