mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-26 16:30:07 +08:00
[tools] gen_messages_doc.py: use messages.xml from pprzlink by default
and var/messages.xml for things when it's actually built
This commit is contained in:
@@ -186,7 +186,7 @@ void decode_and_send_to_ivy() {
|
||||
if (want_alive_msg)
|
||||
IvySendMsg("%d ALIVE 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\n", ac_id);
|
||||
|
||||
// format has to match declaration in conf/messages.xml
|
||||
// format has to match declaration in var/messages.xml
|
||||
IvySendMsg("%d WEATHER %f %f %f %f %f\n",
|
||||
ac_id, pstatic_Pa, temp_degC, windspeed_mps, winddir_deg, rel_humidity);
|
||||
}
|
||||
|
||||
@@ -362,7 +362,7 @@ void decode_and_send_to_ivy() {
|
||||
rel_humidity = values[RH];
|
||||
}
|
||||
|
||||
// format has to match declaration in conf/messages.xml
|
||||
// format has to match declaration in var/messages.xml
|
||||
IvySendMsg("%d WEATHER %f %f %f %f %f\n",
|
||||
ac_id, pstatic_Pa, temp_degC, windspeed_mps, winddir_deg, rel_humidity);
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ if __name__ == '__main__':
|
||||
usage = "Usage: %prog [options]" + "\n" + "Run %prog --help to list the options."
|
||||
parser = OptionParser(usage)
|
||||
parser.add_option("-f", "--file", dest="file",
|
||||
help="messages file to read [default: PAPARAZZI_HOME/conf/messages.xml]", metavar="MESSAGES.XML")
|
||||
help="messages file to read [default: PAPARAZZI_HOME/sw/ext/pprzlink/message_definitions/v1.0/messages.xml]", metavar="MESSAGES.XML")
|
||||
parser.add_option("-o", "--outputdir", dest="output_dir",
|
||||
help="write output to DIR [default: PAPARAZZI_HOME/doc/manual/generated]", metavar="DIR")
|
||||
parser.add_option("-p", "--parents",
|
||||
@@ -112,7 +112,7 @@ if __name__ == '__main__':
|
||||
if options.file:
|
||||
messages_file = options.file
|
||||
else:
|
||||
messages_file = os.path.join(paparazzi_home, "conf/messages.xml")
|
||||
messages_file = os.path.join(paparazzi_home, "sw/ext/pprzlink/message_definitions/v1.0/messages.xml")
|
||||
if not os.path.isfile(messages_file):
|
||||
print("Messages file " + messages_file + " not found.")
|
||||
sys.exit(1)
|
||||
|
||||
@@ -38,7 +38,7 @@ class Server(ivy.IvyServer):
|
||||
print("server listening on {:d}".format(tcp_port))
|
||||
|
||||
self.transp = phoenix.pprz_transport.Transport(check_crc=False, debug=False)
|
||||
self.protocol = phoenix.messages.Protocol(path=path.join(home_dir, "conf/messages.xml"), debug=True)
|
||||
self.protocol = phoenix.messages.Protocol(path=path.join(home_dir, "var/messages.xml"), debug=True)
|
||||
self.start(bus)
|
||||
|
||||
GObject.timeout_add(500, self.periodic, priority=GObject.PRIORITY_HIGH)
|
||||
|
||||
Reference in New Issue
Block a user