Changeset 1184:c2100c410a84
- Timestamp:
- 04/30/25 15:05:04 (37 hours ago)
- Branch:
- python3
- Phase:
- public
- Location:
- src/mlx
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/config.py
r1168 r1184 77 77 """Create a checklist for the given aircraft type from the given 78 78 config.""" 79 baseName = "checklist." + const. icaoCodes[aircraftType] + "."79 baseName = "checklist." + const.extendedICAOCodes[aircraftType] + "." 80 80 fileList = [] 81 81 while True: … … 98 98 def toConfig(self, config, aircraftType): 99 99 """Add this checklist to the given config.""" 100 baseName = "checklist." + const. icaoCodes[aircraftType] + "."100 baseName = "checklist." + const.extendedICAOCodes[aircraftType] + "." 101 101 for index in range(0, len(self._fileList)): 102 102 option = baseName + str(index) … … 135 135 """Create a checklist for the given aircraft type from the given 136 136 config.""" 137 baseName = "callouts." + const. icaoCodes[aircraftType] + "."137 baseName = "callouts." + const.extendedICAOCodes[aircraftType] + "." 138 138 mapping = {} 139 139 while True: … … 161 161 def toConfig(self, config, aircraftType): 162 162 """Add this checklist to the given config.""" 163 baseName = "callouts." + const. icaoCodes[aircraftType] + "."163 baseName = "callouts." + const.extendedICAOCodes[aircraftType] + "." 164 164 index = 0 165 165 for (altitude, path) in self._mapping.items(): … … 1147 1147 print(" checklists:") 1148 1148 for (type, checklist) in self._checklists.items(): 1149 print(" %s:" % (const. icaoCodes[type],))1149 print(" %s:" % (const.extendedICAOCodes[type],)) 1150 1150 for path in checklist: 1151 1151 print(" " + path) … … 1153 1153 print(" approachCallouts:") 1154 1154 for (type, approachCallouts) in self._approachCallouts.items(): 1155 print(" %s:" % (const. icaoCodes[type],))1155 print(" %s:" % (const.extendedICAOCodes[type],)) 1156 1156 for (altitude, path) in approachCallouts: 1157 1157 print(" %d: %s" % (altitude, path)) -
src/mlx/const.py
r1183 r1184 214 214 AIRCRAFT_B737 : "B737", 215 215 AIRCRAFT_B738 : "B738", 216 AIRCRAFT_B738C : "B738 C",216 AIRCRAFT_B738C : "B738", 217 217 AIRCRAFT_B732 : "B732", 218 218 AIRCRAFT_B733 : "B733", … … 230 230 AIRCRAFT_B462 : "B462" } 231 231 232 ## A mapping of aircraft types to their 'extended' ICAO codes, which 233 # are usually the same as the 'internal' ones above, but in certain 234 # cases 'sub-types' are distinguished 235 extendedICAOCodes = icaoCodes.copy() 236 extendedICAOCodes[AIRCRAFT_B738C] = "B738C" 237 232 238 #------------------------------------------------------------------------------- 233 239 -
src/mlx/gui/flightlist.py
r1033 r1184 246 246 type.""" 247 247 return tailNumber + \ 248 " (" + const. icaoCodes[bookedFlight.aircraftType] + ")"248 " (" + const.extendedICAOCodes[bookedFlight.aircraftType] + ")" 249 249 250 250 def _getAcft(tailNumber, bookedFlight): -
src/mlx/gui/pirep.py
r1079 r1184 323 323 self._callsign.set_text(bookedFlight.callsign) 324 324 self._tailNumber.set_text(bookedFlight.tailNumber) 325 aircraftType = xstr("aircraft_" + icaoCodes[bookedFlight.aircraftType].lower())325 aircraftType = xstr("aircraft_" + extendedICAOCodes[bookedFlight.aircraftType].lower()) 326 326 self._aircraftType.set_text(aircraftType) 327 327 … … 888 888 self._callsign.set_text(bookedFlight.callsign) 889 889 self._tailNumber.set_text(bookedFlight.tailNumber) 890 aircraftType = xstr("aircraft_" + icaoCodes[bookedFlight.aircraftType].lower())890 aircraftType = xstr("aircraft_" + extendedICAOCodes[bookedFlight.aircraftType].lower()) 891 891 self._aircraftType.set_text(aircraftType) 892 892
Note:
See TracChangeset
for help on using the changeset viewer.