[m1]
[时间过滤]
This commit is contained in:
@@ -16,6 +16,7 @@ import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
|
||||
import com.mogo.eagle.core.utilcode.kotlin.*
|
||||
import com.mogo.eagle.core.utilcode.util.ClickUtils
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import kotlinx.android.synthetic.m2.p_m2_view_status_bar.view.*
|
||||
import kotlinx.coroutines.*
|
||||
@@ -84,6 +85,9 @@ class M2StatusBarView @JvmOverloads constructor(
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun onBatteryManagementSystemStates(states: ChassisStatesOuterClass.BMSSystemStates) {
|
||||
if (ClickUtils.isClickTooFrequent(this,1000)) {
|
||||
return
|
||||
}
|
||||
val bmsSoc = states.bmsSoc
|
||||
try {
|
||||
if (oldBmsSoc != bmsSoc ) {
|
||||
|
||||
@@ -17,6 +17,7 @@ import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.DemoModeView
|
||||
import com.mogo.eagle.core.utilcode.util.ClickUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import kotlinx.android.synthetic.m1.m1_statusview_datetime.view.*
|
||||
@@ -83,6 +84,9 @@ class StatusBarView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
override fun onBatteryManagementSystemStates(states: ChassisStatesOuterClass.BMSSystemStates) {
|
||||
if (ClickUtils.isClickTooFrequent(this,1000)) {
|
||||
return
|
||||
}
|
||||
UiThreadHandler.post {
|
||||
val bmsSoc = states.bmsSoc
|
||||
progress.progress = bmsSoc.toInt()
|
||||
|
||||
Reference in New Issue
Block a user