diff --git a/OCH/mogo-och-bus-passenger/build.gradle b/OCH/mogo-och-bus-passenger/build.gradle
index 24b4c2d2ec..108b34a4f2 100644
--- a/OCH/mogo-och-bus-passenger/build.gradle
+++ b/OCH/mogo-och-bus-passenger/build.gradle
@@ -77,6 +77,7 @@ dependencies {
compileOnly project(":libraries:mogo-map")
compileOnly project(':libraries:mogo-adas')
implementation project(':core:mogo-core-res')
+ testImplementation 'junit:junit:4.12'
}
diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionDevicePresenter.kt b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionDevicePresenter.kt
index cc337dddd0..b47050a2a1 100644
--- a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionDevicePresenter.kt
+++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionDevicePresenter.kt
@@ -99,7 +99,7 @@ class BusPassengerFunctionDevicePresenter(view: BusPassengerFunctionDeviceFragme
}
private fun canOpenOrCloseDoor():String?{
- if(gnssSpeed==0.0){
+ if(gnssSpeed<0.01){
return null
}else{
return "速度:${gnssSpeed}车辆正在运行、请稍后再试"
diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.kt b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.kt
index abd1f67289..a427e4c74f 100644
--- a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.kt
+++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.kt
@@ -52,6 +52,9 @@ class BusPassengerRouteFragment :
v_debug.setOnLongClickListener {
ToggleDebugView.toggleDebugView.toggle(requireContext())
true
+ }
+ viewBusPM1MsgBoxButton.onClick {
+
}
viewBusPM1MsgBoxButton.setClickListener(object : MMsgBoxButtonView.ClickListener {
override fun showMsgBoxList(show: Boolean) {
@@ -70,28 +73,22 @@ class BusPassengerRouteFragment :
}
private fun openSettingPage(tab: String) {
-
- CallerHmiManager.hideToolsView()
- val fragmentByTag: Fragment? =
- childFragmentManager.findFragmentByTag(BusPassengerFunctionFragment.TAG)
+ val fragmentByTag: Fragment? = childFragmentManager.findFragmentByTag(BusPassengerFunctionFragment.TAG)
if (fragmentByTag is DialogFragment) {
if (fragmentByTag.dialog != null && fragmentByTag.dialog!!.isShowing) {
+ CallerLogger.d(SceneConstant.M_BUS_P + TAG, "正在展示")
return
}
if (fragmentByTag.dialog != null && fragmentByTag.isAdded) {
if (AppStateManager.currentActivity() == null) { // 没有在当前应用内 在启动页面关闭应用
- CallerLogger.d(
- SceneConstant.M_TAXI + LoginServiceImpl.TAG,
- "showLoginDialogFragment 权限验证"
- )
+ CallerLogger.d(SceneConstant.M_BUS_P + TAG, "权限验证")
return
}
}
}
if (bpFunctionGroupDialogFragment?.get() == null) {
- bpFunctionGroupDialogFragment =
- WeakReference(BusPassengerFunctionFragment.newInstance())
+ bpFunctionGroupDialogFragment = WeakReference(BusPassengerFunctionFragment.newInstance())
}
val bpFunctionGroup = bpFunctionGroupDialogFragment?.get()
bpFunctionGroup?.arguments?.putString(BusPassengerFunctionFragment.SELECTTAB, tab)
@@ -104,15 +101,11 @@ class BusPassengerRouteFragment :
.commitAllowingStateLoss()
}
if (ClickUtils.isFastClick()) {
- bpFunctionGroup.show(parentFragmentManager, LoginServiceImpl.TAG)
- CallerLogger.d(
- SceneConstant.M_TAXI + LoginServiceImpl.TAG,
- "showLoginDialogFragment 展示登录界面"
- )
+ bpFunctionGroup.show(parentFragmentManager, TAG)
+ CallerLogger.d(SceneConstant.M_BUS_P + TAG, "展示$tab")
} else {
CallerLogger.d(
- SceneConstant.M_TAXI + LoginServiceImpl.TAG,
- "showLoginDialogFragment 展示登录界面 1s内执行一次"
+ SceneConstant.M_BUS_P + TAG, "dialog 1s内执行一次"
)
}
}
diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/view/statusbar/StatusBarView.kt b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/view/statusbar/StatusBarView.kt
index e89c18853c..e71d7625cc 100644
--- a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/view/statusbar/StatusBarView.kt
+++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/view/statusbar/StatusBarView.kt
@@ -21,6 +21,7 @@ import com.mogo.eagle.core.function.hmi.ui.widget.DemoModeView
import com.mogo.och.bus.passenger.R
import kotlinx.android.synthetic.m1.bus_p_m1_view_status_bar.view.*
import me.jessyan.autosize.utils.AutoSizeUtils
+import kotlin.math.roundToInt
class StatusBarView @JvmOverloads constructor(
context: Context,
@@ -82,15 +83,8 @@ class StatusBarView @JvmOverloads constructor(
override fun onBatteryManagementSystemStates(states: ChassisStatesOuterClass.BMSSystemStates) {
val bmsSoc = states.bmsSoc
- if(bmsSoc >1){
- progress.progress = bmsSoc.toInt()
- tv_power_cos.text = "${bmsSoc.toInt()}%"
- }else{
- val currenPower = (bmsSoc * 100).toInt()
- progress.progress = currenPower
- tv_power_cos.text = "$currenPower%"
- }
-
+ progress.progress = bmsSoc.toInt()
+ tv_power_cos.text = "${bmsSoc.roundToInt()}%"
}
}
diff --git a/OCH/mogo-och-bus-passenger/src/test/java/com/mogo/och/bus/passenger/ExampleUnitTest.java b/OCH/mogo-och-bus-passenger/src/test/java/com/mogo/och/bus/passenger/ExampleUnitTest.java
index 7860f8cdb7..d940b2948f 100644
--- a/OCH/mogo-och-bus-passenger/src/test/java/com/mogo/och/bus/passenger/ExampleUnitTest.java
+++ b/OCH/mogo-och-bus-passenger/src/test/java/com/mogo/och/bus/passenger/ExampleUnitTest.java
@@ -1,17 +1,15 @@
-//package com.mogo.och.bus.passenger;
-//
-//import org.junit.Test;
-//
-//import static org.junit.Assert.*;
-//
-///**
-// * Example local unit test, which will execute on the development machine (host).
-// *
-// * @see Testing documentation
-// */
-//public class ExampleUnitTest {
-// @Test
-// public void addition_isCorrect() {
-// assertEquals(4, 2 + 2);
-// }
-//}
\ No newline at end of file
+package com.mogo.och.bus.passenger;
+
+import org.junit.Test;
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see Testing documentation
+ */
+public class ExampleUnitTest {
+ @Test
+ public void addition_isCorrect() {
+
+ }
+}
\ No newline at end of file