Merge branch 'dev_robotaxi-d-app-module_270_220510_2.7.0' of gitlab.zhidaoauto.com:zhjt/AndroidApp/MoGoEagleEye into dev_robotaxi-d-app-module_270_220510_2.7.0

This commit is contained in:
xinfengkun
2022-05-12 19:07:35 +08:00
8 changed files with 93 additions and 11 deletions

View File

@@ -966,7 +966,7 @@ public class TaxiModel {
* 测试开始服务
*/
public void setOnTheWayToEndStation() {
if (mADASStatusCallback != null) mADASStatusCallback.onAutopilotRunning();
// if (mADASStatusCallback != null) mADASStatusCallback.onAutopilotRunning();
if (mCurrentOCHOrder == null
|| mCurrentOCHOrder.orderStatus != TaxiOrderStatusEnum.ArriveAtStart.getCode()) {
TipToast.shortTip("订单状态不匹配该操作!");

View File

@@ -190,8 +190,59 @@ public class TaxiBeingServerdOrdersFragment extends BaseTaxiUIFragment implement
mTitleTV2.setText("送乘客至");
mStationTv2.setText(order.endSiteAddr);
} else if (TaxiOrderStatusEnum.ArriveAtStart.getCode() == order.orderStatus) {
CallerLogger.INSTANCE.d(M_TAXI + TAG, "已经达到起点");
} else if (TaxiOrderStatusEnum.UserArriveAtStart.getCode() == order.orderStatus
|| TaxiOrderStatusEnum.ArriveAtStart.getCode() == order.orderStatus){
mContentModule2.setVisibility(View.GONE);
mContentModule3.setVisibility(View.VISIBLE);
mArrivedStartTimeTv32.setVisibility(View.VISIBLE);
mContentModule32.setVisibility(View.VISIBLE);
mContentModule31.setVisibility(View.GONE);
mOrderOtherContent3.setVisibility(View.GONE);
Calendar currentCale = DateTimeUtils.getCurrentDateTime();
String currentHM = DateTimeUtil.formatCalendarToString(currentCale, DateTimeUtil.TAXI_HH_mm);
String currentDay = DateTimeUtil.formatCalendarToString(currentCale, DateTimeUtil.TAXI_yyyy_MM_dd);
String strHtml11 = "<font color=\"#CAD6FF\">已于</font><br>"
+ "<b><font color=\"#FFFFFF\"><big><big>" + currentHM + "</big></big></font></b>"
+ "<font color=\"#CAD6FF\">" + " " + "到达乘客上车地点</font>";
mArrivedStartTimeTv32.setLineHeight(60);
mArrivedStartTimeTv32.setText(Html.fromHtml(strHtml11));
mArrivedStationTitleTv32.setText("送乘客至");
mStationTv32.setText(order.endSiteAddr);
currentCale.add(Calendar.MINUTE, 10);
String strHtml13 = "";
if (currentDay.equals(DateTimeUtil.formatCalendarToString(currentCale, DateTimeUtil.TAXI_yyyy_MM_dd))) {
strHtml13 = "<font color=\"#CAD6FF\">免费等待至 </font>"
+ "<b><font color=\"#FFFFFF\"><big>" + DateTimeUtil.formatCalendarToString(currentCale, DateTimeUtil.TAXI_HH_mm) + "</big></b></font>";
} else {
strHtml13 = "<font color=\"#CAD6FF\">免费等待至</font>"
+ "<font color=\"#FFFFFF\"><big>" + DateTimeUtil.formatCalendarToString(currentCale, DateTimeUtil.TAXI_MM_dd_HH_mm) + "</big></font>";
}
mDistanceAndTime3.setText(Html.fromHtml(strHtml13));
if (TaxiOrderStatusEnum.ArriveAtStart.getCode() == order.orderStatus){
CallerLogger.INSTANCE.d(M_TAXI + TAG, "车辆已经达到起点");
mOrderStatus.setText(R.string.module_och_taxi_waiting);
mOrderServerStatus.setText(R.string.module_och_taxi_order_server_start_wait_check);
mOrderServerStatus.setTextColor(Color.parseColor("#4DFFFFFF"));
GradientDrawable background = (GradientDrawable) mOrderServerStatus.getBackground();//GradientDrawable是Drawable的子类
background.setColor(Color.parseColor("#4D1D5EF3"));
mOrderServerStatus.setClickable(false);
}else if (TaxiOrderStatusEnum.UserArriveAtStart.getCode() == order.orderStatus ){
CallerLogger.INSTANCE.d(M_TAXI + TAG, "乘客已上车验证成功");
mOrderStatus.setText(R.string.module_och_taxi_user_check_success);
mOrderServerStatus.setText(R.string.module_och_taxi_order_server_start);
GradientDrawable background = (GradientDrawable) mOrderServerStatus.getBackground();//GradientDrawable是Drawable的子类
background.setColor(Color.parseColor("#FF1D5EF3"));
mOrderServerStatus.setTextColor(Color.parseColor("#FFFFFF"));
mOrderServerStatus.setClickable(true);
}
}else if (TaxiOrderStatusEnum.ArriveAtStart.getCode() == order.orderStatus) {
mContentModule2.setVisibility(View.GONE);
mContentModule3.setVisibility(View.VISIBLE);
mArrivedStartTimeTv32.setVisibility(View.VISIBLE);
@@ -397,9 +448,14 @@ public class TaxiBeingServerdOrdersFragment extends BaseTaxiUIFragment implement
setOrRemoveMapMaker(false, TaxiConst.TAXI_END_MAP_MAKER,order.endSitePoint,R.raw.end_marker);
break;
case ArriveAtStart:
case UserArriveAtStart:
mTtsLessThan200Tip = 0;
mOrderCancel.setVisibility(View.VISIBLE);
showNotice(mActivity.getString(R.string.module_och_taxi_order_status_ph_text));
if (TaxiOrderStatusEnum.UserArriveAtStart.getCode() == ochStatus.getCode()){
showNotice(mActivity.getString(R.string.module_och_taxi_order_status_ph_text_check_success));
}else {
showNotice(mActivity.getString(R.string.module_och_taxi_order_status_ph_text));
}
showOrHideNavi(false);
setOrRemoveMapMaker(true, TaxiConst.TAXI_START_MAP_MAKER,order.startSitePoint,R.raw.star_marker);
setOrRemoveMapMaker(true, TaxiConst.TAXI_END_MAP_MAKER,order.endSitePoint,R.raw.end_marker);

View File

@@ -349,9 +349,11 @@ public class TaxiFragment extends BaseTaxiTabFragment<TaxiFragment, TaxiPresente
});
findViewById(R.id.test_bar_on_the_way_to_end).setOnClickListener(v -> {
showNotice("自动驾驶已启动,请系好安全带");
// TaxiModel.getInstance().setOnTheWayToEndStation();
//// testRouteInfoUpload();
restartAutopilot();
if (!isStarting){
mPresenter.startAutoPilot();
startOrStopLoadingAnim(true);
}
TaxiModel.getInstance().setOnTheWayToEndStation();
});
}

View File

@@ -3,12 +3,14 @@
<string name="module_och_taxi_arrive_at_start_station">确认上车,行程开始</string>
<string name="module_och_taxi_arrive_at_end_station">到达站点,乘客已下车</string>
<string name="module_och_taxi_order_status_ph_text">已到达上车站点,等待乘客上车</string>
<string name="module_och_taxi_order_status_ph_text_check_success">乘客验证成功,请开始行程</string>
<string name="module_och_taxi_order_distance_anchor_text">预计里程</string>
<string name="module_och_taxi_order_distance_text_ph">3.2 km</string>
<string name="module_och_taxi_order_complete">请携带好随身物品,注意侧后\n方来车感谢体验蘑菇智行自\n动驾驶车</string>
<string name="module_och_taxi_order_complete_1">即将到达目的地,请您携带好随身物品,安全下车。</string>
<string name="module_och_taxi_on_the_way_2_end_station">送乘客至目的地</string>
<string name="module_och_taxi_waiting">等待乘客上车</string>
<string name="module_och_taxi_user_check_success">乘客已上车</string>
<string name="module_och_taxi_new_order">前往乘客上车地点</string>
<string name="module_och_taxi_arrive_at_end_station2">已到达乘客下车点</string>
<string name="module_och_taxi_order_completed">订单已完成</string>
@@ -17,6 +19,7 @@
<string name="module_och_taxi_order_cancel_tip">出现异常情况时,可选择原因无责取消订单:</string>
<string name="module_och_taxi_order_cancel_commit">确认</string>
<string name="module_och_taxi_order_server_start">开始服务</string>
<string name="module_och_taxi_order_server_start_wait_check">等待乘客验证</string>
<string name="module_och_taxi_order_server_end">服务完成</string>
<string name="module_och_taxi_order_server_completed_tip">车辆已停稳,请携带好随身物品,下车请注意安全</string>
<string name="module_och_taxi_order_server_start_auto_tip">无人驾驶已启动,请您系好安全带</string>

View File

@@ -2,6 +2,7 @@ package com.mogo.eagle.core.function.hmi.ui.widget
import android.animation.ValueAnimator
import android.content.Context
import android.content.res.Resources
import android.content.res.TypedArray
import android.graphics.*
import android.util.AttributeSet
@@ -87,8 +88,6 @@ class CircularProgressView @JvmOverloads constructor(
Log.d(TAG, mRectL.toString() + "," + mRectT.toString())
Log.d(TAG, mRectF.toString() + "," + "width:" + measuredWidth.toString() + "," + "PaddingLeft:" + getPaddingLeft().toString())
}
override fun onDraw(canvas: Canvas?) {

View File

@@ -46,6 +46,7 @@ public class SteeringWheelView extends ConstraintLayout {
private TextView steeringTVR;
private TapPositionView tapPositionView;
private CircularProgressView steeringCircularV;
private CircularProgressView steeringCircularVAlpha;
private RotateAnimation rotateAnimation;
private float fromDegrees = 0;//方向盘旋转起始位置
@@ -77,6 +78,13 @@ public class SteeringWheelView extends ConstraintLayout {
steeringCircularV.setBackColor(R.color.hmi_light_blue_00);
steeringCircularV.setProgColor(R.color.hmi_light_blue, R.color.hmi_dark_blue);
steeringCircularV.setProgress((int) (180 * 100) / 360, 1000);
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)){
steeringCircularVAlpha = findViewById(R.id.steering_circular_alpha);
steeringCircularVAlpha.setAlpha(0.4f);
steeringCircularVAlpha.setBackColor(R.color.hmi_light_blue_00);
steeringCircularVAlpha.setProgColor(R.color.hmi_light_blue_alpha);
steeringCircularVAlpha.setProgress((int) (180 * 100) / 360, 1000);
}
}
public SteeringWheelView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {

View File

@@ -73,10 +73,23 @@
app:progWidth="8px"
app:progress="0" />
<!--状态条阴影-->
<com.mogo.eagle.core.function.hmi.ui.widget.CircularProgressView
android:id="@+id/steering_circular_alpha"
android:layout_width="@dimen/dp_274"
android:layout_height="@dimen/dp_274"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/dp_122"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:progWidth="22px"
app:progress="0" />
<ImageView
android:layout_width="@dimen/dp_40"
android:layout_height="@dimen/dp_40"
android:layout_width="@dimen/dp_60"
android:layout_height="@dimen/dp_60"
android:src="@drawable/icon_in_steering"
app:layout_constraintBottom_toBottomOf="@+id/autopilot_iv"
app:layout_constraintLeft_toLeftOf="@+id/autopilot_iv"

View File

@@ -57,4 +57,5 @@
<color name="hmi_light_blue">#45D3FF</color>
<color name="hmi_dark_blue">#1B5BFF</color>
<color name="hmi_light_blue_00">#0045D3FF</color>
<color name="hmi_light_blue_alpha">#666C79C4</color>
</resources>