# Path: MAVProxy/modules/lib/mp_util.py
# def wrap_360(angle):
# def wrap_180(angle):
# def gps_distance(lat1, lon1, lat2, lon2):
# def gps_bearing(lat1, lon1, lat2, lon2):
# def wrap_valid_longitude(lon):
# def constrain(v, minv, maxv):
# def constrain_latlon(latlon):
# def gps_newpos(lat, lon, bearing, distance):
# def gps_offset(lat, lon, east, north):
# def mkdir_p(dir):
# def polygon_load(filename):
# def polygon_bounds(points):
# def bounds_overlap(bound1, bound2):
#     def __init__(self, object, debug=False):
# def degrees_to_dms(degrees):
#     def __init__(self, zone, easting, northing, hemisphere='S'):
#     def __str__(self):
#     def latlon(self):
# def latlon_to_grid(latlon):
# def latlon_round(latlon, spacing=1000):
# def wxToPIL(wimg):
# def PILTowx(pimg):
# def dot_mavproxy(name=None):
# def download_url(url):
# def download_files(files):
# def child_close_fds():
# def child_fd_list_add(fd):
# def child_fd_list_remove(fd):
# def quaternion_to_axis_angle(q):
# def null_term(str):
# def decode_devid(devid, pname):
# def decode_flight_sw_version(flight_sw_version):
# class object_container:
# class UTMGrid:
# 
# Path: MAVProxy/modules/lib/multiproc.py
# class PipeQueue(object):
#     def __init__(self):
#     def close(self):
#     def put(self, *args):
#     def fill(self):
#     def get(self):
#     def qsize(self):
#     def empty(self):


from MAVProxy.modules.lib import mp_util
from MAVProxy.modules.lib import multiproc
        from MAVProxy.modules.lib.wx_loader import wx
        from MAVProxy.modules.lib.wx_loader import wx
        from MAVProxy.modules.lib.wx_loader import wx
        from MAVProxy.modules.lib.wx_loader import wx
        from MAVProxy.modules.lib.wx_loader import wx
        from MAVProxy.modules.lib import wx_processguard
        from MAVProxy.modules.lib.wx_loader import wx
        from wx.lib.agw.genericmessagedialog import GenericMessageDialog
    from MAVProxy.modules.lib.mp_image import MPImage
import platform
        import webbrowser
    import time
        else:
            dlg = wx.FileDialog(None, self.title, '', "", self.wildcard, flagsMapped[0]|flagsMapped[1])
        if dlg.ShowModal() != wx.ID_OK:
            return None
        return "\"" + dlg.GetPath() + "\""

class MPMenuCallTextDialog(object):
    '''used to create a value dialog callback'''
    def __init__(self, title='Enter Value', default=''):
        self.title = title
        self.default = default

    def call(self):
        '''show a value dialog'''
        try:
            dlg = wx.TextEntryDialog(None, self.title, self.title, defaultValue=str(self.default))
        except TypeError:
            dlg = wx.TextEntryDialog(None, self.title, self.title, value=str(self.default))
        if dlg.ShowModal() != wx.ID_OK:
            return None
        return dlg.GetValue()

class MPMenuChildMessageDialog(object):
    '''used to create a message dialog in a child process'''
    def __init__(self, title='Information', message='', font_size=18):
        self.title = title
        self.message = message
        self.font_size = font_size

    def show(self):

# Path: MAVProxy/modules/lib/mp_util.py
# def wrap_360(angle):
# def wrap_180(angle):
# def gps_distance(lat1, lon1, lat2, lon2):
# def gps_bearing(lat1, lon1, lat2, lon2):
# def wrap_valid_longitude(lon):
# def constrain(v, minv, maxv):
# def constrain_latlon(latlon):
# def gps_newpos(lat, lon, bearing, distance):
# def gps_offset(lat, lon, east, north):
# def mkdir_p(dir):
# def polygon_load(filename):
# def polygon_bounds(points):
# def bounds_overlap(bound1, bound2):
#     def __init__(self, object, debug=False):
# def degrees_to_dms(degrees):
#     def __init__(self, zone, easting, northing, hemisphere='S'):
#     def __str__(self):
#     def latlon(self):
# def latlon_to_grid(latlon):
# def latlon_round(latlon, spacing=1000):
# def wxToPIL(wimg):
# def PILTowx(pimg):
# def dot_mavproxy(name=None):
# def download_url(url):
# def download_files(files):
# def child_close_fds():
# def child_fd_list_add(fd):
# def child_fd_list_remove(fd):
# def quaternion_to_axis_angle(q):
# def null_term(str):
# def decode_devid(devid, pname):
# def decode_flight_sw_version(flight_sw_version):
# class object_container:
# class UTMGrid:
# 
# Path: MAVProxy/modules/lib/multiproc.py
# class PipeQueue(object):
#     def __init__(self):
#     def close(self):
#     def put(self, *args):
#     def fill(self):
#     def get(self):
#     def qsize(self):
#     def empty(self):


# Path: MAVProxy/modules/lib/mp_menu.py
from MAVProxy.modules.lib import mp_util
from MAVProxy.modules.lib import multiproc
        from MAVProxy.modules.lib.wx_loader import wx
        from MAVProxy.modules.lib.wx_loader import wx
        from MAVProxy.modules.lib.wx_loader import wx
        from MAVProxy.modules.lib.wx_loader import wx
        from MAVProxy.modules.lib.wx_loader import wx
        from MAVProxy.modules.lib import wx_processguard
        from MAVProxy.modules.lib.wx_loader import wx
        from wx.lib.agw.genericmessagedialog import GenericMessageDialog
    from MAVProxy.modules.lib.mp_image import MPImage
import platform
        import webbrowser
    import time

        else:
            dlg = wx.FileDialog(None, self.title, '', "", self.wildcard, flagsMapped[0]|flagsMapped[1])
        if dlg.ShowModal() != wx.ID_OK:
            return None
        return "\"" + dlg.GetPath() + "\""

class MPMenuCallTextDialog(object):
    '''used to create a value dialog callback'''
    def __init__(self, title='Enter Value', default=''):
        self.title = title
        self.default = default

    def call(self):
        '''show a value dialog'''
        try:
            dlg = wx.TextEntryDialog(None, self.title, self.title, defaultValue=str(self.default))
        except TypeError:
            dlg = wx.TextEntryDialog(None, self.title, self.title, value=str(self.default))
        if dlg.ShowModal() != wx.ID_OK:
            return None
        return dlg.GetValue()

class MPMenuChildMessageDialog(object):
    '''used to create a message dialog in a child process'''
    def __init__(self, title='Information', message='', font_size=18):
        self.title = title
        self.message = message
        self.font_size = font_size

    def show(self):

        t = multiproc.Process(target=self.call)