[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Paparazzi-devel] Adding type "double" to gen_messages.ml
From: |
Pascal Brisset |
Subject: |
Re: [Paparazzi-devel] Adding type "double" to gen_messages.ml |
Date: |
Fri, 31 Oct 2008 17:20:50 +0100 |
User-agent: |
Icedove 1.5.0.14eol (X11/20080724) |
Hi,
I tried to clarify the code in gen_messages.ml . To add a "double" type,
you will have to
- in sw/lib/ocaml/pprz.ml:
- add a case in the "value" type (line 37). The float type of OCaml
actually is a double, so "Double of float" will work
- add an entry in the "types" list (line 84)
- handle this new type in all the functions of the file (the compiler
will help, issuing some warning when the "Double" case is missing)
- in gen_messages.ml:
- add a "8" case for the size of the value (197)
Let me know if you think it could be profitable to the community: I
would do it and commit it to the CVS. By the way, did you check that
double values are correctly handled by the ARM7 C library ?
--Pascal
Andre Devitt wrote:
Anyone have much experience with ocaml? I'm trying to add a type
"double" to the message specification and the language is a bit
non-intuitive to me.
Any pointers are greatly appreciated.
Thanks,
ANdre
_______________________________________________
Paparazzi-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/paparazzi-devel