diff --git a/sw/ground_segment/joystick/Makefile b/sw/ground_segment/joystick/Makefile index bde946751b..a82d224c96 100644 --- a/sw/ground_segment/joystick/Makefile +++ b/sw/ground_segment/joystick/Makefile @@ -29,22 +29,10 @@ TOOLSDIR = ../../tools OCAMLINCLUDES= -I $(OCAMLLIB) -I +lablgtk2 -I +xml-light -I $(TOOLSDIR) LIBPPRZCMA=$(OCAMLLIB)/lib-pprz.cma -all: main_stick +all: test_stick input2ivy -main_stick: main_stick.o usb_stick.o - gcc -g -O2 -Wall `pkg-config glib-2.0 --cflags` -o $@ $^ `pkg-config glib-2.0 --libs` `pcre-config --libs` -lglibivy - -main_stick_debug: main_stick.o usb_stick.o - gcc -g -O2 -Wall `pkg-config glib-2.0 --cflags` -o $@ $^ `pkg-config glib-2.0 --libs` `pcre-config --libs` -lglibivy -DSTICK_DBG - -apm_stick: apm_stick.o usb_stick.o - gcc -g -O2 -Wall `pkg-config glib-2.0 --cflags` -o $@ $^ `pkg-config glib-2.0 --libs` `pcre-config --libs` -lglibivy - -xbox_stick: xbox_stick.o usb_stick.o - gcc -g -O2 -Wall `pkg-config glib-2.0 --cflags` -o $@ $^ `pkg-config glib-2.0 --libs` `pcre-config --libs` -lglibivy - -attack3_stick: attack3_stick.o usb_stick.o - gcc -g -O2 -Wall `pkg-config glib-2.0 --cflags` -o $@ $^ `pkg-config glib-2.0 --libs` `pcre-config --libs` -lglibivy +test_stick: test_stick.o + gcc -g -O2 -Wall -DSTICK_DBG `pkg-config glib-2.0 --cflags` -o $@ $^ usb_stick.c `pkg-config glib-2.0 --libs` `pcre-config --libs` -lglibivy input2ivy: usb_stick.o ml_usb_stick.o input2ivy.cmo $(OCAMLC) $(OCAMLINCLUDES) -custom -o $@ unix.cma str.cma glibivy-ocaml.cma xml-light.cma lib-pprz.cma lablgtk.cma $(TOOLSDIR)/fp_proc.cmo $^ @@ -58,5 +46,5 @@ input2ivy: usb_stick.o ml_usb_stick.o input2ivy.cmo $(Q)$(OCAMLC) $(OCAMLINCLUDES) -c $< clean: - rm -f *~ core *.o *.bak .depend main_stick main_stick_debug apm_stick xbox_stick attack3_stick *.cmo *.cmi input2ivy + rm -f *~ core *.o *.bak .depend test_stick *.cmo *.cmi input2ivy diff --git a/sw/ground_segment/joystick/apm_stick.c b/sw/ground_segment/joystick/apm_stick.c deleted file mode 100644 index 4a6a2b7dac..0000000000 --- a/sw/ground_segment/joystick/apm_stick.c +++ /dev/null @@ -1,191 +0,0 @@ -/* - * apm_stick - * - * send joystick control to paparazzi through ivy - * - * based on Force Feedback: Constant Force Stress Test - * Copyright (C) 2001 Oliver Hamann - * - * This program 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 of the License, or - * (at your option) any later version. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "usb_stick.h" - -#include -#include -#include -#include -#include -#include -#include - -#define TIMEOUT_PERIOD 100 -#define UPDATE_FREQ (1./TIMEOUT_PERIOD) - -#define DEFAULT_AC_ID 1 - -#define CAM_TILT_MIN 1000 -#define CAM_TILT_MAX 2000 - -/* Global vars */ -int fp_received_once = 0; -long int fp_east_sp,fp_north_sp,fp_up_sp,fp_psi_sp; -float east_sp,north_sp,up_sp,psi_sp; -float cam_tilt_sp = 1500.; -int last_button = 0; - -/* Options */ -char * device_name = NULL; -int aircraft_id = DEFAULT_AC_ID; - -void parse_args(int argc, char * argv[]) -{ - int i; - - for (i = 1; i < argc; i++) { - if (!strcmp(argv[i],"-d") && i [