Patched AC and Fligtplans to be compatible with latest XML syntax

This commit is contained in:
Open UAS
2017-05-30 07:50:54 +02:00
committed by Developer
parent c2e44e80cc
commit 66fd00255b
11 changed files with 137 additions and 33 deletions
+1 -1
View File
@@ -213,7 +213,7 @@ static void send_fbw_status(struct transport_tx *trans, struct link_device *dev)
void link_mcu_init(void)
{
ppz_can_init(link_mcu_on_can_msg);
ppz_can_init((can_rx_callback_t)link_mcu_on_can_msg);
#ifdef AP
#if PERIODIC_TELEMETRY
+3 -3
View File
@@ -95,15 +95,15 @@ let check_altitude_srtm = fun a x wgs84 ->
Srtm.add_path (Env.paparazzi_home ^ "/data/srtm");
try
let srtm_alt = float (Srtm.of_wgs84 wgs84) in
if a < srtm_alt then begin
fprintf stderr "\nMAJOR WARNING: below SRTM ground altitude (%.0f<%.0f) in %s\n" a srtm_alt (Xml.to_string x)
if a < srtm_alt then begin (* Not fully correct, Flightplan "alt" is not alt as we know it *)
fprintf stderr "MAJOR NOTICE: below SRTM ground altitude (%.0f<%.0f) in %s\n" a srtm_alt (Xml.to_string x)
end
with Srtm.Tile_not_found e ->
fprintf stderr "No SRTM data found to check altitude.\n"
let check_altitude = fun a x ->
if a < !ground_alt +. !security_height then begin
fprintf stderr "\nWarning: low altitude (%.0f<%.0f+%.0f) in %s\n\n" a !ground_alt !security_height (Xml.to_string x)
fprintf stderr "\nNOTICE: low altitude (%.0f<%.0f+%.0f) in %s\n\n" a !ground_alt !security_height (Xml.to_string x)
end