Page 2 of 2

Re: YSFlight Radar Refresh

Posted: Tue Sep 20, 2016 10:38 pm
by decaff_42
Question on line 371 in the gui.py, why did you make the rework comment? There are a whole bunch of menu options that I simply did not code in because I didn't get to them, so they do nothing.

Code: Select all

filemenu.add_command(label="Open Map Config File",command=self.OpenConfigFile) #u2fly: Need rework!
In YSFlightRadar.py I recommend changing line 8 for grammar to this:

Code: Select all

print('YSFlight ATC Radar running...','\nCredits:',__author__,'\nVersion:',__version__,'('+__date__+')')

I'd also recommend using classes for each instance of an aircraft and also using it to help draw the aircraft on the scope.
Here is a start:

Code: Select all

class Aircraft():
    def __init__(self, lat, long, altitude, username, AC_Type, heading, speed):
        self.lat = lat  # North-South position of aircraft (meters) [NUMBER]
        self.long = long    # East-West position of aircrage (meters) [NUMBER]
        self.alt = altitude    # Altitude of aircraft (feet) [NUMBER]
        self.name = username    # username of player [STRING]
        self.AC_Type = AC_Type  # Name of aircraft from dat file [STRING]
        self.heading = heading  # Compass heading of aircraft (degrees) [NUMBER]
        self.speed = speed      # Aircraft True Air Speed (knots) [NUMBER]

    def Update(lat,long,altitude,AC_Type,heading,speed):
        # This function will update the aircraft's parameters
        self.lat = lat
        self.long = long
        self.alt = altitude
        self.AC_Type = AC_Type      # Needed in case the user switches airplanes
        self.heading = heading
        self.speed = speed

Re: YSFlight Radar Refresh

Posted: Wed Sep 21, 2016 8:42 am
by u2fly
decaff_42 wrote:Question on line 371 in the gui.py, why did you make the rework comment? There are a whole bunch of menu options that I simply did not code in because I didn't get to them, so they do nothing.

Code: Select all

filemenu.add_command(label="Open Map Config File",command=self.OpenConfigFile) #u2fly: Need rework!
Think, I add this comment before I define "OpenConfigFile". Now I will remove this comment.

Thanks for the other ideas, try implement them in next preview release, but need deeper learn Python 3.4 by myself.

If your platform is MacOS or Windows can your test current version and give console output?

Re: YSFlight Radar Refresh

Posted: Wed Sep 21, 2016 11:17 am
by decaff_42

Code: Select all

YSFlight ATC Radar running... 
Credits: Decaff_42, u2fly 
Version: 0.2 (Sep 20, 2016)
Platform: Darwin (WHAT IS IT?) 
Python: 3.4.2 (TESTED OK)

Re: YSFlight Radar Refresh

Posted: Thu Sep 22, 2016 8:46 pm
by u2fly
decaff_42 wrote:

Code: Select all

YSFlight ATC Radar running... 
Credits: Decaff_42, u2fly 
Version: 0.2 (Sep 20, 2016)
Platform: Darwin (WHAT IS IT?) 
Python: 3.4.2 (TESTED OK)
Thanks, need fix MacOS identifier.

I have a question about application icon: how use GIF as application icon in "gui.py" using next trick? I want use GIF as alternative to ICO and XBM, because last two are not crossplatform formats.