desc:完善status判断

main
xiaowusky 1 year ago
parent dd0cae7da0
commit e1a662bcbf

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

Loading…
Cancel
Save