[290 taxi司机端] 远程代驾UI

This commit is contained in:
wangmingjun
2022-07-25 14:00:51 +08:00
parent a6ba9b65f7
commit 07d970175f
4 changed files with 8 additions and 7 deletions

View File

@@ -80,7 +80,5 @@ class TaxiConst {
const val TYPE_MARKER_TAXI_ORDER = "TYPE_MARKER_TAXI_ORDER"
const val TIMER_START_AUTOPILOT_INTERVAL = 20 * 1000L
const val MAN_MACHINE_CO_DRIVING = 3
}
}

View File

@@ -1130,7 +1130,7 @@ public class TaxiModel {
return;
}
}else if (state == TaxiConst.MAN_MACHINE_CO_DRIVING){
}else if (state == IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING){
if (state != mPrevAPStatus && mADASStatusCallback != null){
mADASStatusCallback.onManMachineCoDriving();
}

View File

@@ -180,11 +180,11 @@ public class TaxiPresenter extends Presenter<TaxiFragment> implements ITaxiADASS
public void onAutopilotRunning() {
runOnUIThread(() -> mView.updateAutopilotStatus(
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING));
}
@Override
public void onManMachineCoDriving() {
runOnUIThread(() -> mView.onManMachineCoDriving(TaxiConst.MAN_MACHINE_CO_DRIVING));
runOnUIThread(() -> mView.onManMachineCoDriving(IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING));
}
@Override

View File

@@ -235,6 +235,9 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
public void onClickImpl(View v) {
// 如果能自动驾驶,就自动驾驶,不能就提示
if (CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState() ==
IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING){
return; //远程代驾状态下不可开启自动驾驶,只能等远程代驾主动退出
}else if (CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState() ==
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE){
ToastUtils.showShort(getResources().getString(R.string.module_och_taxi_auto_disable_tip));
}else if (!(boolean)ctvAutopilotStatusRL.getTag()){
@@ -278,7 +281,7 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
);
findViewById(R.id.btnAutopilotmanco).setOnClickListener(view ->
onAutopilotStatusChanged(TaxiConst.MAN_MACHINE_CO_DRIVING));
onAutopilotStatusChanged(IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING));
tvOperationStatus.setOnClickListener(view -> {
onChangeOperationStatus();
@@ -413,7 +416,7 @@ public abstract class BaseTaxiTabFragment<V extends IView, P extends Presenter<V
ctvAutopilotStatusRL.setBackground(getResources().getDrawable(R.drawable.taxi_autopilot_bg_selector));
animatorDrawableUtil = null;
} else if (TaxiConst.MAN_MACHINE_CO_DRIVING == status){
} else if (IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING == status){
mAutopilotTv.setText("远程代驾");
mAutopilotTv.setTextColor(getResources().getColor(R.color.taxi_autopilot_text_color_normal));
mAutopilotImage.setImageResource(R.drawable.taxi_ic_autopilot);