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 781344c9 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

Driver Acceleration Curve: validate entries, adapt limits

parent cd9fadef
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data
{
public class AccelerationCurveData : SimulationComponentData
{
private readonly List<KeyValuePair<MeterPerSecond, AccelerationEntry>> _entries;
[Required, ValidateObject] private readonly List<KeyValuePair<MeterPerSecond, AccelerationEntry>> _entries;
protected internal AccelerationCurveData(List<KeyValuePair<MeterPerSecond, AccelerationEntry>> entries)
{
......@@ -109,10 +109,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data
[DebuggerDisplay("Acceleration: {Acceleration}, Deceleration: {Deceleration}")]
public class AccelerationEntry
{
[Required, SIRange(0.3, 10)]
[Required, SIRange(0.05, 20)]
public MeterPerSquareSecond Acceleration { get; set; }
[Required, SIRange(-0.5, -10)]
[Required, SIRange(-20, -0.05)]
public MeterPerSquareSecond Deceleration { get; set; }
}
......
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