Merge remote-tracking branch 'origin/dev_robotaxi-d_240523_6.4.4' into dev_robotaxi-d_240523_6.4.4

This commit is contained in:
xuxinchao
2024-06-14 11:00:15 +08:00
9 changed files with 75 additions and 50 deletions

View File

@@ -21,6 +21,7 @@ import com.mogo.eagle.core.utilcode.mogo.view.SpacesItemDecoration
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.och.bus.R
import com.mogo.och.bus.bean.response.BusQueryLineTaskResponse
import com.mogo.och.common.module.utils.ResourcesUtils
import java.util.ArrayList
/**
@@ -139,7 +140,7 @@ class BusSwitchLineActivity : MvpActivity<BusSwitchLineView?, BusLinePresenter?>
}
override fun onChangeLineIdSuccess() {
ToastUtils.showLong(resources.getString(R.string.bus_change_line_commit_tip_s))
ToastUtils.showLong(ResourcesUtils.getString(R.string.bus_change_line_commit_tip_s))
mPresenter?.queryBusRoutes()
mAdapter.setOnLineItemClickListener(null)
mPresenter?.removeListener()

View File

@@ -15,6 +15,7 @@ import com.mogo.och.bus.passenger.R
import com.mogo.och.bus.passenger.passenger.presenter.PM2DrivingPresenter
import com.mogo.och.common.module.utils.DateTimeUtil.*
import com.mogo.och.common.module.utils.NumberFormatUtil
import com.mogo.och.common.module.utils.ResourcesUtils
import com.mogo.och.data.bean.BusStationBean
import kotlinx.android.synthetic.main.bus_p_m2_driving_info_fragment.auto_tv
import kotlinx.android.synthetic.main.bus_p_m2_driving_info_fragment.clg_distance_left_time
@@ -66,12 +67,12 @@ class PM2DrivingInfoFragment :
true
}
line_name_tv.setTextColor(resources.getColor(R.color.bus_p_m2_line_name_tv_color))
station_name_tv.setTextColor(resources.getColor(R.color.bus_p_m2_line_name_tv_color))
line_name_tv.setTextColor(ResourcesUtils.getColor(R.color.bus_p_m2_line_name_tv_color))
station_name_tv.setTextColor(ResourcesUtils.getColor(R.color.bus_p_m2_line_name_tv_color))
speed_tv.setVertrial(true)
val intArrayOf = intArrayOf(
requireContext().resources.getColor(R.color.bus_p_m2_color_43cefe),
requireContext().resources.getColor(R.color.bus_p_m2_color_1466fb)
ResourcesUtils.getColor(R.color.bus_p_m2_color_43cefe),
ResourcesUtils.getColor(R.color.bus_p_m2_color_1466fb)
)
speed_tv.setmColorList(intArrayOf)
@@ -152,7 +153,7 @@ class PM2DrivingInfoFragment :
}
fun showNoTaskView(){
line_name_tv.text = resources.getString(R.string.bus_p_m2_not_select_line_content)
line_name_tv.text = ResourcesUtils.getString(R.string.bus_p_m2_not_select_line_content)
updateNoStationView()
overMapView?.let {
it.clearSiteMarkers()
@@ -166,10 +167,10 @@ class PM2DrivingInfoFragment :
}
}
private fun updateNoStationView(){
station_name_tv.setTextColor(resources.getColor(R.color.bus_p_m2_next_tv_color))
station_name_tv.text = resources.getString(R.string.bus_p_m2_empty_tv)
tv_distance.text = resources.getString(R.string.bus_p_m2_empty_remain_km)
tv_left_time.text = resources.getString(R.string.bus_p_m2_empty_remain_minute)
station_name_tv.setTextColor(ResourcesUtils.getColor(R.color.bus_p_m2_next_tv_color))
station_name_tv.text = ResourcesUtils.getString(R.string.bus_p_m2_empty_tv)
tv_distance.text = ResourcesUtils.getString(R.string.bus_p_m2_empty_remain_km)
tv_left_time.text = ResourcesUtils.getString(R.string.bus_p_m2_empty_remain_minute)
noLineShow()
}
@@ -214,19 +215,19 @@ class PM2DrivingInfoFragment :
fun updateStationsInfo(stations: MutableList<BusStationBean>, currentStationIndex: Int, isArrived: Boolean){
if (stations.size == 0) return
if (0<= currentStationIndex && currentStationIndex<stations.size){
station_name_tv.setTextColor(resources.getColor(R.color.bus_p_m2_next_tv_color))
station_name_tv.setTextColor(ResourcesUtils.getColor(R.color.bus_p_m2_next_tv_color))
station_name_tv.text = stations[currentStationIndex].name
}
if (currentStationIndex == 0 && isArrived){
clearCustomPolyline()
}
if (isArrived){//到站
tv_distance.text = resources.getString(R.string.bus_p_m2_empty_remain_km)
tv_left_time.text = resources.getString(R.string.bus_p_m2_empty_remain_minute)
tv_next_station_title.text = resources.getString(R.string.bus_p_m2_station_title_arrived_tv)
tv_distance.text = ResourcesUtils.getString(R.string.bus_p_m2_empty_remain_km)
tv_left_time.text = ResourcesUtils.getString(R.string.bus_p_m2_empty_remain_minute)
tv_next_station_title.text = ResourcesUtils.getString(R.string.bus_p_m2_station_title_arrived_tv)
haveLineAndArrivedStation()
}else{ //前往目的地中
tv_next_station_title.text = resources.getString(R.string.bus_p_m2_next_station_title)
tv_next_station_title.text = ResourcesUtils.getString(R.string.bus_p_m2_next_station_title)
haveLineAndArriveingStation()
}
}

View File

@@ -24,6 +24,7 @@ import com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxListView
import com.mogo.eagle.core.function.smp.view.SmallMapView
import com.mogo.eagle.core.function.view.MapBizView
import com.mogo.eagle.core.utilcode.kotlin.onClick
import com.mogo.och.common.module.utils.ResourcesUtils
import com.mogo.och.common.module.utils.SoundPoolHelper
import kotlinx.android.synthetic.main.charter_base_fragment.module_mogo_och_arrived_tv
import org.greenrobot.eventbus.EventBus
@@ -69,7 +70,7 @@ abstract class CharterBaseFragment<V : IView?, P : Presenter<V>?>() :
flStationPanelContainer = findViewById(R.id.module_mogo_och_station_panel_container)
slidePanelView = findViewById(R.id.charter_slide_panel)
slidePanelView?.setText(resources.getString(R.string.charter_back_car))
slidePanelView?.setText(ResourcesUtils.getString(R.string.charter_back_car))
slidePanelView?.setOnSlidePanelMoveToEndListener(onSlideToEndListener)
@@ -191,9 +192,9 @@ abstract class CharterBaseFragment<V : IView?, P : Presenter<V>?>() :
requireActivity().runOnUiThread {
module_mogo_och_arrived_tv.isEnabled = isClickable
if (isClickable) {
module_mogo_och_arrived_tv.setTextColor(resources.getColor(android.R.color.white))
module_mogo_och_arrived_tv.setTextColor(ResourcesUtils.getColor(android.R.color.white))
} else {
module_mogo_och_arrived_tv.setTextColor(resources.getColor(R.color.charter_arrived_btn_un_clickable_color))
module_mogo_och_arrived_tv.setTextColor(ResourcesUtils.getColor(R.color.charter_arrived_btn_un_clickable_color))
}
}
}

View File

@@ -39,7 +39,7 @@ abstract class OchAutopilotAnalytics {
private const val EVENT_KEY_START_AUTOPILOT_ACK = "event_key_och_start_autopilot_ack"
private const val EVENT_PARAM_START_AUTOPILOT_ACK= "start_autopilot_parameters_ack" // 启动自驾参数
private const val EVENT_PARAM_START_AUTOPILOT_ACK_SUCCESS= "start_autopilot_parameters_ack" // 启动自驾参数
private const val EVENT_PARAM_START_AUTOPILOT_ACK_SUCCESS= "start_autopilot_parameters_ack_isSuccess" // 启动自驾参数
private const val EVENT_KEY_INFO_AUTOPILOT_DISTANCE = "event_key_vehicle_start_autopilot_state_distance_15"

View File

@@ -1,7 +1,8 @@
package com.mogo.och.common.module.manager.device.checkvin
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisDoorStateListener
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarConfigListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager
import com.mogo.eagle.core.utilcode.util.ActivityUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.mogo.och.common.module.biz.login.LoginStatusManager
@@ -9,16 +10,22 @@ import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
import com.mogo.och.common.module.manager.loop.BizLoopManager
import com.mogo.och.common.module.manager.loop.LoopInfo
import io.reactivex.schedulers.Schedulers
import mogo.telematics.pad.MessagePad
object CheckVinManager : IMoGoChassisDoorStateListener {
object CheckVinManager : IMoGoAutopilotCarConfigListener {
private val TAG = CheckVinManager::class.java.simpleName
init {
BizLoopManager.setLoopFunction(TAG, LoopInfo(60*5,::checkVin,scheduler = Schedulers.io()))
CallerAutopilotCarConfigListenerManager.addListener(TAG,this)
}
private var checkVinErrorDialog:CheckVinErrorDialog?=null
override fun onAutopilotCarConfig(carConfigResp: MessagePad.CarConfigResp) {
checkVin()
}
private fun checkVin() {
LoginStatusManager.getLoginInfo()?.let {loginInfo ->
val serverVin = loginInfo.vin

View File

@@ -86,9 +86,9 @@ object OchChainLogManager {
val plateNum = AppConfigInfo.plateNumber
params["sn"] = SharedPrefsMgr.getInstance().sn
params["env"] = DebugConfig.getNetMode()
params["product"] = AppIdentityModeUtils.getProduct(FunctionBuildConfig.appIdentityMode)
params["role"] = AppIdentityModeUtils.getRole(FunctionBuildConfig.appIdentityMode)
params["cartype"] = AppIdentityModeUtils.getCarType(FunctionBuildConfig.appIdentityMode)
params["product"] = AppIdentityModeUtils.getProduct(FunctionBuildConfig.appIdentityMode).name
params["role"] = AppIdentityModeUtils.getRole(FunctionBuildConfig.appIdentityMode).name
params["cartype"] = AppIdentityModeUtils.getCarType(FunctionBuildConfig.appIdentityMode).name
params["plate_number"] = if (TextUtils.isEmpty(plateNum)) "" else plateNum
params["time"] = DateTimeUtils.getTimeText(DateTimeUtils.yyyy_MM_dd_HH_mm_ss_SSS)
}

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/common_5F6582"/>
<solid android:color="@color/common_3B4577"/>
<corners android:radius="46dp"/>
</shape>

View File

@@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="@dimen/dp_939"
android:layout_height="wrap_content"
android:background="@color/common_3B4577">
android:background="@drawable/common_error_vin">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/actv_error_head"

View File

@@ -233,20 +233,23 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
}
public void onAutopilotStatusChanged(int status,boolean canStart) {
getActivity().runOnUiThread(() -> {
if (isStarting && IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING != status) {
// 1. 主动开启自动驾驶中不为2为0、1则继续loading
return;
UiThreadHandler.post(new Runnable() {
@Override
public void run() {
if (isStarting && IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING != status) {
// 1. 主动开启自动驾驶中不为2为0、1则继续loading
return;
}
if (isStarting && IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING == status) {
// 2. 主动开启自动驾驶中为2则停止loading并isStarting = false
startAutopilotDone(true);
return;
}
// 3. 其他过程直接更新
startOrStopLoadingAnim(false);
autopilotStatusAnimchanged(status,canStart);
}
if (isStarting && IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING == status) {
// 2. 主动开启自动驾驶中为2则停止loading并isStarting = false
startAutopilotDone(true);
return;
}
// 3. 其他过程直接更新
startOrStopLoadingAnim(false);
autopilotStatusAnimchanged(status,canStart);
});
},UiThreadHandler.MODE.QUEUE);
}
public void stopAnimAndUpdateBtnStatus() {
@@ -302,6 +305,9 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
}
private void startAutopilotDone(boolean success) {
if(mAutopilotImage==null){
return;
}
if (autopilotLoadingAnimator != null) {
autopilotLoadingAnimator.end();
mAutopilotImage.clearAnimation();
@@ -375,15 +381,21 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
}
public void hidPanel() {
getActivity().runOnUiThread(() -> {
flStationPanelContainer.setVisibility(View.GONE);
});
UiThreadHandler.post(new Runnable() {
@Override
public void run() {
flStationPanelContainer.setVisibility(View.GONE);
}
},UiThreadHandler.MODE.QUEUE);
}
public void showPanel() {
getActivity().runOnUiThread(() -> {
flStationPanelContainer.setVisibility(View.VISIBLE);
});
UiThreadHandler.post(new Runnable() {
@Override
public void run() {
flStationPanelContainer.setVisibility(View.VISIBLE);
}
},UiThreadHandler.MODE.QUEUE);
}
/**
@@ -400,12 +412,15 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
public void changeOperationViewVisible(int visible) {
getActivity().runOnUiThread(() -> {
if (tvOperationStatus == null) {
return;
UiThreadHandler.post(new Runnable() {
@Override
public void run() {
if (tvOperationStatus == null) {
return;
}
tvOperationStatus.setVisibility(visible);
}
tvOperationStatus.setVisibility(visible);
});
},UiThreadHandler.MODE.QUEUE);
}
protected void showAmapNaviToStationFragment(boolean isShow) {