diff --git a/Aircraft/Instruments-3d/FG1000/Nasal/ConfigStore.nas b/Aircraft/Instruments-3d/FG1000/Nasal/ConfigStore.nas index 654591b6c..12737563c 100644 --- a/Aircraft/Instruments-3d/FG1000/Nasal/ConfigStore.nas +++ b/Aircraft/Instruments-3d/FG1000/Nasal/ConfigStore.nas @@ -117,6 +117,8 @@ var ConfigStore = { "Vr-visible" : 1, "Vglide-visible" : 1, "Vne-visible": 1, + + "TransponderVFRCode": 1200, # Factory set Transponder code }, new : func() diff --git a/Aircraft/Instruments-3d/FG1000/Nasal/MFDPages/PFDInstruments/PFDInstruments.nas b/Aircraft/Instruments-3d/FG1000/Nasal/MFDPages/PFDInstruments/PFDInstruments.nas index cb628fb7e..70c2d1ad6 100644 --- a/Aircraft/Instruments-3d/FG1000/Nasal/MFDPages/PFDInstruments/PFDInstruments.nas +++ b/Aircraft/Instruments-3d/FG1000/Nasal/MFDPages/PFDInstruments/PFDInstruments.nas @@ -918,9 +918,10 @@ var PFDInstruments = # Update the Transponder display updateTransponder : func(mode, code, ident, edit=0) { - # Data validation on the mode + # Data validation on the mode and code itself if (mode < 0) mode = 0; if (mode > 5) mode = 5; + if ((code == nil) or (! isnum(code))) code = 0; # Ensure the code is a 4 digit string representation of a number. # Normally this means padding with 0's at the left e.g. 42 becomes 0042.