修改红绿灯的显示
This commit is contained in:
@@ -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 = ""
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user