Merge remote-tracking branch 'origin/dev_robobus-m1-p-app-module_1.1.0_230112_1.1.0' into dev_robobus-m1-p-app-module_1.1.0_230112_1.1.0

This commit is contained in:
yangyakun
2023-03-08 22:06:55 +08:00
7 changed files with 57 additions and 25 deletions

View File

@@ -45,8 +45,8 @@ class AdvanceVideoView @JvmOverloads constructor(
}
private fun initView() {
initVideoView()
initCacheImgView()
initVideoView()
}
private fun initCacheImgView() {
@@ -87,7 +87,7 @@ class AdvanceVideoView @JvmOverloads constructor(
}
private fun loadCacheImg() {
// BitmapHelper.getVideoThumbnail(path) /*获取第一帧图*/
// BitmapHelper.getVideoThumbnail(path) /*获取第一帧图*
cacheImage?.setImageResource(R.drawable.m2_p_video_holder)
setCacheImageViewVisible()
// OCHThreadPoolManager.getsInstance().execute {
@@ -95,16 +95,16 @@ class AdvanceVideoView @JvmOverloads constructor(
Logger.d(ImageAndVideoRotation.TAG, "setVideoPath")
// ThreadUtils.runOnUiThread {
// Logger.d(ImageAndVideoRotation.TAG, "bitmap加载")
cacheImage?.let {
Glide.with(context).load(cacheImageUrl)
.apply(
RequestOptions().placeholder(R.drawable.m2_p_video_holder)
.error(R.drawable.m2_p_video_holder)
.fallback(R.drawable.m2_p_video_holder)
.centerCrop()
)
.into(it)
}
// cacheImage?.let {
// Glide.with(context).load(cacheImageUrl)
// .apply(
// RequestOptions().placeholder(R.drawable.m2_p_video_holder)
// .error(R.drawable.m2_p_video_holder)
// .fallback(R.drawable.m2_p_video_holder)
// .centerCrop()
// )
// .into(it)
// }
// }
// }
}

View File

@@ -1,6 +1,5 @@
package com.mogo.och.bus.fragment;
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS;
import static com.mogo.och.bus.constant.BusConst.TIMER_START_AUTOPILOT_INTERVAL;
import android.animation.ObjectAnimator;
@@ -398,14 +397,20 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
} else {
ctvAutopilotStatusTv.setTextColor(getResources().getColor(R.color.bus_autopilot_text_color_normal));
ctvAutopilotStatusTv.setText(getResources().getString(R.string.bus_loading_autopilot_runnig_tv));
ctvAutopilotStatusIv.setImageResource(R.drawable.bus_ic_autopilot);
ctvAutopilotStatus.setClickable(true);
if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE == autopilotStatus) {//1可用
if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE == autopilotStatus) { //1可用
ctvAutopilotStatus.setSelected(false);
ctvAutopilotStatusTv.setText(getResources().getString(R.string.bus_loading_autopilot_runnig_tv));
} else if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING == autopilotStatus) {
ctvAutopilotStatusTv.setText(R.string.bus_loading_autopilot_runnig_tv);
ctvAutopilotStatus.setSelected(true);
} else if (IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING
== autopilotStatus){
ctvAutopilotStatusTv.setText(R.string.bus_pingxing_driver);
ctvAutopilotStatusTv.setBackground(getContext().getDrawable(R.drawable.pingxingjiashi));
}
}
}

View File

@@ -221,6 +221,24 @@ public class BusPresenter extends Presenter<BusFragment>
mView.onAutopilotStatusChanged(currentAutopilotStatus);
});
break;
case IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING:
if (FunctionBuildConfig.isDemoMode
&& (
(mCurrentStation >= 0 && mCurrentStation <= mStationList.size() - 1)
&& OrderModel.getInstance().isGoingToNextStation()
)
) {
CallerLogger.INSTANCE.d(M_BUS + "BusOrderModel=", "有美化功能");
return;
}
if (currentAutopilotStatus != IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING) {
currentAutopilotStatus = IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING;
}
runOnUIThread(() -> {
mView.onAutopilotStatusChanged(currentAutopilotStatus);
});
break;
default:
runOnUIThread(() -> mView.onAutopilotEnableChange(false));
break;

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

View File

@@ -57,4 +57,6 @@
<string name="bus_before_tips_s">距离发车时间还有%1$s分钟</string>
<string name="bus_pingxing_driver">平行驾驶</string>
</resources>

View File

@@ -25,6 +25,7 @@ import com.mogo.eagle.core.data.BaseData;
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.och.common.module.biz.common.socketmessage.data.SystemMsg;
import com.mogo.och.common.module.biz.constant.OchCommonConst;
import com.mogo.eagle.core.data.telematic.TelematicConstant;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
@@ -214,22 +215,31 @@ public class OrderModel {
});
}
private final IMogoOnMessageListener<OCHOperationalMessage> mMogoOnMessageListener =
new IMogoOnMessageListener<OCHOperationalMessage>() {
private final IMogoOnMessageListener<SystemMsg> mMogoOnMessageListener =
new IMogoOnMessageListener<SystemMsg>() {
@Override
public Class<OCHOperationalMessage> target() {
return OCHOperationalMessage.class;
public Class<SystemMsg> target() {
return SystemMsg.class;
}
@Override
public void onMsgReceived(OCHOperationalMessage obj) {
public void onMsgReceived(SystemMsg obj) {
if (obj == null){
CallerLogger.INSTANCE.d(M_BUS + TAG, "onMsgReceived = null");
return;
}
CallerLogger.INSTANCE.i(M_BUS + TAG,"onMsgReceived = "+obj.getMessage());
CallerLogger.INSTANCE.i(M_BUS + TAG,"onMsgReceived = "+obj.getContext());
List<Integer> list = obj.getScreenList();
if ( list!= null && list.size() > 1){
CallerTelematicManager.INSTANCE.sendMsgToAllClients(OchCommonConst.BUSINESS_STRING,
GsonUtils.toJson(obj.getContext()).getBytes());
}
OCHSocketMessageManager.INSTANCE.pushAppOperationalMsgBox(obj.getPushTimeStamp(),
obj.getMessage(),OCHSocketMessageManager.OPERATION_SYSTEM);
obj.getContext(),OCHSocketMessageManager.OPERATION_SYSTEM);
}
};

View File

@@ -1,7 +1,4 @@
package com.mogo.och.common.module.biz.common.socketmessage.data
import com.mogo.och.common.module.biz.common.socketmessage.OCHSocketMessageManager.msgOrderClosedType
/**
* @author: wangmingjun
* @date: 2023/2/25