mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-22 12:28:03 +08:00
[plot] fix loading of logs with strings that are not representing a float
This commit is contained in:
@@ -512,8 +512,8 @@ let pprz_float = function
|
||||
| Pprz.Float f -> f
|
||||
| Pprz.Int32 i -> Int32.to_float i
|
||||
| Pprz.Int64 i -> Int64.to_float i
|
||||
| Pprz.String s -> float_of_string s
|
||||
| Pprz.Char c -> float_of_string (String.make 1 c)
|
||||
| Pprz.String s -> let v = try float_of_string s with _ -> 0. in v
|
||||
| Pprz.Char c -> let v = try float_of_string (String.make 1 c) with _ -> 0. in v
|
||||
| Pprz.Array _ -> 0.
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user