GVF python app now accepted ac_id as argument (#1941)

This commit is contained in:
Hector Garcia de Marina
2016-11-06 11:17:11 +01:00
committed by Gautier Hattenberger
parent 9fa7da81d3
commit b6c134a856
2 changed files with 13 additions and 3 deletions
+12 -2
View File
@@ -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__':
+1 -1
View File
@@ -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), \