Changeset 408:1e2202fe006b for src/mlx
- Timestamp:
- 12/28/12 12:13:29 (12 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/fs.py
r394 r408 229 229 (float) 230 230 - altimeter: the altimeter setting in hPa (float) 231 - qnh: the QNH in hPa (float) 231 232 - altimeterReliable: a boolean indicating if the altimeter setting is 232 233 reliable -
src/mlx/fsuipc.py
r406 r408 1181 1181 ("spoilers", 0x0bd0, "d"), 1182 1182 ("altimeter", 0x0330, "H"), 1183 ("qnh", 0x0ec6, "H"), 1183 1184 ("nav1", 0x0350, "H"), 1184 1185 ("nav1_obs", 0x0c4e, "H"), … … 1379 1380 state.altimeter = data[self._monidx_altimeter] / 16.0 1380 1381 state.altimeterReliable = True 1382 state.qnh = data[self._monidx_qnh] / 16.0 1381 1383 1382 1384 state.ils = None -
src/mlx/gui/monitor.py
r398 r408 37 37 padding_left = 16, padding_right = 16) 38 38 39 table = gtk.Table(rows = 7, columns = 14)39 table = gtk.Table(rows = 9, columns = 14) 40 40 table.set_homogeneous(False) 41 41 table.set_row_spacings(4) … … 222 222 table.attach(label, 10, 11, 7, 8) 223 223 table.attach(self._adf2, 11, 12, 7, 8) 224 225 (label, self._qnh) = self._createLabeledEntry("QNH:", 7) 226 table.attach(label, 0, 1, 8, 9) 227 table.attach(self._qnh, 1, 2, 8, 9) 224 228 225 229 alignment.add(table) … … 307 311 self._adf1.set_text("-") 308 312 self._adf2.set_text("-") 313 self._qnh.set_text("-") 309 314 else: 310 315 self._timestamp.set_text(time.strftime("%H:%M:%S", … … 336 341 self._nav1.set_text("-" if aircraftState.nav1 is None else aircraftState.nav1) 337 342 self._nav2.set_text("-" if aircraftState.nav2 is None else aircraftState.nav2) 343 self._qnh.set_text("%.0f" % (aircraftState.qnh,)) 338 344 339 345 fuelStr = "" -
src/mlx/pyuipc_sim.py
r390 r408 281 281 282 282 self.altimeter = 1013.0 283 self.qnh = 1011.2 283 284 284 285 self.nav1 = 117.3 … … 501 502 elif offset==0x0e92: # Wind direction 502 503 return int(self.windDirection * 65536.0 / 360.0) 504 elif offset==0x0ec6: # QNH 505 return int(self.qnh * 16.0) 503 506 elif offset==0x11ba: # G-Load 504 507 return int(self.gLoad * 625.0) … … 761 764 elif offset==0x0e92: # Wind direction 762 765 self.windDirection = value * 360.0 / 65536.0 766 elif offset==0x0ec6: # QNH 767 self.qnh = value / 16.0 763 768 elif offset==0x11ba: # G-Load 764 769 self.gLoad = value / 625.0 … … 1297 1302 lambda value: value, 1298 1303 lambda word: int(word)) 1299 self._valueHandlers["qnh"] = ([(0x0330, "H")], 1304 self._valueHandlers["altimeter"] = ([(0x0330, "H")], 1305 lambda value: value / 16.0, 1306 lambda word: int(float(word)*16.0)) 1307 self._valueHandlers["qnh"] = ([(0x0ec6, "H")], 1300 1308 lambda value: value / 16.0, 1301 1309 lambda word: int(float(word)*16.0))
Note:
See TracChangeset
for help on using the changeset viewer.