This commit is contained in:
@@ -185,7 +185,7 @@ namespace 外科辅料和患者防护罩激光抗性测试仪
|
||||
"无氧环境/灭火 (0%)"
|
||||
};
|
||||
uiComboBox1.Items.AddRange(options);
|
||||
|
||||
uiComboBox1.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
private void ManualDebugForm_FormClosed(object sender, FormClosedEventArgs e)
|
||||
|
||||
@@ -500,7 +500,9 @@ namespace 外科辅料和患者防护罩激光抗性测试仪
|
||||
ushort[] tem = _modbusMaster?.ReadHoldingRegisters(1, (ushort)tempRegAddress, 2);
|
||||
if (tem != null && tem.Length >= 2)
|
||||
{
|
||||
temperature = c.UshortToFloat(tem[1], tem[0]);
|
||||
float rawTemperature = c.UshortToFloat(tem[1], tem[0]);
|
||||
// 保留一位小数
|
||||
temperature = (float)Math.Round(rawTemperature, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user