mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-19 10:34:28 +08:00
small fix to avoid warning when runing replay session
This commit is contained in:
@@ -549,7 +549,10 @@ let create_ac = fun alert (geomap:G.widget) (acs_notebook:GPack.notebook) (ac_id
|
||||
let settings_file = Http.file_of_url settings_url in
|
||||
let settings_xml =
|
||||
try
|
||||
ExtXml.parse_file ~noprovedtd:true settings_file
|
||||
if String.compare "replay" settings_file <> 0 then
|
||||
ExtXml.parse_file ~noprovedtd:true settings_file
|
||||
else
|
||||
Xml.Element("empty", [], [])
|
||||
with exc ->
|
||||
prerr_endline (Printexc.to_string exc);
|
||||
Xml.Element("empty", [], [])
|
||||
|
||||
@@ -590,7 +590,8 @@ let send_config = fun http _asker args ->
|
||||
let fp = prefix ("var" // ac_name // "flight_plan.xml")
|
||||
and af = prefix ("conf" // ExtXml.attrib conf "airframe")
|
||||
and rc = prefix ("conf" // ExtXml.attrib conf "radio")
|
||||
and settings = prefix ("var" // ac_name // "settings.xml") in
|
||||
and settings = if not _is_replayed then prefix ("var" // ac_name //
|
||||
"settings.xml") else "file://replay" in
|
||||
let col = try Xml.attrib conf "gui_color" with _ -> new_color () in
|
||||
let ac_name = try Xml.attrib conf "name" with _ -> "" in
|
||||
[ "ac_id", Pprz.String ac_id;
|
||||
|
||||
Reference in New Issue
Block a user