mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-23 21:36:28 +08:00
GVF python app now accepted ac_id as argument (#1941)
This commit is contained in:
committed by
Gautier Hattenberger
parent
9fa7da81d3
commit
b6c134a856
@@ -1,17 +1,27 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
import wx
|
||||
import gvfframe
|
||||
|
||||
class MessagesApp(wx.App):
|
||||
def __init__(self, wtf, ac_id):
|
||||
self.ac_id = ac_id
|
||||
wx.App.__init__(self, wtf)
|
||||
|
||||
def OnInit(self):
|
||||
self.main = gvfframe.GVFFrame()
|
||||
self.main = gvfframe.GVFFrame(self.ac_id)
|
||||
|
||||
self.main.Show()
|
||||
self.SetTopWindow(self.main)
|
||||
return True
|
||||
|
||||
def main():
|
||||
application = MessagesApp(0)
|
||||
if len(sys.argv) != 2:
|
||||
print "Usage: gvfFormationApp id_aircraft"
|
||||
return
|
||||
id_ac = int(sys.argv[1])
|
||||
application = MessagesApp(0, id_ac)
|
||||
application.MainLoop()
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
@@ -21,7 +21,7 @@ WIDTH = 800
|
||||
HEIGHT = 800
|
||||
|
||||
class GVFFrame(wx.Frame):
|
||||
def __init__(self, ac_id=3):
|
||||
def __init__(self, ac_id):
|
||||
|
||||
wx.Frame.__init__(self, id=-1, parent=None, \
|
||||
name=u'GVF', size=wx.Size(WIDTH, HEIGHT), \
|
||||
|
||||
Reference in New Issue
Block a user