From cc91a4ab59797e0b9a12baa869cd3e078d155003 Mon Sep 17 00:00:00 2001 From: Raphael Luz <luz@ivt.tugraz.at> Date: Tue, 10 Sep 2013 09:19:38 +0200 Subject: [PATCH] pre-merge commit -small changes in User Manual -update in .vecto JSON input: Parameters not needed in Engine Only are now optional --- User Manual/GUI/VEH-Editor.html | 4 ++-- VECTO Changelog.txt | 1 - VECTO/Input Files/cGEN.vb | 36 +++++++++++++++++++-------------- 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/User Manual/GUI/VEH-Editor.html b/User Manual/GUI/VEH-Editor.html index 0943d6bd8f..25ee331079 100644 --- a/User Manual/GUI/VEH-Editor.html +++ b/User Manual/GUI/VEH-Editor.html @@ -235,8 +235,8 @@ input for Air Speed and Yaw Angle, see <a href="../fileformat/VDRI.html">.vdri f for .vcdv/.vcdb files</span><br> </div> <br><br><div style="margin-left: 40px;"><img style="width: 22px; height: 22px;" alt="" src="../pics/misc/OpenFile.PNG"> <span style="font-weight: bold;">Open file</span> with <a href="../../GRAPHi/documentation/HTML%20Manual/mainwindow.html">GRAPHi</a> or an user-defined tool (see <a href="settings.html#opencmd">File Open Command)</a>.<br></div><br><br> -<a name="retard"></a><span style="font-weight: bold;">Retarder</span><br> -<div style="margin-left: 40px;">If available a <span style="font-weight: bold;">Retarder Torque Loss Map</span> can be defined here. Three options are available:<br> +<a name="retard"></a><span style="font-weight: bold;">Retarder Losses</span><br> +<div style="margin-left: 40px;">If available a <span style="font-weight: bold;">Retarder Torque Loss Map</span> can be defined here to consider losses caused by the retarder (even if not actively in use). <br><span style="font-weight: bold; color: red;">Note: Do not use this function if the retarder's losses are already included in the <a href="GBX-Editor.html#gears">Transmission Loss Maps</a>!</span><br><br>Three options are available:<br> <ul> <li>None</li> <li>Primary (before gearbox): The rpm ratio is relative to the diff --git a/VECTO Changelog.txt b/VECTO Changelog.txt index ae24b27a2a..dc3e0fcfcb 100644 --- a/VECTO Changelog.txt +++ b/VECTO Changelog.txt @@ -1,6 +1,5 @@ VECTO ?.? (future release) TODO - User Manual: - "Don't use secondary retarder if retarder losses are already defined in transmission loss maps" Engine/FLD Editor New Eco Roll GBX diff --git a/VECTO/Input Files/cGEN.vb b/VECTO/Input Files/cGEN.vb index cde85734c3..4478b594f7 100644 --- a/VECTO/Input Files/cGEN.vb +++ b/VECTO/Input Files/cGEN.vb @@ -557,6 +557,7 @@ lbEr: MsgSrc = "Main/ReadInp/GEN" + 'Flag for "File is not JSON" Warnings NoJSON = False If sFilePath = "" Then Return False @@ -574,11 +575,11 @@ lbEr: End If Try - stPathVEH.Init(MyPath, JSON.Content("VehicleFile")) + If JSON.Content.ContainsKey("VehicleFile") Then stPathVEH.Init(MyPath, JSON.Content("VehicleFile")) stPathENG.Init(MyPath, JSON.Content("EngineFile")) - stPathGBX.Init(MyPath, JSON.Content("GearboxFile")) + If JSON.Content.ContainsKey("GearboxFile") Then stPathGBX.Init(MyPath, JSON.Content("GearboxFile")) If JSON.Content.ContainsKey("Cycles") Then For Each str In JSON.Content("Cycles") @@ -610,7 +611,7 @@ lbEr: Next End If - stDesMaxFile.Init(MyPath, JSON.Content("VACC")) + If JSON.Content.ContainsKey("VACC") Then stDesMaxFile.Init(MyPath, JSON.Content("VACC")) EngOnly = JSON.Content("EngineOnlyMode") @@ -621,24 +622,29 @@ lbEr: End If If JSON.Content.ContainsKey("StartStop") Then - boStartStop = JSON.Content("StartStop")("Enabled") - siStStV = JSON.Content("StartStop")("MaxSpeed") - siStStT = JSON.Content("StartStop")("MinTime") - StStDelay = JSON.Content("StartStop")("Delay") + dic = JSON.Content("StartStop") + boStartStop = dic("Enabled") + siStStV = dic("MaxSpeed") + siStStT = dic("MinTime") + StStDelay = dic("Delay") Else boStartStop = False End If If JSON.Content.ContainsKey("LAC") Then - LookAheadOn = JSON.Content("LAC")("Enabled") - a_lookahead = JSON.Content("LAC")("Dec") - vMinLA = JSON.Content("LAC")("MinSpeed") + dic = JSON.Content("LAC") + LookAheadOn = dic("Enabled") + a_lookahead = dic("Dec") + vMinLA = dic("MinSpeed") Else LookAheadOn = False End If If JSON.Content.ContainsKey("OverSpeedEcoRoll") Then - Select Case UCase(JSON.Content("OverSpeedEcoRoll")("Mode")).trim + + dic = JSON.Content("OverSpeedEcoRoll") + + Select Case UCase(dic("Mode")).Trim Case "ECOROLL" OverSpeedOn = False EcoRollOn = True @@ -652,13 +658,13 @@ lbEr: EcoRollOn = False Case Else - WorkerMsg(tMsgID.Err, "Value '" & JSON.Content("OverSpeedEcoRoll")("Mode") & "' is not valid for OverSpeedEcoRoll/Mode!", MsgSrc) + WorkerMsg(tMsgID.Err, "Value '" & dic("Mode") & "' is not valid for OverSpeedEcoRoll/Mode!", MsgSrc) Return False End Select - vMin = JSON.Content("OverSpeedEcoRoll")("MinSpeed") - OverSpeed = JSON.Content("OverSpeedEcoRoll")("OverSpeed") - UnderSpeed = JSON.Content("OverSpeedEcoRoll")("UnderSpeed") + vMin = dic("MinSpeed") + OverSpeed = dic("OverSpeed") + If dic.ContainsKey("UnderSpeed") Then UnderSpeed = dic("UnderSpeed") Else OverSpeedOn = False -- GitLab