[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paparazzi-commits] [5096] removing unused files
From: |
antoine drouin |
Subject: |
[paparazzi-commits] [5096] removing unused files |
Date: |
Wed, 21 Jul 2010 15:58:11 +0000 |
Revision: 5096
http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=5096
Author: poine
Date: 2010-07-21 15:58:10 +0000 (Wed, 21 Jul 2010)
Log Message:
-----------
removing unused files
Removed Paths:
-------------
paparazzi3/trunk/sw/airborne/fms/fms_gs_link.c
paparazzi3/trunk/sw/airborne/fms/fms_gs_link.h
paparazzi3/trunk/sw/airborne/fms/fms_main.c
Deleted: paparazzi3/trunk/sw/airborne/fms/fms_gs_link.c
===================================================================
--- paparazzi3/trunk/sw/airborne/fms/fms_gs_link.c 2010-07-21 15:56:41 UTC
(rev 5095)
+++ paparazzi3/trunk/sw/airborne/fms/fms_gs_link.c 2010-07-21 15:58:10 UTC
(rev 5096)
@@ -1,24 +0,0 @@
-#include "fms_gs_link.h"
-
-#include <stdlib.h>
-
-#include "fms_debug.h"
-
-struct FmsGsLink* gs_link_new(const char* str_ip, const int port) {
-
- struct FmsGsLink* me = malloc(sizeof(struct FmsGsLink));
- me->network = network_new(str_ip, port, FMS_UNICAST);
- return me;
-
-}
-
-
-
-int gs_link_write(struct FmsGsLink* me, char* buf, int len) {
-
- TRACE(TRACE_DEBUG, "gs_link writing %d bytes to network\n", len);
- return network_write(me->network, buf, len);
-
-}
-
-
Deleted: paparazzi3/trunk/sw/airborne/fms/fms_gs_link.h
===================================================================
--- paparazzi3/trunk/sw/airborne/fms/fms_gs_link.h 2010-07-21 15:56:41 UTC
(rev 5095)
+++ paparazzi3/trunk/sw/airborne/fms/fms_gs_link.h 2010-07-21 15:58:10 UTC
(rev 5096)
@@ -1,15 +0,0 @@
-#ifndef FMS_GS_LINK_H
-#define FMS_GS_LINK_H
-
-#include "fms_network.h"
-
-struct FmsGsLink {
- struct FmsNetwork* network;
-};
-
-extern struct FmsGsLink* gs_link_new(const char* str_ip, const int port);
-
-extern int gs_link_write(struct FmsGsLink* me, char* buf, int len);
-
-
-#endif /* FMS_GS_LINK_H */
Deleted: paparazzi3/trunk/sw/airborne/fms/fms_main.c
===================================================================
--- paparazzi3/trunk/sw/airborne/fms/fms_main.c 2010-07-21 15:56:41 UTC (rev
5095)
+++ paparazzi3/trunk/sw/airborne/fms/fms_main.c 2010-07-21 15:58:10 UTC (rev
5096)
@@ -1,78 +0,0 @@
-// nc -l -u -p 2442 > /tmp/test123
-
-#include <glib.h>
-
-#include <stdio.h>
-
-#define AP_DEVICE "/dev/ttyACM0"
-#define GS_IP "10.31.4.19"
-#define GS_PORT 2442
-
-#include "fms_debug.h"
-#include "fms_ap_link.h"
-#include "fms_gs_link.h"
-
-
-static struct FmsApLink* ap_link;
-static struct FmsGsLink* gs_link;
-
-
-static gboolean on_ap_link_data_received(GIOChannel *source,
- GIOCondition condition,
- gpointer data);
-
-static gboolean on_gs_link_data_received(GIOChannel *source,
- GIOCondition condition,
- gpointer data);
-
-
-static gboolean on_ap_link_data_received(GIOChannel *source,
- GIOCondition condition,
- gpointer data) {
- gsize bytes_read;
- GError* _err = NULL;
- GIOStatus st = g_io_channel_read_chars(source, ap_link->buf,
AP_LINK_BUF_SIZE, &bytes_read, &_err);
- if (!_err) {
- if (st == G_IO_STATUS_NORMAL) {
- ap_link_parse(ap_link, bytes_read);
- gs_link_write(gs_link, ap_link->buf, bytes_read);
- }
- }
- else {
- TRACE(TRACE_ERROR,"error reading serial: %s\n", _err->message);
- g_error_free (_err);
- }
- return TRUE;
-}
-
-static gboolean on_gs_link_data_received(GIOChannel *source,
- GIOCondition condition,
- gpointer data) {
- return TRUE;
-}
-
-
-int main(int argc, char** argv) {
-
- ap_link = ap_link_new(AP_DEVICE);
- if (!ap_link) {
- printf("error opening serial port %s\n", AP_DEVICE);
- return -1;
- }
- GIOChannel* ioc1 = g_io_channel_unix_new(ap_link->sp->fd);
- g_io_channel_set_encoding(ioc1, NULL, NULL);
- g_io_add_watch (ioc1, G_IO_IN, on_ap_link_data_received, NULL);
-
- gs_link = gs_link_new(GS_IP, GS_PORT);
- if (!gs_link) {
- printf("error opening network connection (%s:%d)\n", GS_IP, GS_PORT);
- return -1;
- }
- GIOChannel* ioc2 = g_io_channel_unix_new(gs_link->network->socket);
- g_io_add_watch (ioc2, G_IO_IN, on_gs_link_data_received, NULL);
-
- GMainLoop* ml = g_main_loop_new(NULL, FALSE);
- g_main_loop_run(ml);
-
- return 0;
-}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paparazzi-commits] [5096] removing unused files,
antoine drouin <=