[2.13.0-arch-opt] thread problm
This commit is contained in:
@@ -16,6 +16,7 @@ import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.Utils
|
||||
import kotlinx.android.synthetic.main.view_steering_brake.view.*
|
||||
|
||||
@@ -73,15 +74,17 @@ class SteeringBrakeView(context: Context, attrs: AttributeSet?) : ConstraintLayo
|
||||
//can数据转发 转向灯状态 0是正常 1是左转 2是右转
|
||||
if (lightSwitch != null) {
|
||||
CallerLogger.d("$M_HMI$TAG", "---lightSwitch.getNumber() = " + lightSwitch.number)
|
||||
if (lightSwitch.number == 1 || lightSwitch.number == 2) {
|
||||
isShowTurnLight = true
|
||||
brakeView.visibility = View.VISIBLE
|
||||
brakeView.setBrakeLight(0)
|
||||
} else {
|
||||
brakeView.visibility = View.GONE
|
||||
isShowTurnLight = false
|
||||
ThreadUtils.runOnUiThread {
|
||||
if (lightSwitch.number == 1 || lightSwitch.number == 2) {
|
||||
isShowTurnLight = true
|
||||
brakeView.visibility = View.VISIBLE
|
||||
brakeView.setBrakeLight(0)
|
||||
} else {
|
||||
brakeView.visibility = View.GONE
|
||||
isShowTurnLight = false
|
||||
}
|
||||
turnLightView.visibility = View.VISIBLE
|
||||
}
|
||||
turnLightView.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user