|
|
@ -44,7 +44,7 @@ object ParseHelper {
|
|
|
|
LogUtils.v("receive msg, unknown gas")
|
|
|
|
LogUtils.v("receive msg, unknown gas")
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
LogUtils.v("receive msg, status is $status")
|
|
|
|
LogUtils.v("receive msg ${gasType.desc}, status is $status")
|
|
|
|
when (status) {
|
|
|
|
when (status) {
|
|
|
|
// 预热
|
|
|
|
// 预热
|
|
|
|
0 -> {
|
|
|
|
0 -> {
|
|
|
@ -266,9 +266,14 @@ object ParseHelper {
|
|
|
|
val typeDao = DBUtils.gasTypeDao()
|
|
|
|
val typeDao = DBUtils.gasTypeDao()
|
|
|
|
val gasType = typeDao.getByName(type.desc)
|
|
|
|
val gasType = typeDao.getByName(type.desc)
|
|
|
|
GasCache.setStatus(type.desc, getShowStatus(CommonApplication.getContext(), status))
|
|
|
|
GasCache.setStatus(type.desc, getShowStatus(CommonApplication.getContext(), status))
|
|
|
|
|
|
|
|
gasType?.type = type.desc
|
|
|
|
gasType?.status = status
|
|
|
|
gasType?.status = status
|
|
|
|
gasType?.sensorIndex = sensorIndex
|
|
|
|
gasType?.sensorIndex = sensorIndex
|
|
|
|
typeDao.insert(gasType ?: GasType(type.desc, status, sensorIndex))
|
|
|
|
if (gasType == null) {
|
|
|
|
|
|
|
|
typeDao.insert(GasType(type.desc, status, sensorIndex))
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
typeDao.update(gasType)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|