[2.11.0/1.6.0] 1、bus司机端点击开启自动驾驶去除语音 2、bus司机端路线面板优化 3、taxi司机端文字:安全模式

This commit is contained in:
wangmingjun
2022-09-27 19:49:58 +08:00
parent 0a34234f8b
commit bcfc108b49
5 changed files with 34 additions and 22 deletions

View File

@@ -241,7 +241,8 @@ public class BusFragment extends BaseBusTabFragment<BusFragment, BusPresenter>
secondStationItem.setVisibility(View.VISIBLE);
thirdStationItem.showOrHideStationArrowBg(false);
if (arrivingOrArrivedIndex == 0 || arrivingOrArrivedIndex -1 == 0){
if (arrivingOrArrivedIndex == 0 || arrivingOrArrivedIndex -1 == 0
|| (arrivingOrArrivedIndex -2 == 0 && stationList.size() == 3)){
firstStationItem.setStationTag(getResources().getString(R.string.bus_station_txt_tag_start));
}else {
firstStationItem.setStationTag("");

View File

@@ -643,10 +643,10 @@ public class BusOrderModel {
isArrivedStation = false;
CallerLogger.INSTANCE.d( M_BUS + TAG, "自动驾驶开启开往下一站====" );
//需要更改当前站和下一站的状态 然后渲染
leaveStationSuccess(isRestart);
queryBusRoutes();
startOrStopQueryPassengerWriteOff(false);
leaveStationSuccess(isRestart);
leaveTTSTips(finalNextStationName);
queryBusRoutes();
}
@Override
public void onFail(String failMsg) {
@@ -733,7 +733,9 @@ public class BusOrderModel {
}
}
if (backgroundCurrentStationIndex == 0 && stationList.get(0).getDrivingStatus() == STATION_STATUS_STOPPED){ //默认是第一站到站查询
if (backgroundCurrentStationIndex == 0 &&
stationList.get(0).getDrivingStatus() == STATION_STATUS_STOPPED
&& !stationList.get(0).isLeaving()){ //默认是第一站到站查询
startOrStopQueryPassengerWriteOff(true);
}
@@ -782,7 +784,9 @@ public class BusOrderModel {
*/
public void restartAutopilot() {
CallerLogger.INSTANCE.d( M_BUS + TAG, "重启自动驾驶===" + isGoingToNextStation );
autoDriveToNextStation(true);
//只去启动自动驾驶,不再去上报离站
startAutopilot(true);
// autoDriveToNextStation(true);
}
/**

View File

@@ -5,6 +5,8 @@ import android.util.AttributeSet
import android.view.LayoutInflater
import android.widget.ImageView
import android.widget.LinearLayout
import androidx.core.content.ContextCompat
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.mogo.och.bus.R
import com.mogo.och.common.module.utils.BlinkAnimationUtil
import kotlinx.android.synthetic.main.bus_stations_common_item.view.*
@@ -33,21 +35,25 @@ class BusStationCommonItem @JvmOverloads constructor(
fun setStationPointBg(type: Int){ // 0:灰色 过站 1绿色 到站或者即将到站 2蓝色未到站
BlinkAnimationUtil.clearAnimation(busCircleIv)
UiThreadHandler.post(Runnable {
BlinkAnimationUtil.clearAnimation(busCircleIv)
when(type){
0 -> {
busCircleIv.setImageResource(R.drawable.icon_point_grey_bus)
}
1 -> {
busCircleIv.setImageResource(R.drawable.icon_point_green_bus)
when(type){
0 -> {
busCircleIv.setImageDrawable(null)
busCircleIv.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_point_grey_bus))
}
1 -> {
busCircleIv.setImageDrawable(null)
busCircleIv.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_point_green_bus))
BlinkAnimationUtil.setAnimation(busCircleIv)
}
2 -> {
busCircleIv.setImageResource(R.drawable.icon_point_blue_bus)
}
}
}
2 -> {
busCircleIv.setImageDrawable(null)
busCircleIv.setImageDrawable(ContextCompat.getDrawable(context,R.drawable.icon_point_blue_bus))
}
}
})
}
fun getCircleImageView() : ImageView{

View File

@@ -3,6 +3,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto">
<TextView
android:id="@+id/busStationNameTv"
android:layout_width="0dp"
@@ -22,18 +23,19 @@
app:layout_constraintTop_toTopOf="parent"/>
<ImageView
android:id="@+id/busCircleIv_bg"
android:id="@+id/busCircleIvBg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/icon_point_grey_bus"
android:layout_marginTop="@dimen/dp_4"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="@+id/busStationNameTv"/>
<ImageView
android:id="@+id/busCircleIv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/icon_point_blue_bus"
android:background="@drawable/icon_point_blue_bus"
android:layout_marginTop="@dimen/dp_4"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="@+id/busStationNameTv"/>
@@ -54,7 +56,6 @@
android:layout_height="wrap_content"
android:textSize="@dimen/bus_station_tag_txt_size"
android:textColor="@color/bus_station_tag_txt_un_color"
android:text="@string/bus_station_txt_tag_start"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@+id/busCircleIv"
app:layout_constraintBottom_toBottomOf="@+id/busCircleIv"/>

View File

@@ -20,7 +20,7 @@
<string name="module_och_taxi_order_cancel_commit">确认</string>
<string name="module_och_taxi_order_server_start">开始服务</string>
<string name="och_taxi_auto_txt">自驾模式</string>
<string name="och_taxi_manual_txt">人工模式</string>
<string name="och_taxi_manual_txt">安全模式</string>
<string name="module_och_taxi_order_server_start_wait_check">跳过乘客验证</string>
<string name="module_och_taxi_order_server_wait_passenger_start">等待乘客开始行程</string>
<string name="module_och_taxi_order_choose_start_autopilot_tip">请等待乘客启动自动驾驶,或您自行启动</string>