paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] adding a telemetry message


From: Felix Ruess
Subject: Re: [Paparazzi-devel] adding a telemetry message
Date: Fri, 31 May 2013 12:13:56 +0200

Hi Refik,

var/include/messages.h is generated from messages.xml (as it says in the first few lines of that file).
If you change/add messages, you must run make in your paparazzi folder again first.

Cheers, Felix


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

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



reply via email to

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