Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 48db8034 authored by Michael KRISPER's avatar Michael KRISPER
Browse files

More Additions to DebugData

parent 933f22ae
No related branches found
No related tags found
No related merge requests found
......@@ -147,8 +147,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
CurrentStrategySettings = strategySettings;
retVal = NextComponent.Request(absTime, dt, outTorque, outAngularVelocity, dryRun);
DebugData.Add("HC.R", new {
DrivingAction = DataBus.DriverInfo.DrivingAction,
DebugData.Add($"HC.R-{retryCount}", new {
DataBus.DriverInfo.DrivingAction,
StrategySettings = strategySettings,
Response = retVal,
DryRun = dryRun
......
......@@ -42,11 +42,12 @@ namespace TUGraz.VectoCore.Utils
private static readonly ThreadLocal<Queue<dynamic>> _data = new ThreadLocal<Queue<dynamic>>(
() => new Queue<dynamic>(Capacity));
private readonly Queue<dynamic> _localData = new Queue<dynamic>();
private readonly bool _globalDebug;
internal Queue<dynamic> Data => _globalDebug ? _data.Value : _localData;
internal Queue<dynamic> Data => _globalDebug ? GlobalData : LocalData;
internal static Queue<dynamic> GlobalData => _data.Value;
internal Queue<dynamic> LocalData { get; } = new Queue<dynamic>();
public DebugData(bool globalDebug = true) => _globalDebug = globalDebug;
......
......@@ -125,7 +125,7 @@ namespace TUGraz.VectoCore.Utils
var intervalFactor = 1.0;
var origY = y;
var debug = new DebugData(false);
var debug = new DebugData();
debug.Add(new { x = x.Value(), y = y.Value() });
log.Debug("Log Disabled during LineSearch.");
LogManager.DisableLogging();
......@@ -208,7 +208,7 @@ namespace TUGraz.VectoCore.Utils
log.Debug("Log Disabled during InterpolateSearch.");
LogManager.DisableLogging();
var debug = new DebugData(false);
var debug = new DebugData();
debug.Add(new { x = x1, y = y1 });
try {
......
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