paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] Paparazzi-devel Digest, Vol 110, Issue 46


From: Felix Ruess
Subject: Re: [Paparazzi-devel] Paparazzi-devel Digest, Vol 110, Issue 46
Date: Fri, 31 May 2013 13:20:47 +0200

Only the generated ones of course.


On Fri, May 31, 2013 at 1:13 PM, Refik Sever <address@hidden> wrote:
Hi Felix,

I saw your first message after sending the mail. I will try to run make.  I think that we need to add this (run make) to telemetry page of wiki.

If I run make, which files will be affected? For example, I changed digital_cam_i2c.c file. Will it reset to the original one, or will only the generated files be affected?

Cheers,
Refik


Message: 1
Date: Fri, 31 May 2013 12:49:26 +0200
From: Felix Ruess <address@hidden>
To: Paparazzi devel list <address@hidden>
Subject: Re: [Paparazzi-devel] adding a telemetry message
Message-ID:
        <address@hidden>
Content-Type: text/plain; charset="utf-8"

Again: don't edit var/include/messages.h as that file is generated from
messages.xml when you run make!


On Fri, May 31, 2013 at 12:28 PM, Refik Sever <address@hidden>wrote:

>  Hello,
>
> I saw the problem. Now I can take the message succesfully.
>
> I may write the additional explanations to update wiki and send it to the
> guy who updates the wiki.
>
> I added these to messages.h file: I forgat to change ATTITUDE to
> IVMEOLCER, that is why I could not see the message.
>
>
> #define DOWNLINK_SEND_IVMEOLCER(_trans, _dev, phi, psi, theta){ \
>     if (DownlinkCheckFreeSpace(_trans, _dev, DownlinkSizeOf(_trans, _dev,
> 0+4+4+4))) {\
>       DownlinkCountBytes(_trans, _dev, DownlinkSizeOf(_trans, _dev,
> 0+4+4+4)); \
>       DownlinkStartMessage(_trans, _dev, "ATTITUDE", DL_ATTITUDE, 0+4+4+4)
> \
>       DownlinkPutFloatByAddr(_trans, _dev, (phi)); \
>       DownlinkPutFloatByAddr(_trans, _dev, (psi)); \
>       DownlinkPutFloatByAddr(_trans, _dev, (theta)); \
>       DownlinkEndMessage(_trans, _dev ) \
>     } else \
>       DownlinkOverrun(_trans, _dev ); \
> }
>
> I also added these to the same messages.h:
>
> #define DL_IVMEOLCER 5
>
> #define DL_IVMEOLCER_phi(_payload) (({ union { uint32_t u; float f; } _f;
> _f.u =
> (uint32_t)(*((uint8_t*)_payload+2)|*((uint8_t*)_payload+2+1)<<8|((uint32_t)*((uint8_t*)_payload+2+2))<<16|((uint32_t)*((uint8_t*)_payload+2+3))<<24);
> _f.f; }))
> #define DL_IVMEOLCER_psi(_payload) (({ union { uint32_t u; float f; } _f;
> _f.u =
> (uint32_t)(*((uint8_t*)_payload+6)|*((uint8_t*)_payload+6+1)<<8|((uint32_t)*((uint8_t*)_payload+6+2))<<16|((uint32_t)*((uint8_t*)_payload+6+3))<<24);
> _f.f; }))
> #define DL_IVMEOLCER_theta(_payload) (({ union { uint32_t u; float f; }
> _f; _f.u =
> (uint32_t)(*((uint8_t*)_payload+10)|*((uint8_t*)_payload+10+1)<<8|((uint32_t)*((uint8_t*)_payload+10+2))<<16|((uint32_t)*((uint8_t*)_payload+10+3))<<24);
> _f.f; }))
>
> As a last thing, I added (2+0+4+4+4) to the line below: But I am not sure
> about it, I did it by trying. I suspect if some other messages affected or
> not.
>
> #define MSG_telemetry_LENGTHS
> {0,(2+0+2),(2+0+1+nb_md5sum*1),(2+0),(2+0+2),0,(2+0+4+4+4),(2+0+4+4+4),(2+0+2+2+2+2+2),(2+0+1+4+4+2+4+2+2+2+4+1+1),(2+0+4
>
> Cheers,
> Refik
>
>
>  ------------------------------
> *Kimden:* Refik Sever
> *G?nderildi:* 31 May?s 2013 Cuma 13:02
> *Kime:* address@hidden
> *Konu:* Re: [Paparazzi-devel] adding a telemetry message
>
>   Hello,
>
>
>  I found the error in build. DOWNLINK_SEND_IVMEOLCER is not defined.
> Therefore, I added these lines to var/include/messages.h file.  It was
> not written in the wiki, we must add it.
>
>
>  #define DOWNLINK_SEND_IVMEOLCER(_trans, _dev, phi, psi, theta){ \
>     if (DownlinkCheckFreeSpace(_trans, _dev, DownlinkSizeOf(_trans, _dev,
> 0+4+4+4))) {\
>       DownlinkCountBytes(_trans, _dev, DownlinkSizeOf(_trans, _dev,
> 0+4+4+4)); \
>       DownlinkStartMessage(_trans, _dev, "ATTITUDE", DL_ATTITUDE, 0+4+4+4)
> \
>       DownlinkPutFloatByAddr(_trans, _dev, (phi)); \
>       DownlinkPutFloatByAddr(_trans, _dev, (psi)); \
>       DownlinkPutFloatByAddr(_trans, _dev, (theta)); \
>       DownlinkEndMessage(_trans, _dev ) \
>     } else \
>       DownlinkOverrun(_trans, _dev ); \
> }
>
>
>  Now it builds succesfully, but when I started GCS and messages tool, I
> can not see IVMEOLCER message in the list. I think that I must change or
> add something more. In the var/include/messages.h file, there is a define
> of MSG_telemetry_LENGTHS. I think that I must also update this section,
> but I don't know how.
>
>
>  Could you please send suggestions about adding IVMEOLCER message?
>
>
>  Cheers,
>
> Refik
>
>
>
>  #define MSG_telemetry_LENGTHS
> {0,(2+0+2),(2+0+1+nb_md5sum*1),(2+0),(2+0+2),0,(2+0+4+4+4),(2+0+2+2+2+2+2),(2+0+1+4+4+2+4+2+2+2+4+1+1),(2+0+4+4+1),(2+0+1+1+4+4+4+4+1+1),(2+0+1+1+1+1+1+1),(2+0+2+2+2+2+1+2+2+2),(2+0+1+1+1),(2+0+4+1),(2+0+4+4),(2+0+4+4+4+4+4+4+4+4),(2+0+4+4+2+1),(2+0+2+2),(2+0+8+4),(2+0+2+2+2+2),(2+0+4+4+4),(2+0+4+4+4+4),(2+0+4+4+4+4+4+4+4),(2+0+1+4+1+4+4+4),(2+0+1+1+1+1+1+1+2),(2+0+1+nb_msg*1),(2+0+4+4+4+4),(2+0+1),(2+0+2+4+4+4+4+4+1),(2+0+1+2+2),(2+0+1+4),(2+0+1+4+4),(2+0+2+2+2+2+2+1),(2+0+2+4),(2+0+1+4+4+4+1),(2+0+1+1+1+1),(2+0+4+4+2+4),(2+0+2+2+2+2+2+2+2+2+2+2+2),(2+0+4+4+4+4+4),(2+0+4+4+4+4+4+4),(2+0+4+4+4+4),(2+0+4+4),(2+0+4+4+4),(2+0+4+2+4),(2+0+4+4+4+4),(2+0+2+2+2+2),(2+0+1+4+4+4),(2+0+1+4),(2+0+1+4+4+4),(2+0+1+1+4+4),(2+0+1+1+1),(2+0+1+nb_values*2),(2+0+2+2+2),(2+0+4+4+4+4),(2+0+2+4+4+4+4+4+4+4+4+4+4+4+4+4+4+4+1+1+1+1+4+2+1+1),(2+0+2+2+4),(2+0+2+2+4),(2+0+2+2+4+4+2+2),(2+0+4+4+4+2+2+2+2+4+1+1),(2+0+4+4+4+4),(2+0+4+4+4+4+4+4+4+4+4+4+4+4+4+4+4+4),(2+0+4+4+4+4+4+4+4+4+4+4+4+4+4+4+4+4),(2+0+2+4+4),(2+0+2+4+4+4+2+4+4+4+4+4+4+4+2+1),(2+0+2+4+4+4+4+4+4),(2+0+2+4+4+4+4),(2+0+4+4+4+4+4+4),(2+0+4+2+4),(2+0+2+4),(2+0+2+1+1),0,0,0,0,0,(2+0+4+4),(2+0+4),0,0,(2+0+4+4),(2+0+4+4
>
>
>
>
> >On Mon, May 27, 2013 at 6:13 AM, Refik Sever <address@hidden> wrote:
> >Hello,
> >
> >I am trying to add a telemetry message. I followed the commands in the
> wiki:
> >
> >1. I added this line to default_fixedwing_imu.xml file:
> >
> ><?xml version="1.0"?>
> ><!DOCTYPE telemetry SYSTEM "telemetry.dtd">
> ><telemetry>
> >  <process name="Ap">
> >    <mode name="default">
> >      <message name="AIRSPEED"            period="1"/>
> >       <message name="ALIVE"               period="5"/>
> >       <message name="GPS"                 period="0.25"/>
> >      <message name="NAVIGATION"          period="1."/>
> >      <message name="IVMEOLCER"           period="0.2"/>
> >
> > 2. I added these lines to ap_downlink.h file:
> >
> >#define PERIODIC_SEND_IVMEOLCER(_trans, _dev) Downlink({ \
> >    struct FloatEulers* att = stateGetNedToBodyEulers_f(); \
>   >   DOWNLINK_SEND_IVMEOLCER(_trans, _dev, &(att->phi), &(att->psi),
> &(att->theta)); \
> >})
>
> > 3. I added these lines to messages.xml file:
>
> >  <message name="IVMEOLCER" id="5">
> >     <field name="phi"   type="float" unit="rad" alt_unit="deg"/>
> >     <field name="psi"   type="float" unit="rad" alt_unit="deg"/>
> >     <field name="theta" type="float" unit="rad" alt_unit="deg"/>
> >   </message>
> >
> > However, while building it gives this error:
>
> > firmwares/fixedwing/main_ap.c:410:5: warning: implicit declaration of
> function >'DOWNLINK_SEND_IVMEOLCER' [-Wimplicit-function-declaration]
> >firmwares/fixedwing/main_ap.c:410:5: warning: nested extern declaration
> of >'DOWNLINK_SEND_IVMEOLCER' [-Wnested-externs]
> >firmwares/fixedwing/main_ap.c:410:5: error: 'PprzTransport' undeclared
> (first use in this function)
> >firmwares/fixedwing/main_ap.c:410:5: note: each undeclared identifier is
> reported only once for each >function it appears in
> >firmwares/fixedwing/main_ap.c:410:5: error: 'UART1' undeclared (first
> use in this function)
> > make[1]: ***
> [/home/refik/MASTER_PAPARAZZI/paparazzi/var/MYAC1/ap/firmwares/fixedwing>/main_ap.o]
> Error 1
> >make[1]: Leaving directory
> `/home/refik/MASTER_PAPARAZZI/paparazzi/sw/airborne'
> >make: *** [ap.compile] Error 2
> >
> >
> >Please help about this error.
>
> > Cheers,
> > Refik
>
> _______________________________________________
> Paparazzi-devel mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nongnu.org/archive/html/paparazzi-devel/attachments/20130531/e2e8fe3e/attachment.html>

------------------------------

_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel


End of Paparazzi-devel Digest, Vol 110, Issue 46
************************************************

_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel


reply via email to

[Prev in Thread] Current Thread [Next in Thread]