Example #1
0
    def __init__(self, parent, frame):
        self.parent = parent  # we are drawing on our parent, so dc comes from this
        self.frame = frame  # the frame owns any controls we might need to update

        parent.SetDropTarget(TextDropTarget(
            self))  # calls self.OnDropText when drag and drop complete
        self.InitIvy()

        self.width = 800
        self.height = 200
        self.margin = min(self.height / 10, 20)
        self.font = wx.Font(self.margin / 2, wx.DEFAULT, wx.FONTFLAG_DEFAULT,
                            wx.FONTWEIGHT_NORMAL)
        self.pixmap = wx.EmptyBitmap(self.width, self.height)
        self.plot_size = self.width
        self.max = -1e32
        self.min = 1e32
        self.plot_interval = 200
        self.plots = {}
        self.auto_scale = True
        self.offset = 0.0
        self.scale = 1.0
        self.x_axis = None

        messages_xml_map.ParseMessages()

        # start the timer
        self.timer = wx.FutureCall(self.plot_interval, self.OnTimer)
Example #2
0
def main():
    messages_xml_map.ParseMessages()

    #Command line options
    parser = argparse.ArgumentParser(
        description=
        "Link_Combiner listens to the ivy messages received from multiple Link agents (set each of their -id options to a unique number), and sends a combined stream of messages to the other agents."
    )
    parser.add_argument(
        "-b",
        "-buffer_size",
        "--buffer_size",
        help=
        "The number of elements messages to be stored in the circular buffer for each link",
        default=10)
    parser.add_argument(
        "-t",
        "-link_status_period",
        "--link_status_period",
        help=
        "The number of miliseconds in between LINK_STATUS messages being sent to the GCS",
        default=1000)
    args = parser.parse_args()

    global BUFFER_SIZE
    global LINK_STATUS_PERIOD
    BUFFER_SIZE = int(
        args.buffer_size
    )  #The number of elements messages to be stored in the circular buffer for each link.
    LINK_STATUS_PERIOD = float(
        args.link_status_period
    ) / 1000  #The number of seconds in between LINK_STATUS messages being sent to the GCS.

    link_combiner = Link_Combiner()
Example #3
0
 def __init__(self, class_name, name):
     messages_xml_map.ParseMessages()
     self.field_value = []
     self.field_names = messages_xml_map.message_dictionary[class_name][name]
     self.field_controls = []
     self.index = None
     self.last_seen = time.clock()
     self.name = name
Example #4
0
    def __init__(self):
      messages_xml_map.ParseMessages()
      self.data_types = { 'float' : ['f', 4],
			  'uint8' : ['B', 1],
			  'uint16' : ['H', 2],
			  'uint32' : ['L', 4],
			  'int8' : ['b', 1],
			  'int16' : ['h', 2],
			  'int32' : ['l', 4]
			 }
Example #5
0
    def __init__(self):
      self.InitIvy()
      self.status_timer = threading.Timer(STATUS_PERIOD, self.sendStatus)
      self.ping_timer = threading.Timer(STATUS_PERIOD, self.sendPing)
      self.ac_downlink_status = { }
      self.rx_err = 0

      messages_xml_map.ParseMessages()
      self.data_types = { 'float' : ['f', 4],
                          'uint8' : ['B', 1],
                          'uint16' : ['H', 2],
                          'uint32' : ['L', 4],
                          'int8' : ['b', 1],
                          'int16' : ['h', 2],
                          'int32' : ['l', 4]
                         }
Example #6
0
def main():
    messages_xml_map.ParseMessages()

    #Command line options
    parser = argparse.ArgumentParser(
        description=
        "Link_Combiner listens to the ivy messages received from multiple Link agents (set each of their -id options to a unique number), and sends a combined stream of messages to the other agents."
    )
    parser.add_argument(
        "-b",
        "-buffer_size",
        "--buffer_size",
        help=
        "The number of elements messages to be stored in the circular buffer for each link",
        default=10)
    args = parser.parse_args()

    global BUFFER_SIZE
    BUFFER_SIZE = int(
        args.buffer_size
    )  #The number of elements messages to be stored in the circular buffer for each link.

    link_combiner = Link_Combiner()