[6.1.0] fix bug of traffic light and v2n biz , plus change the range cross
This commit is contained in:
@@ -18,13 +18,13 @@ fun TrafficLightResult.toTrafficLightDetail():MessagePad.TrafficLightDetail{
|
||||
if(this.laneList != null){
|
||||
left.phaseNo = this.laneList.left.phaseNo
|
||||
left.color = this.laneList.left.color
|
||||
left.remain = this.laneList.left.remain
|
||||
left.remain = this.laneList.left.time()
|
||||
mid.phaseNo = this.laneList.mid.phaseNo
|
||||
mid.color = this.laneList.mid.color
|
||||
mid.remain = this.laneList.mid.remain
|
||||
mid.remain = this.laneList.mid.time()
|
||||
right.phaseNo = this.laneList.right.phaseNo
|
||||
right.color = this.laneList.right.color
|
||||
right.remain = this.laneList.right.remain
|
||||
right.remain = this.laneList.right.time()
|
||||
}
|
||||
return trafficLightBuilder.build()
|
||||
}
|
||||
|
||||
@@ -25,13 +25,16 @@ fun TrafficLightStatus.turnRedAtOnce(): Boolean {
|
||||
return isFlashGreen() || isYellow()
|
||||
}
|
||||
|
||||
fun TrafficLightStatus.time():Int{
|
||||
return if(remain.contains("--") || remain.isEmpty()) -1 else remain.toInt()
|
||||
}
|
||||
|
||||
/**
|
||||
* 红绿灯路口具体灯态信息
|
||||
*/
|
||||
data class TrafficLightStatus(
|
||||
val phaseNo: String, //相位编号
|
||||
val color: String, //灯态: 红灯-R,绿灯-G,绿闪-FG,黄-Y,B-黑
|
||||
val remain: Int //倒计时-秒 todo 云端string类型 如果返回 -- 解析异常
|
||||
val remain: String //倒计时-秒 todo 云端string类型 如果返回 -- 解析异常
|
||||
) {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user