[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paparazzi-commits] [4238] fix bug when "step" attribute is missing in s
From: |
Pascal Brisset |
Subject: |
[paparazzi-commits] [4238] fix bug when "step" attribute is missing in setting. |
Date: |
Thu, 08 Oct 2009 07:04:14 +0000 |
Revision: 4238
http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=4238
Author: hecto
Date: 2009-10-08 07:04:13 +0000 (Thu, 08 Oct 2009)
Log Message:
-----------
fix bug when "step" attribute is missing in setting. Warning issued and
default to 1
Modified Paths:
--------------
paparazzi3/trunk/sw/ground_segment/cockpit/page_settings.ml
Modified: paparazzi3/trunk/sw/ground_segment/cockpit/page_settings.ml
===================================================================
--- paparazzi3/trunk/sw/ground_segment/cockpit/page_settings.ml 2009-10-07
19:34:55 UTC (rev 4237)
+++ paparazzi3/trunk/sw/ground_segment/cockpit/page_settings.ml 2009-10-08
07:04:13 UTC (rev 4238)
@@ -70,9 +70,13 @@
let f = fun a -> float_of_string (ExtXml.attrib dl_setting a) in
let lower = f "min"
and upper = f "max"
- and step_incr = f "step"
- and page_incr = f "step"
- and page_size = f "step"
+ and step_incr =
+ try f "step" with _ ->
+ fprintf stderr "Warning: 'step' attribute missing in '%s' setting.
Default to 1\n%!" (Xml.to_string dl_setting);
+ 1.
+ in
+ let page_incr = step_incr
+ and page_size = step_incr
and show_auto = try ExtXml.attrib dl_setting "auto" = "true" with _ -> false
in
let auc = try Xml.attrib dl_setting "alt_unit_coef" with _ -> "" in
let (alt_a, alt_b) = Ocaml_tools.affine_transform auc in
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paparazzi-commits] [4238] fix bug when "step" attribute is missing in setting.,
Pascal Brisset <=