现场更改4

This commit is contained in:
2026-05-14 14:39:47 +08:00
parent 53ca705ab0
commit 985ad12d63
3 changed files with 15 additions and 17 deletions

View File

@@ -255,10 +255,10 @@ namespace CapMachine.Wpf.Services
{
if (!ToomossCanDrive.IsCycleRevice) return 0;
if (ListCanDbcModel.Any(a => a.Name == Name))
var dbcModel = ListCanDbcModel.FindFirst(a => a.Name == Name);
if (dbcModel != null && !string.IsNullOrWhiteSpace(dbcModel.SignalRtValue))
{
//double.TryParse(ListCanDbcModel.FindFirst(a => a.Name == Name).SignalRtValue, out double Result1);
return double.TryParse(ListCanDbcModel.FindFirst(a => a.Name == Name).SignalRtValue.Split(" ")[0], out double Result) == true ? Result : 0;
return double.TryParse(dbcModel.SignalRtValue.Split(" ")[0], out double Result) == true ? Result : 0;
}
return 0;
}
@@ -274,10 +274,10 @@ namespace CapMachine.Wpf.Services
{
if (!ToomossCanDrive.IsCycleRevice) return 0;
if (ListCanDbcModel.Any(a => a.Name == Name))
var dbcModel = ListCanDbcModel.FindFirst(a => a.Name == Name);
if (dbcModel != null && !string.IsNullOrWhiteSpace(dbcModel.SignalRtValue))
{
//double.TryParse(ListCanDbcModel.FindFirst(a => a.Name == Name).SignalRtValue, out double Result1);
return double.TryParse(ListCanDbcModel.FindFirst(a => a.Name == Name).SignalRtValue.Split(" ")[0], out double Result) == true ? Result : 0;
return double.TryParse(dbcModel.SignalRtValue.Split(" ")[0], out double Result) == true ? Result : 0;
}
return 0;
}