现场更改4
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user