Merge branch 'dev_robotaxi-d_241112_6.8.0' of gitlab.zhidaoauto.com:SCA/L4HA/AndroidApp/MoGoEagleEye into dev_robotaxi-d_241112_6.8.0
This commit is contained in:
@@ -21,7 +21,7 @@ import com.zhjt.mogo_core_function_devatools.status.entity.DoubleFlashStatus
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.FSMStateCode
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.FSMStatus
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.GearStatus
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.IAutopilotPreLaunchStatus
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.IAutopilotBeforeLaunchStatus
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.Status
|
||||
import com.zhjt.mogo_core_function_devatools.status.entity.SteerStatus
|
||||
import kotlinx.android.synthetic.main.view_start_autopilot_status.view.fSMStatusLayout
|
||||
@@ -250,7 +250,7 @@ class StartAutoPilotStatusView @JvmOverloads constructor(
|
||||
* @param all: 所有状态数据
|
||||
*/
|
||||
override fun onStatusChanged(changed: List<Status>, all: List<Status>) {
|
||||
changed.filter { it is IAutopilotPreLaunchStatus }.forEach { status ->
|
||||
changed.filter { it is IAutopilotBeforeLaunchStatus }.forEach { status ->
|
||||
Logger.d(TAG, "onStatusChanged --> ${status::class.simpleName}")
|
||||
when (status) {
|
||||
is FSMStatus -> {
|
||||
|
||||
@@ -7,6 +7,12 @@ import android.view.Gravity
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.ViewStub
|
||||
import android.view.WindowManager
|
||||
import android.view.animation.AccelerateDecelerateInterpolator
|
||||
import android.widget.FrameLayout
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.doOnAttach
|
||||
import androidx.lifecycle.ProcessLifecycleOwner
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.transition.Slide
|
||||
@@ -61,6 +67,7 @@ import com.mogo.eagle.core.function.hmi.ui.widget.StatusBarView
|
||||
import com.mogo.eagle.core.function.hmi.xiaozhi.XiaoZhiStateManager
|
||||
import com.mogo.eagle.core.utilcode.floating.MoGoPopWindow
|
||||
import com.mogo.eagle.core.utilcode.kotlin.safeCancel
|
||||
import com.mogo.eagle.core.utilcode.kotlin.scope
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
@@ -107,6 +114,11 @@ class MoGoHmiProvider : IMoGoHmiProvider {
|
||||
*/
|
||||
private val popOfVisualAngleAdjust by lazy { AtomicReference<WeakReference<MoGoPopWindow>>() }
|
||||
|
||||
/**
|
||||
* fsm异常触发异常停车弹窗
|
||||
*/
|
||||
private val popOfSafetyStopCar by lazy { AtomicReference<WeakReference<MoGoPopWindow>>() }
|
||||
|
||||
override fun init(context: Context?) {
|
||||
this.context = context
|
||||
}
|
||||
@@ -599,4 +611,39 @@ class MoGoHmiProvider : IMoGoHmiProvider {
|
||||
}
|
||||
}
|
||||
|
||||
override fun toggleSafeStopCarWarning(show: Boolean) {
|
||||
val activity = AppStateManager.currentActivity() ?: return
|
||||
val old = popOfSafetyStopCar.get()?.get()
|
||||
if (show) {
|
||||
if (old != null && old.isShowing()) {
|
||||
return
|
||||
}
|
||||
val content = FrameLayout(activity)
|
||||
ViewCompat.setBackground(content, ContextCompat.getDrawable(activity, R.drawable.fg_fsm_exception_status))
|
||||
content.scope.launch {
|
||||
while (true) {
|
||||
content.animate().setInterpolator(AccelerateDecelerateInterpolator()).alpha(0f).setDuration(500).start()
|
||||
delay(500)
|
||||
content.animate().setInterpolator(AccelerateDecelerateInterpolator()).alpha(1.0f).setDuration(500).start()
|
||||
delay(500)
|
||||
}
|
||||
}
|
||||
MoGoPopWindow.Builder()
|
||||
.attachToActivity(activity)
|
||||
.width(WindowManager.LayoutParams.MATCH_PARENT)
|
||||
.height(WindowManager.LayoutParams.MATCH_PARENT)
|
||||
.contentView(content)
|
||||
.onDismissed {
|
||||
popOfSafetyStopCar.set(null)
|
||||
}
|
||||
.build()
|
||||
.also {
|
||||
popOfSafetyStopCar.set(WeakReference(it))
|
||||
it.show()
|
||||
}
|
||||
} else {
|
||||
old?.takeIf { it.isShowing() }?.also { it.hide() }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 156 KiB |
Reference in New Issue
Block a user