Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 61d8ced4 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

handle case when no pcc segments are present in cycle, write pcc info to mod...

handle case when no pcc segments are present in cycle, write pcc info to mod data even when no pcc segments are present, write ignition to vmod file
parent 84a0f7ad
No related branches found
No related tags found
No related merge requests found
......@@ -218,7 +218,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
public int Count { get { return Segments.Count; } }
public PCCSegment Current { get { return Segments[CurrentIdx]; } }
public PCCSegment Current { get { return Segments.Any() ? Segments[CurrentIdx] : null; } }
public List<PCCSegment> Segments { get; }
}
......
......@@ -165,6 +165,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
}
container.SetDataValue("PCCSegment", val);
container.SetDataValue("PCCState", (int)PCCState);
} else {
container.SetDataValue("PCCSegment", 0);
container.SetDataValue("PCCState", (int)PCCState);
}
}
......@@ -244,7 +247,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
{
var dataBus = Driver.DataBus;
var distance = dataBus.Distance;
if (PCCSegments.Current.StartDistance < distance && PCCSegments.Current.EndDistance > distance) {
if (PCCSegments.Current != null && PCCSegments.Current.StartDistance < distance && PCCSegments.Current.EndDistance > distance) {
// within pcc-segment
PCCState = PCCStates.WithinSegment;
} else {
......
......@@ -178,6 +178,7 @@ namespace TUGraz.VectoCore.OutputData
//#if TRACE
strCols = strCols.Concat(_additionalColumns);
strCols = strCols.Concat(new[] { ModalResultField.IgnitionOn }.Select(x => x.GetName()));
//#endif
if (WriteModalResults) {
var filteredData = Data;
......
......@@ -695,6 +695,12 @@
<None Include="TestData\Integration\ADAS\Group5PCCEng\Gear_9.vtlm">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="TestData\Integration\ADAS\Group5PCCEng\Group5Eng_CaseC.vdri">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="TestData\Integration\ADAS\Group5PCCEng\Group5Eng_CaseB.vdri">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="TestData\Integration\ADAS\Group5PCCEng\Group5Eng_CaseA.vdri">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment