Merge branch 'dev_robotaxi-d_250417_8.1.0_yyk' into dev_robotaxi-d_250603_8.1.0

This commit is contained in:
yangyakun
2025-06-03 11:13:34 +08:00
153 changed files with 128 additions and 125 deletions

View File

@@ -48,13 +48,13 @@ android {
main {
res.srcDirs = [
'src/main/res',
'src/main/res/m2',
'src/main/res/jinlv',
'src/main/res/b2',
'src/main/res/b1',
]
java.srcDirs = [
'src/main/java',
'src/main/java/m2',
'src/main/java/jinlv',
'src/main/java/b2',
'src/main/java/b1',
]
}
}

View File

@@ -2,15 +2,12 @@ package com.mogo.och.shuttle.weaknet.passenger.ui.widget
import android.annotation.*
import android.content.Context
import android.graphics.Color
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.constraintlayout.widget.ConstraintLayout
import chassis.ChassisStatesOuterClass
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisStatesListener
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener
import com.mogo.eagle.core.function.call.autopilot.CallerChassisStatesListenerManager
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
@@ -20,10 +17,9 @@ import com.mogo.eagle.core.utilcode.util.ClickUtils
import com.mogo.eagle.core.utilcode.util.ThreadUtils
import com.mogo.och.common.module.manager.bluetooth.BleManager
import com.mogo.och.common.module.manager.loop.BizLoopManager
import com.mogo.och.common.module.utils.ResourcesUtils
import com.mogo.och.shuttle.weaknet.passenger.R
import kotlinx.android.synthetic.main.shuttle_p_m2_view_status_bar.view.aciv_wait_ele
import kotlinx.android.synthetic.main.shuttle_p_m2_view_status_bar.view.iv_logon
import kotlinx.android.synthetic.main.shuttle_p_m2_view_status_bar.view.progress
import kotlinx.android.synthetic.main.shuttle_p_m2_view_status_bar.view.tv_power_cos
import kotlinx.coroutines.*
import me.jessyan.autosize.utils.AutoSizeUtils
@@ -34,7 +30,7 @@ import me.jessyan.autosize.utils.AutoSizeUtils
*/
class M2StatusBarView @JvmOverloads constructor(
context: Context, attrs: AttributeSet? = null
) : ConstraintLayout(context, attrs), IViewControlListener, IMoGoSkinModeChangeListener,
) : ConstraintLayout(context, attrs),
IMoGoChassisStatesListener {
companion object {
@@ -46,7 +42,7 @@ class M2StatusBarView @JvmOverloads constructor(
init {
LayoutInflater.from(context).inflate(R.layout.shuttle_p_m2_view_status_bar, this, true)
setBackgroundColor(Color.parseColor("#80FFFFFF"))
setBackgroundColor(ResourcesUtils.getColor(R.color.white))
isClickable = true
isFocusable = true
}
@@ -55,24 +51,18 @@ class M2StatusBarView @JvmOverloads constructor(
@SuppressLint("ClickableViewAccessibility")
override fun onAttachedToWindow() {
super.onAttachedToWindow()
post {
val params: ViewGroup.LayoutParams = getLayoutParams()
params.height = AutoSizeUtils.dp2px(context,60f)
params.height = AutoSizeUtils.dp2px(context,100f)
layoutParams = params
}
//添加view控制
CallerHmiViewControlListenerManager.addListener(TAG,this)
// 添加换肤监听
CallerSkinModeListenerManager.addListener(TAG, this)
//电量
CallerChassisStatesListenerManager.addListener(TAG,this)
progress?.also {
it.progress = 0
aciv_wait_ele.visibility = VISIBLE
}
tv_power_cos?.also {
it.text = "检测中"
it.text = "?"
}
iv_logon.onClick {
BizLoopManager.runInMainThread{
@@ -86,13 +76,6 @@ class M2StatusBarView @JvmOverloads constructor(
}
}
override fun onSkinModeChange(skinMode: Int) {
when (skinMode) {
0 -> setStatusBarDarkOrLight(false)
1 -> setStatusBarDarkOrLight(true)
}
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
CallerHmiViewControlListenerManager.removeListener(TAG)
@@ -112,14 +95,11 @@ class M2StatusBarView @JvmOverloads constructor(
if (oldBmsSoc != bmsSoc ) {
scope.launch {
if(bmsSoc >1){
progress?.also { it.progress = bmsSoc.toInt() }
tv_power_cos?.also { it.text = "${bmsSoc.toInt()}%" }
}else{
val power = (bmsSoc * 100).toInt()
progress?.also { it.progress = power }
tv_power_cos?.also {it.text = "$power%" }
}
aciv_wait_ele.visibility = GONE
}
}
} finally {

View File

Before

Width:  |  Height:  |  Size: 765 B

After

Width:  |  Height:  |  Size: 765 B

View File

Before

Width:  |  Height:  |  Size: 797 B

After

Width:  |  Height:  |  Size: 797 B

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 828 B

Some files were not shown because too many files have changed in this diff Show More