Ejemplo n.º 1
0
 def __init__(self, class_name, name):
     messages_xml_map.parse_messages()
     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
Ejemplo n.º 2
0
def main():
    messages_xml_map.parse_messages()
    #Command line options
    parser = argparse.ArgumentParser(description="Listens to telemetry data to output nmea data on the specified port.")
    parser.add_argument("-d", "-device", "--device", help="Port. The serial port/device to output nmea data on.", default="/dev/ttyUSB0")
    args = parser.parse_args()
    global SERIAL_PORT
    SERIAL_PORT = args.device
    runner = Runner() 
Ejemplo n.º 3
0
def test():
    import argparse
    parser = argparse.ArgumentParser()
    parser.add_argument("-f", "--file", help="path to messages.xml file")
    parser.add_argument("-c", "--class", help="message class", dest="msg_class", default="telemetry")
    args = parser.parse_args()
    messages_xml_map.parse_messages(args.file)
    messages = [PprzMessage(args.msg_class, n) for n in messages_xml_map.get_msgs(args.msg_class)]
    print("Listing %i messages in '%s' msg_class" % (len(messages), args.msg_class))
    for msg in messages:
        print(msg)
Ejemplo n.º 4
0
def test():
    import argparse

    parser = argparse.ArgumentParser()
    parser.add_argument("-f", "--file", help="path to messages.xml file")
    parser.add_argument("-c", "--class", help="message class", dest="msg_class", default="telemetry")
    args = parser.parse_args()
    messages_xml_map.parse_messages(args.file)
    messages = [PprzMessage(args.msg_class, n) for n in messages_xml_map.get_msgs(args.msg_class)]
    print("Listing %i messages in '%s' msg_class" % (len(messages), args.msg_class))
    for msg in messages:
        print(msg)