desc:混合复杂气体相互影响校正

main
xiaowusky 1 year ago
parent 6b87662fc2
commit ffc1df662b

@ -116,6 +116,7 @@ object ParseHelper {
}
value = correctValueByOtherGas(type, value)
LogUtils.w("receive msg 多气体矫正后 $type, 浓度 = $value $unit")
//根据单位进行数值转换
val localGasUnit = getLocalGasUnit(type.desc)
@ -318,8 +319,9 @@ object ParseHelper {
if (gasMap.isNotEmpty()) {
gasMap.forEach { entry ->
val gas = entry.value
if (gas.gasValue > 0) {
offset += gas.gasValue * getInfluenceCoefficient(type, gas.gasName)
val coefficient = getInfluenceCoefficient(type, gas.gasName)
if (gas.gasValue > 0f && coefficient != 0f) {
offset += gas.gasValue * coefficient
}
}
}

Loading…
Cancel
Save