Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

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

JSONFileWriter: Added check for APT-N Gearbox to not access TorqueConverter Data

parent dffa6b94
No related branches found
No related tags found
No related merge requests found
......@@ -260,7 +260,7 @@ public class JSONFileWriter : IOutputFileWriter
body.Add(JsonKeys.Gearbox_GearboxType, gbx.Type.ToString());
var torqueConverterDict = new Dictionary<string, object> { { "Enabled", torqueConverter != null && gbx.Type.AutomaticTransmission() } };
if (gbx.Type.AutomaticTransmission() && torqueConverter != null) {
if (gbx.Type.AutomaticTransmission() && gbx.Type != GearboxType.APTN) {
torqueConverterDict.Add("File", GetRelativePath(torqueConverter.TCData.Source, Path.GetDirectoryName(filename)));
torqueConverterDict.Add(JsonKeys.Gearbox_TorqueConverter_ReferenceRPM, Math.Round(torqueConverter.ReferenceRPM.AsRPM, 4));
torqueConverterDict.Add(JsonKeys.Gearbox_TorqueConverter_Inertia, torqueConverter.Inertia.Value());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment