Browse Source

refactor(CustomSwitchStationLayer): Remove alarm status override for E-45

The code that unconditionally set the status of entity "E-45" to `STATUS_ALARM` has been commented out. The status will now be determined by the `parseStatus` function or the point's existing status.
周文健 2 tháng trước cách đây
mục cha
commit
aef9cba0f0

+ 3 - 3
app/src/main/java/com/grkj/iscs_mars/view/widget/CustomSwitchStationLayer.kt

@@ -483,9 +483,9 @@ class CustomSwitchStationLayer @JvmOverloads constructor(
                     var status =
                         p.pointSerialNumber?.let { parseStatus(switches?.find { it.idx.toString() == p.pointSerialNumber }) }
                             ?: p.status
-                    if (p.entityName=="E-45"){
-                        status = STATUS_ALARM
-                    }
+//                    if (p.entityName=="E-45"){
+//                        status = STATUS_ALARM
+//                    }
 //                    val status = Random.nextInt(3)
                     when (status) {
                         STATUS_ON -> {