Merge branch 'dev_robotaxi-d-app-module_2100_220816_2.10.0' into 'test_robotaxi-d-app-module_2100_220816_2.10.0.1'
Dev robotaxi d app module 2100 220816 2.10.0 See merge request zhjt/AndroidApp/MoGoEagleEye!177
This commit is contained in:
@@ -470,6 +470,7 @@ public class TaxiBeingServerdOrdersFragment extends BaseTaxiUIFragment implement
|
||||
showOrHideNavi(false);
|
||||
setOrRemoveMapMaker(false, TaxiConst.TAXI_START_MAP_MAKER,order.startSitePoint,R.raw.star_marker);
|
||||
setOrRemoveMapMaker(false, TaxiConst.TAXI_END_MAP_MAKER,order.endSitePoint,R.raw.end_marker);
|
||||
clearSmallMapRouteLine();
|
||||
break;
|
||||
case JourneyCompleted:
|
||||
mCurrentOrder = null;
|
||||
@@ -497,6 +498,7 @@ public class TaxiBeingServerdOrdersFragment extends BaseTaxiUIFragment implement
|
||||
mNoDataView.setVisibility(View.GONE);
|
||||
mBeingOrderLayout.setVisibility(View.VISIBLE);
|
||||
mTaxiFragment.changeOperationViewVisible(View.GONE);
|
||||
clearSmallMapRouteLine();
|
||||
} else {
|
||||
mNoDataView.setVisibility(View.VISIBLE);
|
||||
mNoDatasTv.setText("暂无进行中订单");
|
||||
|
||||
@@ -15,6 +15,8 @@ import androidx.core.widget.addTextChangedListener
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.fragment.app.FragmentManager
|
||||
import androidx.fragment.app.FragmentTransaction
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.commons.mvp.MvpDialogFragment
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
@@ -22,6 +24,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.util.BarUtils
|
||||
import com.mogo.eagle.core.utilcode.util.KeyboardUtils
|
||||
import com.mogo.och.taxi.R
|
||||
import com.mogo.och.taxi.constant.TaxiConst
|
||||
import com.mogo.och.taxi.presenter.TaxiLoginPresenter
|
||||
|
||||
|
||||
@@ -35,6 +38,7 @@ class TaxiLoginDialogFragment : MvpDialogFragment<TaxiLoginDialogFragment?, Taxi
|
||||
lateinit var clMain: ConstraintLayout
|
||||
lateinit var acbtnLogin: AppCompatButton
|
||||
lateinit var actvLoginGetCode: AppCompatTextView
|
||||
lateinit var actvLoginShowSn: AppCompatTextView
|
||||
lateinit var aceLoginPhoneValue: AppCompatEditText
|
||||
lateinit var acetPhoneCodeValue: AppCompatEditText
|
||||
lateinit var actvWelcomeLoginTitle: AppCompatTextView
|
||||
@@ -66,6 +70,7 @@ class TaxiLoginDialogFragment : MvpDialogFragment<TaxiLoginDialogFragment?, Taxi
|
||||
aceLoginPhoneValue = mRootView.findViewById(R.id.ace_login_phone_value)
|
||||
acetPhoneCodeValue = mRootView.findViewById(R.id.acet_phone_code_value)
|
||||
actvWelcomeLoginTitle = mRootView.findViewById(R.id.actv_welcome_login_title)
|
||||
actvLoginShowSn = mRootView.findViewById(R.id.actv_login_show_sn)
|
||||
inputPhoneNormal()
|
||||
initListener()
|
||||
dialog?.window?.let {
|
||||
@@ -125,6 +130,7 @@ class TaxiLoginDialogFragment : MvpDialogFragment<TaxiLoginDialogFragment?, Taxi
|
||||
}
|
||||
}
|
||||
}
|
||||
actvLoginShowSn.text = MoGoAiCloudClientConfig.getInstance().sn
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -115,5 +115,16 @@
|
||||
android:layout_width="760px"
|
||||
android:layout_height="136px"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_login_show_sn"
|
||||
android:textSize="@dimen/dp_30"
|
||||
android:textColor="@android:color/white"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginEnd="@dimen/dp_50"
|
||||
android:layout_marginBottom="@dimen/dp_40"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -379,7 +379,7 @@ class MoGoAutopilotProvider :
|
||||
override fun setDemoMode(isEnable: Boolean) {
|
||||
// 同步给乘客端
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
var byteArray = if (isEnable) byteArrayOf(1) else byteArrayOf(0)
|
||||
val byteArray = "${FunctionBuildConfig.isDemoMode},${FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData}".toByteArray()
|
||||
if (NSDNettyManager.getInstance().isServerStart) {
|
||||
NSDNettyManager.getInstance()
|
||||
.sendMsgToAllClients(
|
||||
|
||||
@@ -56,11 +56,15 @@ class TeleMsgHandler : IMsgHandler {
|
||||
}
|
||||
}
|
||||
MogoProtocolMsg.SYNC_MODE_STATUS -> {
|
||||
FunctionBuildConfig.isDemoMode = when (it.body[0].toInt()) {
|
||||
1 -> true
|
||||
else -> false
|
||||
val demoModeAndTrajectoryString = String(it.body)
|
||||
invokeNettyConnResult("乘客屏收到的美化模式状态为:${demoModeAndTrajectoryString}")
|
||||
if (demoModeAndTrajectoryString.contains(",")) {
|
||||
val strArray = demoModeAndTrajectoryString.split(",")
|
||||
if (strArray.size == 2) {
|
||||
FunctionBuildConfig.isDemoMode = (strArray[0] == "true")
|
||||
FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = (strArray[1] == "true")
|
||||
}
|
||||
}
|
||||
setDemoMode(FunctionBuildConfig.isDemoMode)
|
||||
}
|
||||
MogoProtocolMsg.REQ_MAC_ADDRESS -> {
|
||||
val carConfig = MessagePad.CarConfigResp.parseFrom(msg.body)
|
||||
@@ -140,8 +144,7 @@ class TeleMsgHandler : IMsgHandler {
|
||||
override fun handleClientConn2Server(channel: Channel?) {
|
||||
val socketAddress = channel?.remoteAddress().toString()
|
||||
CallerLogger.d("${SceneConstant.M_ADAS_IMPL}$TAG", "Client ip is:${socketAddress}")
|
||||
val byteArray =
|
||||
if (FunctionBuildConfig.isDemoMode) byteArrayOf(1) else byteArrayOf(0)
|
||||
val byteArray = "${FunctionBuildConfig.isDemoMode},${FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData}".toByteArray()
|
||||
NSDNettyManager.getInstance().sendMsgToSpecifiedClient(
|
||||
MogoProtocolMsg(
|
||||
MogoProtocolMsg.SYNC_MODE_STATUS,
|
||||
|
||||
@@ -230,18 +230,13 @@ class TracingStatus(var state: Tracing = UNKNOWN): Status() {
|
||||
override fun isException(): Boolean = state.isException()
|
||||
}
|
||||
|
||||
fun String.toState(): Tracing? {
|
||||
val ss = split("|")
|
||||
var code = ""
|
||||
if (ss.isNotEmpty()) {
|
||||
code = ss[0]
|
||||
}
|
||||
fun String.toState(msg: String?): Tracing? {
|
||||
val ss = msg?.split("|")
|
||||
var extra: Map<String, String>? = null
|
||||
if (ss.size > 1) {
|
||||
|
||||
if (ss != null && ss.isNotEmpty()) {
|
||||
val sb = StringBuilder()
|
||||
for (i in 1 until ss.size) {
|
||||
sb.append(ss[i])
|
||||
for (element in ss) {
|
||||
sb.append(element)
|
||||
sb.append(",")
|
||||
}
|
||||
if (sb.isNotEmpty()) {
|
||||
@@ -249,7 +244,7 @@ fun String.toState(): Tracing? {
|
||||
}
|
||||
extra = mutableMapOf("extra" to sb.toString())
|
||||
}
|
||||
return when(code) {
|
||||
return when(this) {
|
||||
"IMAP_TRA_EXIST" -> TRACK_FINDED.apply {
|
||||
this.extra = extra
|
||||
}
|
||||
|
||||
@@ -21,7 +21,8 @@ internal class TracingImpl(ctx: Context): IFlow<TracingStatus>(ctx), IMoGoAutopi
|
||||
|
||||
override fun onCreate() {
|
||||
val code = CallerAutoPilotStatusListenerManager.getAutoPilotReportMessageCode()
|
||||
val state = code.toState() ?: UNKNOWN
|
||||
val msg = CallerAutoPilotStatusListenerManager.getAutoPilotReportMessageContent()
|
||||
val state = code.toState(msg) ?: UNKNOWN
|
||||
old = state
|
||||
send(TracingStatus(state))
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
@@ -31,7 +32,7 @@ internal class TracingImpl(ctx: Context): IFlow<TracingStatus>(ctx), IMoGoAutopi
|
||||
override fun onAutopilotGuardian(guardianInfo: MogoReportMessage?) {
|
||||
super.onAutopilotGuardian(guardianInfo)
|
||||
val current = guardianInfo?.code
|
||||
val newState = current?.toState()
|
||||
val newState = current?.toState(guardianInfo.msg)
|
||||
if (newState != null && newState != old) {
|
||||
send(TracingStatus(newState))
|
||||
old = newState
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import android.util.*
|
||||
import androidx.annotation.Nullable
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.mogo.eagle.core.utilcode.kotlin.*
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.*
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo_msg.MogoReportMsg
|
||||
@@ -29,6 +31,10 @@ object CallerAutoPilotStatusListenerManager : CallerBase() {
|
||||
@Volatile
|
||||
private var autoPilotMessageCode: String = ""
|
||||
|
||||
|
||||
@Volatile
|
||||
private var autoPilotMessageContent: String = ""
|
||||
|
||||
/**
|
||||
* 查询AutoPilot状态
|
||||
*/
|
||||
@@ -45,6 +51,8 @@ object CallerAutoPilotStatusListenerManager : CallerBase() {
|
||||
|
||||
fun getAutoPilotReportMessageCode(): String = autoPilotMessageCode
|
||||
|
||||
fun getAutoPilotReportMessageContent(): String = autoPilotMessageContent
|
||||
|
||||
/**
|
||||
* 通过Gnss定位更新来同步更新自动驾驶状态
|
||||
*/
|
||||
@@ -171,6 +179,8 @@ object CallerAutoPilotStatusListenerManager : CallerBase() {
|
||||
M_AUTOPILOT_STATUS_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
autoPilotMessageCode = guardianInfo?.code ?: ""
|
||||
autoPilotMessageContent = guardianInfo?.msg ?: ""
|
||||
Logger.d("XXXXX", "code: ${guardianInfo?.code}, msg: ${guardianInfo?.msg}")
|
||||
listener.onAutopilotGuardian(guardianInfo)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user