From 9796e4670303f7a9f4b0766e8019cb40653d668b Mon Sep 17 00:00:00 2001 From: lixiaopeng Date: Wed, 15 Sep 2021 14:48:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BA=A2=E7=BB=BF=E7=81=AF?= =?UTF-8?q?=E7=9A=84=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/hmi/ui/widget/TrafficLightView.kt | 16 ++++++++-------- .../mogo/receiver/ObuRsuTestTriggerReceiver.kt | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/mogo-module-hmi/src/main/java/com/mogo/module/hmi/ui/widget/TrafficLightView.kt b/modules/mogo-module-hmi/src/main/java/com/mogo/module/hmi/ui/widget/TrafficLightView.kt index b5384b6a93..a2e125f928 100644 --- a/modules/mogo-module-hmi/src/main/java/com/mogo/module/hmi/ui/widget/TrafficLightView.kt +++ b/modules/mogo-module-hmi/src/main/java/com/mogo/module/hmi/ui/widget/TrafficLightView.kt @@ -80,11 +80,11 @@ class TrafficLightView @JvmOverloads constructor( changeCountdownRed(greenNum) } - fun changeCountdownGreen(readNum: Int) { - if (readNum > 0) { - ctvRedTrafficLight.text = "$readNum" + fun changeCountdownGreen(greenNum: Int) { + if (greenNum > 0) { + ctvGreenTrafficLight.text = "$greenNum" } else { - ctvRedTrafficLight.text = "" + ctvGreenTrafficLight.text = "" } } @@ -96,11 +96,11 @@ class TrafficLightView @JvmOverloads constructor( } } - fun changeCountdownRed(greenNum: Int) { - if (greenNum > 0) { - ctvGreenTrafficLight.text = "$greenNum" + fun changeCountdownRed(redNum: Int) { + if (redNum > 0) { + ctvRedTrafficLight.text = "$redNum" } else { - ctvGreenTrafficLight.text = "" + ctvRedTrafficLight.text = "" } } diff --git a/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/receiver/ObuRsuTestTriggerReceiver.kt b/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/receiver/ObuRsuTestTriggerReceiver.kt index 026ffd7a86..e8e311e69c 100644 --- a/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/receiver/ObuRsuTestTriggerReceiver.kt +++ b/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/receiver/ObuRsuTestTriggerReceiver.kt @@ -51,10 +51,10 @@ class ObuRsuTestTriggerReceiver : BroadcastReceiver() { cvxIvpThreatIndInfo.threat_info = ivpThreat val lightList = listOf( - Light(1, 0x0, 1000, 100, 6000, 3000, 100, 1000), - Light(1, 0x1, 1000, 100, 6000, 3000, 100, 1000), - Light(1, 0x2, 1000, 100, 6000, 3000, 100, 1000), - Light(1, 0x3, 1000, 100, 6000, 3000, 100, 1000) + Light(1, 0x0, 1000, 3000, 6000, 3000, 100, 1000), + Light(1, 0x1, 1000, 3000, 6000, 3000, 100, 1000), + Light(1, 0x2, 1000, 3000, 6000, 3000, 100, 1000), + Light(1, 0x3, 1000, 3000, 6000, 3000, 100, 1000) ) val ivpThreatExt = IvpThreatExt(1, 1000, 1000, 0, indicator, lightList) cvxIvpThreatIndInfo.ext_info = ivpThreatExt