mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-30 11:37:06 +08:00
[modules] enable test for telemetry modules
This commit is contained in:
@@ -46,6 +46,14 @@
|
|||||||
<file name="bluegiga_dl.c"/>
|
<file name="bluegiga_dl.c"/>
|
||||||
<file name="pprz_transport.c" dir="pprzlink/src"/>
|
<file name="pprz_transport.c" dir="pprzlink/src"/>
|
||||||
<file name="bluegiga.c"/>
|
<file name="bluegiga.c"/>
|
||||||
|
<test>
|
||||||
|
<define name="BLUEGIGA_DRDY_GPIO" value="GPIOA"/>
|
||||||
|
<define name="BLUEGIGA_DRDY_GPIO_PIN" value="GPIO0"/>
|
||||||
|
<define name="DOWNLINK_DEVICE" value="bluegiga_p"/>
|
||||||
|
<define name="BLUEGIGA_SPI_DEV" value="spi2"/>
|
||||||
|
<define name="SPI_SLAVE"/>
|
||||||
|
<define name="USE_SPI2_SLAVE"/>
|
||||||
|
</test>
|
||||||
</makefile>
|
</makefile>
|
||||||
</module>
|
</module>
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
<file name="telemetry_intermcu_ap.c"/>
|
<file name="telemetry_intermcu_ap.c"/>
|
||||||
<file name="short_transport.c" dir="pprzlink/src"/>
|
<file name="short_transport.c" dir="pprzlink/src"/>
|
||||||
<define name="TELEMETRY_INTERMCU"/>
|
<define name="TELEMETRY_INTERMCU"/>
|
||||||
|
<test/>
|
||||||
</makefile>
|
</makefile>
|
||||||
<makefile target="fbw">
|
<makefile target="fbw">
|
||||||
<file name="telemetry_intermcu_fbw.c"/>
|
<file name="telemetry_intermcu_fbw.c"/>
|
||||||
@@ -33,6 +34,10 @@
|
|||||||
<define name="USE_$(TELEMETRY_INTERMCU_DEV_UPPER)"/>
|
<define name="USE_$(TELEMETRY_INTERMCU_DEV_UPPER)"/>
|
||||||
<define name="$(TELEMETRY_INTERMCU_DEV_UPPER)_BAUD" value="$(TELEMETRY_INTERMCU_BAUD)"/>
|
<define name="$(TELEMETRY_INTERMCU_DEV_UPPER)_BAUD" value="$(TELEMETRY_INTERMCU_BAUD)"/>
|
||||||
<define name="TELEMETRY_INTERMCU_DEV" value="$(TELEMETRY_INTERMCU_DEV_LOWER)"/>
|
<define name="TELEMETRY_INTERMCU_DEV" value="$(TELEMETRY_INTERMCU_DEV_LOWER)"/>
|
||||||
|
<test>
|
||||||
|
<define name="TELEMETRY_INTERMCU_DEV" value="uart3"/>
|
||||||
|
<define name="USE_UART3"/>
|
||||||
|
</test>
|
||||||
</makefile>
|
</makefile>
|
||||||
</module>
|
</module>
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
<define name="DOWNLINK_TRANSPORT" value="ivy_tp"/>
|
<define name="DOWNLINK_TRANSPORT" value="ivy_tp"/>
|
||||||
<file name="ivy_dl.c"/>
|
<file name="ivy_dl.c"/>
|
||||||
<file name="ivy_transport.c" dir="pprzlink/src"/>
|
<file name="ivy_transport.c" dir="pprzlink/src"/>
|
||||||
|
<test/>
|
||||||
</makefile>
|
</makefile>
|
||||||
</module>
|
</module>
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,11 @@
|
|||||||
<define name="DATALINK" value="PPRZ"/>
|
<define name="DATALINK" value="PPRZ"/>
|
||||||
<file name="pprz_dl.c"/>
|
<file name="pprz_dl.c"/>
|
||||||
<file name="pprz_transport.c" dir="pprzlink/src"/>
|
<file name="pprz_transport.c" dir="pprzlink/src"/>
|
||||||
|
<test>
|
||||||
|
<define name="DOWNLINK_DEVICE" value="udp0"/>
|
||||||
|
<define name="USE_UDP"/>
|
||||||
|
<define name="USE_UDP0"/>
|
||||||
|
</test>
|
||||||
</makefile>
|
</makefile>
|
||||||
</module>
|
</module>
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
<define name="DOWNLINK_TRANSPORT" value="ivy_tp"/>
|
<define name="DOWNLINK_TRANSPORT" value="ivy_tp"/>
|
||||||
<file name="ivy_dl.c"/>
|
<file name="ivy_dl.c"/>
|
||||||
<file name="ivy_transport.c" dir="pprzlink/src"/>
|
<file name="ivy_transport.c" dir="pprzlink/src"/>
|
||||||
|
<test/>
|
||||||
</makefile>
|
</makefile>
|
||||||
</module>
|
</module>
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,10 @@
|
|||||||
<define name="DATALINK" value="PPRZ"/>
|
<define name="DATALINK" value="PPRZ"/>
|
||||||
<file name="pprz_dl.c"/>
|
<file name="pprz_dl.c"/>
|
||||||
<file name="pprz_transport.c" dir="pprzlink/src"/>
|
<file name="pprz_transport.c" dir="pprzlink/src"/>
|
||||||
|
<test>
|
||||||
|
<define name="DOWNLINK_DEVICE" value="uart1"/>
|
||||||
|
<define name="USE_UART1"/>
|
||||||
|
</test>
|
||||||
</makefile>
|
</makefile>
|
||||||
</module>
|
</module>
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,10 @@
|
|||||||
<file name="pprz_dl.c"/>
|
<file name="pprz_dl.c"/>
|
||||||
<file name="pprz_transport.c" dir="pprzlink/src"/>
|
<file name="pprz_transport.c" dir="pprzlink/src"/>
|
||||||
<file name="frsky_x.c"/>
|
<file name="frsky_x.c"/>
|
||||||
|
<test>
|
||||||
|
<define name="DOWNLINK_DEVICE" value="frsky_x_serial"/>
|
||||||
|
<define name="USE_FRSKY_X_SERIAL"/>
|
||||||
|
</test>
|
||||||
</makefile>
|
</makefile>
|
||||||
</module>
|
</module>
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,10 @@
|
|||||||
<define name="DOWNLINK_TRANSPORT" value="gec_tp"/>
|
<define name="DOWNLINK_TRANSPORT" value="gec_tp"/>
|
||||||
<file name="gec_dl.c"/>
|
<file name="gec_dl.c"/>
|
||||||
<file name="gec.c" dir="modules/datalink/gec"/>
|
<file name="gec.c" dir="modules/datalink/gec"/>
|
||||||
|
<test>
|
||||||
|
<define name="DOWNLINK_DEVICE" value="uart1"/>
|
||||||
|
<define name="USE_UART1"/>
|
||||||
|
</test>
|
||||||
</makefile>
|
</makefile>
|
||||||
|
|
||||||
</module>
|
</module>
|
||||||
|
|||||||
@@ -37,6 +37,11 @@
|
|||||||
<define name="DATALINK" value="PPRZ"/>
|
<define name="DATALINK" value="PPRZ"/>
|
||||||
<file name="pprz_dl.c"/>
|
<file name="pprz_dl.c"/>
|
||||||
<file name="pprz_transport.c" dir="pprzlink/src"/>
|
<file name="pprz_transport.c" dir="pprzlink/src"/>
|
||||||
|
<test>
|
||||||
|
<define name="DOWNLINK_DEVICE" value="udp0"/>
|
||||||
|
<define name="USE_UDP"/>
|
||||||
|
<define name="USE_UDP0"/>
|
||||||
|
</test>
|
||||||
</makefile>
|
</makefile>
|
||||||
</module>
|
</module>
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,12 @@
|
|||||||
<define name="DATALINK" value="XBEE"/>
|
<define name="DATALINK" value="XBEE"/>
|
||||||
<file name="xbee_dl.c"/>
|
<file name="xbee_dl.c"/>
|
||||||
<file name="xbee_transport.c" dir="pprzlink/src"/>
|
<file name="xbee_transport.c" dir="pprzlink/src"/>
|
||||||
|
<test>
|
||||||
|
<define name="DOWNLINK_DEVICE" value="uart1"/>
|
||||||
|
<define name="XBEE_UART" value="uart1"/>
|
||||||
|
<define name="XBEE_BAUD" value="B57600"/>
|
||||||
|
<define name="USE_UART1"/>
|
||||||
|
</test>
|
||||||
</makefile>
|
</makefile>
|
||||||
</module>
|
</module>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#ifndef KEYS_UAV_H
|
||||||
|
#define KEYS_UAV_H
|
||||||
|
|
||||||
|
#define UAV_PUBLIC {0}
|
||||||
|
#define UAV_PRIVATE {0}
|
||||||
|
#define GCS_PUBLIC {0}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -9,4 +9,10 @@
|
|||||||
#define TELEMETRY_PPRZ_NB_MSG 1
|
#define TELEMETRY_PPRZ_NB_MSG 1
|
||||||
#define TELEMETRY_PPRZ_CBS { 0 }
|
#define TELEMETRY_PPRZ_CBS { 0 }
|
||||||
|
|
||||||
|
static inline void periodic_telemetry_send_InterMCU(struct periodic_telemetry *telemetry, struct transport_tx *trans, struct link_device *dev) {
|
||||||
|
(void)telemetry;
|
||||||
|
(void)trans;
|
||||||
|
(void)dev;
|
||||||
|
}
|
||||||
|
|
||||||
#endif // PERIODIC_TELEMETRY_H
|
#endif // PERIODIC_TELEMETRY_H
|
||||||
|
|||||||
@@ -0,0 +1,90 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2009-2015 The Paparazzi Team
|
||||||
|
*
|
||||||
|
* This file is part of Paparazzi.
|
||||||
|
*
|
||||||
|
* Paparazzi is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
* any later version.
|
||||||
|
*
|
||||||
|
* Paparazzi is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with paparazzi; see the file COPYING. If not, see
|
||||||
|
* <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file arch/linux/udp_socket.h
|
||||||
|
*
|
||||||
|
* Easily create and use UDP sockets.
|
||||||
|
* Basically just some convenience functions around a UDP socket.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef UDP_SOCKET_H
|
||||||
|
#define UDP_SOCKET_H
|
||||||
|
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#include "std.h"
|
||||||
|
|
||||||
|
struct UdpSocket {
|
||||||
|
int sockfd;
|
||||||
|
struct sockaddr_in addr_in;
|
||||||
|
struct sockaddr_in addr_out;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create UDP network (in/out sockets).
|
||||||
|
* @param[out] sock pointer to already allocated UdpSocket struct
|
||||||
|
* @param[in] host hostname/address
|
||||||
|
* @param[in] port_out output port
|
||||||
|
* @param[in] port_in input port (set to < 0 to disable)
|
||||||
|
* @param[in] broadcast if TRUE enable broadcasting
|
||||||
|
* @return -1 on error, otherwise 0
|
||||||
|
*/
|
||||||
|
extern int udp_socket_create(struct UdpSocket *sock, char *host, int port_out, int port_in, bool broadcast);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send a packet from buffer, blocking.
|
||||||
|
* @param[in] sock pointer to UdpSocket struct
|
||||||
|
* @param[in] buffer buffer to send
|
||||||
|
* @param[in] len buffer length in bytes
|
||||||
|
* @return number of bytes sent (-1 on error)
|
||||||
|
*/
|
||||||
|
extern int udp_socket_send(struct UdpSocket *sock, uint8_t *buffer, uint32_t len);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send a packet from buffer, non-blocking.
|
||||||
|
* @param[in] sock pointer to UdpSocket struct
|
||||||
|
* @param[in] buffer buffer to send
|
||||||
|
* @param[in] len buffer length in bytes
|
||||||
|
* @return number of bytes sent (-1 on error)
|
||||||
|
*/
|
||||||
|
extern int udp_socket_send_dontwait(struct UdpSocket *sock, uint8_t *buffer, uint32_t len);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Receive a UDP packet, dont wait.
|
||||||
|
* @param[in] sock pointer to UdpSocket struct
|
||||||
|
* @param[out] buffer buffer to write received packet to
|
||||||
|
* @param[in] len buffer length in bytes
|
||||||
|
* @return number of bytes received (-1 on error)
|
||||||
|
*/
|
||||||
|
extern int udp_socket_recv_dontwait(struct UdpSocket *sock, uint8_t *buffer, uint32_t len);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Receive one UDP packet.
|
||||||
|
* @param[in] sock pointer to UdpSocket struct
|
||||||
|
* @param[out] buffer buffer to write received packet to
|
||||||
|
* @param[in] len buffer length in bytes
|
||||||
|
* @return number of bytes received (-1 on error)
|
||||||
|
*/
|
||||||
|
extern int udp_socket_recv(struct UdpSocket *sock, uint8_t *buffer, uint32_t len);
|
||||||
|
|
||||||
|
extern int udp_socket_subscribe_multicast(struct UdpSocket *sock, const char *multicast_addr);
|
||||||
|
extern int udp_socket_set_recvbuf(struct UdpSocket *sock, int buf_size);
|
||||||
|
extern int udp_socket_set_sendbuf(struct UdpSocket *sock, int buf_size);
|
||||||
|
#endif /* UDP_SOCKET_H */
|
||||||
Reference in New Issue
Block a user