From 48d28c40c8df24e8c0d7c1078ca15b672ea3c309 Mon Sep 17 00:00:00 2001 From: "VKMTHD\\franzjosefkober" <franz.josef.kober@ivt.tugraz.at> Date: Wed, 26 Feb 2020 10:57:06 +0100 Subject: [PATCH] minor gui changes for Primary Bus Vehicle --- .../Impl/PrimaryVehicleBusJobViewModel.cs | 2 +- .../Impl/PrimaryVehicleBusViewModel.cs | 39 +++++++++++++--- .../Interfaces/IPrimaryVehicleBusViewModel.cs | 18 +++++--- .../Declaration/PrimaryVehicleBusView.xaml | 44 ++++++++++++++++--- 4 files changed, 86 insertions(+), 17 deletions(-) diff --git a/VECTO3GUI/ViewModel/Impl/PrimaryVehicleBusJobViewModel.cs b/VECTO3GUI/ViewModel/Impl/PrimaryVehicleBusJobViewModel.cs index 061b0eb7c2..b4fcb035ce 100644 --- a/VECTO3GUI/ViewModel/Impl/PrimaryVehicleBusJobViewModel.cs +++ b/VECTO3GUI/ViewModel/Impl/PrimaryVehicleBusJobViewModel.cs @@ -31,7 +31,7 @@ namespace VECTO3GUI.ViewModel.Impl public string JobFile { - get { return "some JobFile string"; } + get { return string.Empty; } } public IInputDataProvider InputDataProvider { get; set; } } diff --git a/VECTO3GUI/ViewModel/Impl/PrimaryVehicleBusViewModel.cs b/VECTO3GUI/ViewModel/Impl/PrimaryVehicleBusViewModel.cs index 0d737eed6e..616b97e4f9 100644 --- a/VECTO3GUI/ViewModel/Impl/PrimaryVehicleBusViewModel.cs +++ b/VECTO3GUI/ViewModel/Impl/PrimaryVehicleBusViewModel.cs @@ -35,7 +35,11 @@ namespace VECTO3GUI.ViewModel.Impl private double _retarderRatio; private AngledriveType _angledriveType; private bool _zeroEmissionVehicle; - private IAdvancedDriverAssistantSystemDeclarationInputData _adas; + + private bool _engineStopStart; + private EcoRollType _ecoRollType; + private PredictiveCruiseControlType _predictiveCruiseControl; + private IList<ITorqueLimitInputData> _torqueLimits; #endregion @@ -121,11 +125,24 @@ namespace VECTO3GUI.ViewModel.Impl get { return _zeroEmissionVehicle; } set { SetProperty(ref _zeroEmissionVehicle, value); } } - public IAdvancedDriverAssistantSystemDeclarationInputData ADAS + + public bool EngineStopStart + { + get { return _engineStopStart;} + set { SetProperty(ref _engineStopStart, value); } + } + public EcoRollType EcoRoll + { + get { return _ecoRollType;} + set { SetProperty(ref _ecoRollType, value); } + } + public PredictiveCruiseControlType PredictiveCruiseControl { - get { return _adas; } - set { SetProperty(ref _adas, value); } + get { return _predictiveCruiseControl;} + set { SetProperty(ref _predictiveCruiseControl, value); } } + + public IList<ITorqueLimitInputData> TorqueLimits { get { return _torqueLimits; } @@ -136,6 +153,8 @@ namespace VECTO3GUI.ViewModel.Impl public AllowedEntry<AxleConfiguration>[] AllowedAxleConfigurations { get; set; } public AllowedEntry<RetarderType>[] AllowedRetarderTypes { get; set; } public AllowedEntry<AngledriveType>[] AllowedAngledriveTypes { get; set; } + public AllowedEntry<EcoRollType>[] AllowedEcoRollTypes { get; set; } + public AllowedEntry<PredictiveCruiseControlType>[] AllowedPredictiveCruiseControl { get; set; } #endregion @@ -169,7 +188,10 @@ namespace VECTO3GUI.ViewModel.Impl AngledriveType = ((XMLDeclarationPrimaryVehicleBusDataProviderV01)vehicle).AngledriveType; ZeroEmissionVehicle = vehicle.ZeroEmissionVehicle; - ADAS = vehicle.ADAS; + EngineStopStart = vehicle.ADAS.EngineStopStart; + EcoRoll = vehicle.ADAS.EcoRoll; + PredictiveCruiseControl = vehicle.ADAS.PredictiveCruiseControl; + TorqueLimits = vehicle.TorqueLimits; SetAllowedEntries(); @@ -189,6 +211,13 @@ namespace VECTO3GUI.ViewModel.Impl AllowedAngledriveTypes = Enum.GetValues(typeof(AngledriveType)).Cast<AngledriveType>() .Select(at => AllowedEntry.Create(at, at.GetLabel())).ToArray(); + + AllowedEcoRollTypes = Enum.GetValues(typeof(EcoRollType)).Cast<EcoRollType>() + .Select(ert => AllowedEntry.Create(ert, ert.GetName())).ToArray(); + + AllowedPredictiveCruiseControl = Enum.GetValues(typeof(PredictiveCruiseControlType)) + .Cast<PredictiveCruiseControlType>() + .Select(pcc => AllowedEntry.Create(pcc, pcc.GetName())).ToArray(); } diff --git a/VECTO3GUI/ViewModel/Interfaces/IPrimaryVehicleBusViewModel.cs b/VECTO3GUI/ViewModel/Interfaces/IPrimaryVehicleBusViewModel.cs index 0f89643082..5820ea12fa 100644 --- a/VECTO3GUI/ViewModel/Interfaces/IPrimaryVehicleBusViewModel.cs +++ b/VECTO3GUI/ViewModel/Interfaces/IPrimaryVehicleBusViewModel.cs @@ -38,7 +38,14 @@ namespace VECTO3GUI.ViewModel.Interfaces double RetarderRatio { get; set; } AngledriveType AngledriveType { get; set; } bool ZeroEmissionVehicle { get; set; } - IAdvancedDriverAssistantSystemDeclarationInputData ADAS { get; set; } + + //************** ADAS ************** + bool EngineStopStart { get; set; } + EcoRollType EcoRoll { get; set; } + PredictiveCruiseControlType PredictiveCruiseControl { get; set; } + + //********************************** + IList<ITorqueLimitInputData> TorqueLimits { get; set; } @@ -48,13 +55,12 @@ namespace VECTO3GUI.ViewModel.Interfaces AllowedEntry<AxleConfiguration> [] AllowedAxleConfigurations { get; } AllowedEntry<RetarderType>[] AllowedRetarderTypes { get; set; } AllowedEntry<AngledriveType>[] AllowedAngledriveTypes { get; set; } - #endregion - - - - + AllowedEntry<EcoRollType>[] AllowedEcoRollTypes { get; set; } + AllowedEntry<PredictiveCruiseControlType>[] AllowedPredictiveCruiseControl { get; set; } #endregion + + #endregion } diff --git a/VECTO3GUI/Views/ComponentViews/Declaration/PrimaryVehicleBusView.xaml b/VECTO3GUI/Views/ComponentViews/Declaration/PrimaryVehicleBusView.xaml index a06b156d3a..12d4024e46 100644 --- a/VECTO3GUI/Views/ComponentViews/Declaration/PrimaryVehicleBusView.xaml +++ b/VECTO3GUI/Views/ComponentViews/Declaration/PrimaryVehicleBusView.xaml @@ -47,15 +47,17 @@ <customControls:VectoParameterControl Caption="Articulated" Unit="" CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth" Value="{Binding Articulated}" /> + <customControls:VectoParameterControl - Caption="Technical Permissible Maximum Laden Mass" Unit="{helper:SIUnit TechnicalPermissibleMaximumLadenMass}" CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth" - Value="{Binding TechnicalPermissibleMaximumLadenMass}" /> + Caption="Permissible Maximum Laden Mass" Unit="{helper:SIUnit TechnicalPermissibleMaximumLadenMass}" CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth" + Value="{Binding TechnicalPermissibleMaximumLadenMass, Converter={helper:SIValueConverter}, ConverterParameter=int}" /> + <customControls:VectoParameterControl - Caption="Idling Speed" Unit="" CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth" - Value="{Binding IdlingSpeed}" /> + Caption="Idling Speed" Unit="{helper:SIUnit IdlingSpeed}" CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth" + Value="{Binding IdlingSpeed, Converter={helper:SIValueConverter}, ConverterParameter=int}" /> <customControls:ComboParameter - Caption="Axle Configuration" + Caption="Retarder Type" CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth" Value="{Binding RetarderType}" AllowedValues="{Binding AllowedRetarderTypes}" /> @@ -64,7 +66,39 @@ Caption="Retarder Ratio" Unit="" CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth" Value="{Binding RetarderRatio}" /> + <customControls:ComboParameter + Caption="Angledrive Type" + CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth" + Value="{Binding AngledriveType}" + AllowedValues="{Binding AllowedAngledriveTypes}" /> + + <customControls:VectoParameterControl + Caption="Zero Emission Vehicle" Unit="" CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth" + Value="{Binding ZeroEmissionVehicle}" /> + + <GroupBox Header="ADAS"> + <StackPanel> + <customControls:CheckboxParameter + Caption="Engine Stop Start" CaptionWidthGroup="vehicleLbl" + Value="{Binding EngineStopStart}" UnitWidthGroup="unitWidth"/> + + <customControls:ComboParameter + Caption="Eco Roll" + CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth" + Value="{Binding EcoRoll}" + AllowedValues="{Binding AllowedEcoRollTypes}" /> + + <customControls:ComboParameter + Caption="Predictive Cruise Control" + CaptionWidthGroup="vehicleLbl" UnitWidthGroup="unitWidth" + Value="{Binding PredictiveCruiseControl}" + AllowedValues="{Binding AllowedPredictiveCruiseControl}" /> + </StackPanel> + </GroupBox> + + <GroupBox Header="Torque Limits"> + </GroupBox> </StackPanel> -- GitLab