Merge branch 'dev_robotaxi-d-app-module_280_220608_2.8.0' of gitlab.zhidaoauto.com:zhjt/AndroidApp/MoGoEagleEye into dev_robotaxi-d-app-module_280_220608_2.8.0
This commit is contained in:
@@ -500,15 +500,20 @@ public class TaxiBeingServerdOrdersFragment extends BaseTaxiUIFragment implement
|
||||
*/
|
||||
public void isHaveBeingOrder(boolean being) {
|
||||
CallerLogger.INSTANCE.d(M_TAXI + TAG, "isHaveBeingOrder = " + being);
|
||||
if (being) {
|
||||
mNoDataView.setVisibility(View.GONE);
|
||||
mBeingOrderLayout.setVisibility(View.VISIBLE);
|
||||
mTaxiFragment.changeOperationViewVisible(View.GONE);
|
||||
} else {
|
||||
mNoDataView.setVisibility(View.VISIBLE);
|
||||
mNoDatasTv.setText("暂无进行中订单");
|
||||
mBeingOrderLayout.setVisibility(View.GONE);
|
||||
mTaxiFragment.changeOperationViewVisible(View.VISIBLE);
|
||||
try {
|
||||
if (being) {
|
||||
mNoDataView.setVisibility(View.GONE);
|
||||
mBeingOrderLayout.setVisibility(View.VISIBLE);
|
||||
mTaxiFragment.changeOperationViewVisible(View.GONE);
|
||||
} else {
|
||||
mNoDataView.setVisibility(View.VISIBLE);
|
||||
mNoDatasTv.setText("暂无进行中订单");
|
||||
mBeingOrderLayout.setVisibility(View.GONE);
|
||||
mTaxiFragment.changeOperationViewVisible(View.VISIBLE);
|
||||
}
|
||||
|
||||
}catch (NullPointerException e){ //可能会出现订单信息已经轮询回来,但进行中页面控件还未初始化完成的情况
|
||||
TaxiModel.getInstance().clearCurrentOCHOrder();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ internal class NetsImpl(ctx: Context): IFlow<NetStatus>(ctx) {
|
||||
private fun checkAndSend() {
|
||||
val connectionInfo = wifiMgr.connectionInfo
|
||||
val enabled = isNetConnected()
|
||||
val name = if (isLocationEnabled()) connectionInfo.ssid?.replace(Regex("[\\W]"), "") else "Wi-Fi"
|
||||
val name = if (isLocationEnabled()) connectionInfo.ssid?.replace(Regex("[\\W]"), "") else "WI-FI"
|
||||
loopCheckAndSendJob?.safeCancel()
|
||||
launch(Dispatchers.Default) { delay(1000); checkAndSend() }.also { loopCheckAndSendJob = it }
|
||||
var tr = 0
|
||||
|
||||
@@ -5,7 +5,6 @@ import android.content.*
|
||||
import android.graphics.*
|
||||
import android.graphics.drawable.*
|
||||
import android.transition.*
|
||||
import android.util.*
|
||||
import android.view.*
|
||||
import androidx.appcompat.widget.*
|
||||
import androidx.constraintlayout.widget.*
|
||||
@@ -80,8 +79,6 @@ internal class StatusView(private val model: StatusModel, ctx: Context): Constra
|
||||
dot.visibility = View.INVISIBLE
|
||||
}
|
||||
val old = adapter.data
|
||||
Log.d(TAG, "receive update --new - data: ${data.second.joinToString(",")}")
|
||||
Log.d(TAG, "receive update --old - data: ${old.joinToString(",")}")
|
||||
val result = DiffUtil.calculateDiff(StatusDiffCallback(old, data.second))
|
||||
adapter.data = data.second
|
||||
result.dispatchUpdatesTo(adapter)
|
||||
|
||||
@@ -50,15 +50,15 @@ internal class StatusAdapter(val ctx: Context, var data: ArrayList<Status>): Rec
|
||||
} else {
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_can_disable)
|
||||
}
|
||||
tv.text = "Can"
|
||||
tv.text = "CAN"
|
||||
}
|
||||
is NetStatus -> {
|
||||
if (status.enabled) {
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_net_enable)
|
||||
tv.text = status.name ?: "Wi-Fi"
|
||||
tv.text = status.name ?: "WI-FI"
|
||||
} else {
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_net_disable)
|
||||
tv.text = "Wi-Fi"
|
||||
tv.text = "WI-FI"
|
||||
}
|
||||
}
|
||||
is GpsStatus -> {
|
||||
@@ -67,7 +67,7 @@ internal class StatusAdapter(val ctx: Context, var data: ArrayList<Status>): Rec
|
||||
} else {
|
||||
iv.background = ContextCompat.getDrawable(itemView.context, drawable.icon_dev_status_gps_disable)
|
||||
}
|
||||
tv.text = "Gps"
|
||||
tv.text = "GPS"
|
||||
}
|
||||
is TracingStatus -> {
|
||||
when(status.state) {
|
||||
|
||||
@@ -78,11 +78,11 @@ public class SteeringWheelView extends ConstraintLayout {
|
||||
steeringCircularV = findViewById(R.id.steering_circular);
|
||||
steeringCircularV.setBackWidth(8);
|
||||
steeringCircularV.setBackColor(R.color.hmi_light_back_bg);
|
||||
steeringCircularV.setProgress((int) (270 * 100) / 360, 20);
|
||||
steeringCircularV.setProgress((int) (0 * 100) / 360, 20);
|
||||
steeringCircularV.setProgColor(R.color.hmi_light_blue, R.color.hmi_dark_blue);
|
||||
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
|
||||
steeringCircularVAlpha = findViewById(R.id.steering_circular_alpha);
|
||||
steeringCircularVAlpha.setProgress((int) (270 * 100) / 360, 20);
|
||||
steeringCircularVAlpha.setProgress((int) (0 * 100) / 360, 20);
|
||||
steeringCircularV.setProgColor(R.color.hmi_dark_blue, R.color.hmi_light_blue);
|
||||
steeringCircularVAlpha.setBackWidth(8);
|
||||
steeringCircularVAlpha.setBackColor(R.color.hmi_clear_00);
|
||||
|
||||
@@ -6,16 +6,18 @@ import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.widget.LinearLayout
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.AppUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import kotlinx.android.synthetic.main.view_version_name.view.*
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description APP版本号+MAP版本号水印显示
|
||||
* @description APP版本号+MAP版本号水印显示(只在司机屏展示)
|
||||
* @since: 2022/5/20
|
||||
*/
|
||||
class VersionNameView @JvmOverloads constructor(
|
||||
@@ -36,8 +38,11 @@ class VersionNameView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
private fun initView(){
|
||||
showCurrentPadVersion()
|
||||
showCurrentMapVersion()
|
||||
//版本水印只在司机端展示
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
showCurrentPadVersion()
|
||||
showCurrentMapVersion()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -66,12 +71,18 @@ class VersionNameView @JvmOverloads constructor(
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
//版本水印只在司机端展示
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
//版本水印只在司机端展示
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
android:layout_marginTop="@dimen/dp_130"
|
||||
android:layout_marginRight="-10px"
|
||||
android:gravity="right"
|
||||
android:text="180°"
|
||||
android:text="0°"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="@dimen/dp_37"
|
||||
android:visibility="invisible"
|
||||
@@ -38,7 +38,7 @@
|
||||
android:layout_marginLeft="-10px"
|
||||
android:layout_marginTop="@dimen/dp_130"
|
||||
android:gravity="left"
|
||||
android:text="180°"
|
||||
android:text="0°"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="@dimen/dp_37"
|
||||
app:layout_constraintLeft_toRightOf="@+id/autopilot_iv"
|
||||
|
||||
Reference in New Issue
Block a user