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

Merge pull request #695 in VECTO/vecto-sim from ~EMQUARIMA/vecto-sim:develop to develop

* commit 'ee00e83e':
  fixes for running exempted vehicles from GUI
  set new version number, add -DEV suffix for builds
parents 9c445bfd ee00e83e
No related branches found
No related tags found
No related merge requests found
......@@ -77,7 +77,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
{
return
Runs.Select(
r => new CycleTypeDescription { Name = r.Run.CycleName, CycleType = r.Run.GetContainer().RunData.Cycle.CycleType })
r => new CycleTypeDescription { Name = r.Run.CycleName, CycleType = r.Run.GetContainer().RunData.Cycle?.CycleType ?? CycleType.None })
.Distinct();
}
......
......@@ -47,7 +47,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data
MeasuredSpeed,
MeasuredSpeedGear,
PTO,
VTP
VTP,
None
}
public static class CycleTypeHelper
......
......@@ -37,9 +37,12 @@ namespace TUGraz.VectoCore.Utils
public static class VectoSimulationCore
{
#if BETA_RELEASE
private const string SUFFIX = "-DEV";
#else
#if RELEASE_CANDIDATE
private const string SUFFIX = "-RC";
#else
#endif
private const string SUFFIX = "";
#endif
......
......@@ -55,8 +55,8 @@ namespace TUGraz.VectoCore.Utils {
public static object[] ValueAsUnit(Watt power, string unit, uint? decimals = 0)
{
switch (unit) {
case "kW": return GetValueAsUnit(power.ConvertToKiloWatt(), unit, decimals);
case "W": return GetValueAsUnit(power.Value(), unit, decimals);
case "kW": return GetValueAsUnit(power?.ConvertToKiloWatt(), unit, decimals);
case "W": return GetValueAsUnit(power?.Value(), unit, decimals);
}
throw new NotImplementedException(string.Format("unknown unit '{0}'", unit));
}
......@@ -104,11 +104,14 @@ namespace TUGraz.VectoCore.Utils {
}
}
private static object[] GetValueAsUnit(double value, string unit, uint? decimals)
private static object[] GetValueAsUnit(double? value, string unit, uint? decimals)
{
if (value == null) {
return new object[0];
}
return new object[] {
new XAttribute(XMLNames.Report_Results_Unit_Attr, unit),
value.ToXMLFormat(decimals)
value.Value.ToXMLFormat(decimals)
};
}
......
......@@ -6,6 +6,6 @@ int GetBuildNumber()
string GetVectoCoreVersionNumber()
{
return "3.3.0." + GetBuildNumber();
return "3.3.1." + GetBuildNumber();
}
#>
\ No newline at end of file
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