desc:完善status判断

main
xiaowusky 1 year ago
parent dd0cae7da0
commit e1a662bcbf

@ -42,14 +42,15 @@ object ParseHelper {
LogUtils.v("receive msg, unknown gas")
return
}
LogUtils.v("receive msg, status is $status")
when (status) {
// 预热
0 -> {
updateGasTypeDb(gasType, gasIndex, GasPortStatus.PRE_HOT)
setFlag(gasIndex, gasType)
}
// 正常
1 -> {
// 1正常 4预警 5低报 6高报 8超量程 9需要标定 11stel报警 12twa报警
1, 4, 5, 6, 8, 9, 11, 12 -> {
updateGasTypeDb(gasType, gasIndex, GasPortStatus.OK)
setFlag(gasIndex, gasType)
parseGasData(gasType, it)
@ -59,7 +60,7 @@ object ParseHelper {
updateGasTypeDb(gasType, gasIndex, GasPortStatus.ERROR)
setFlag(gasIndex, gasType)
}
// 10超时
else -> {
LogUtils.v("unKnow status, do nothing")
}

Loading…
Cancel
Save