From: Michal Sojka Date: Sat, 29 Sep 2012 19:15:45 +0000 (+0200) Subject: Merge branch 'libusb' X-Git-Url: http://rtime.felk.cvut.cz/gitweb/eurobot/public.git/commitdiff_plain/545333dc965ac10b96e67c8d7cbb9aa148a8fb6e?hp=51d1f30f13515e9aa90a5b39a7306bc0eea7798b Merge branch 'libusb' --- diff --git a/build/gumstix/INSTALL b/build/gumstix/INSTALL new file mode 100644 index 00000000..66d809fe --- /dev/null +++ b/build/gumstix/INSTALL @@ -0,0 +1,9 @@ +Postup pro uspesnou kompilaci (zatim s puvodnim toolchainem od P. Pisy): + +# 1. Nejprve je nutne pridat do PATHu cestu k toolchainu - pro jeho velikost zatim nedavam do gitu, ma totiz 50MB +2. Je nutne stahnout archiv s Qt: ftp://ftp.trolltech.com/qt/source/qt-everywhere-opensource-src-4.6.3.tar.gz a rozbalit do slozky soft/src/3rdparty/qt a to tak, aby qt byla korenova slozka +# 3. nastavit platformu hosta v qt/Makefile.omk, pro 64bitu -platform qws/linux-x86_64-g++, pro 32bitu -platform qws/linux-x86-g++ + +TODO +1. Aplikace patchu pro opravu prace s pismy a s kurzorem - v Qt v rootfs v Gumstixu je opraveno +2. Zahrnout cely postup do makefilu ? \ No newline at end of file diff --git a/build/gumstix/qt/Makefile.omk b/build/gumstix/qt/Makefile.omk index 6bb4938c..915db778 100644 --- a/build/gumstix/qt/Makefile.omk +++ b/build/gumstix/qt/Makefile.omk @@ -4,15 +4,16 @@ library-pass_HOOKS = install-qt config.status: $(SOURCES_DIR)/qt-src/configure cp -a $(SOURCES_DIR)/linux-arm-gumstix-g++ $(SOURCES_DIR)/qt-src/mkspecs/qws - $< -embedded arm --prefix=$(OUTPUT_DIR)/_compiled/qt -xplatform qws/linux-arm-gumstix-g++ -opensource -confirm-license -little-endian -qt-gfx-linuxfb + cp -arv $(SOURCES_DIR)linux.conf $(SOURCES_DIR)/qt-src/mkspecs/common + $< -embedded arm --prefix=$(OUTPUT_DIR)/_compiled/qt -xplatform qws/linux-arm-gumstix-g++ -opensource -confirm-license -little-endian -qt-gfx-linuxfb -qt3support -opengl es2 -depths 16,24,32 -plugin-gfx-powervr -qtlibinfix E -plugin-mouse-tslib -qt-mouse-pc -qt-mouse-linuxinput -qt-kbd-tty -qt-kbd-linuxinput -DQT_KEYPAD_NAVIGATION -lib/libQtCore.so: config.status +lib/libQtCoreE.so: config.status $(MAKE) -$(OUTPUT_DIR)/_compiled/qt/libQtCore.so: lib/libQtCore.so +$(OUTPUT_DIR)/_compiled/qt/libQtCoreE.so: lib/libQtCoreE.so echo $@: $^ $(MAKE) install touch $@ .PHONY: install-qt -install-qt: $(OUTPUT_DIR)/_compiled/qt/libQtCore.so +install-qt: $(OUTPUT_DIR)/_compiled/qt/libQtCoreE.so diff --git a/build/gumstix/qt/linux.conf b/build/gumstix/qt/linux.conf new file mode 100644 index 00000000..307975d6 --- /dev/null +++ b/build/gumstix/qt/linux.conf @@ -0,0 +1,66 @@ +# +# qmake configuration for common linux +# + +QMAKE_CFLAGS_THREAD += -D_REENTRANT +QMAKE_CXXFLAGS_THREAD += $$QMAKE_CFLAGS_THREAD + +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = /usr/X11R6/include +QMAKE_LIBDIR_X11 = /usr/X11R6/lib +QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] +QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS] +QMAKE_INCDIR_OPENGL = /usr/X11R6/include +QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib +QMAKE_INCDIR_OPENGL_ES1 = $$QMAKE_INCDIR_OPENGL +QMAKE_LIBDIR_OPENGL_ES1 = $$QMAKE_LIBDIR_OPENGL +QMAKE_INCDIR_OPENGL_ES1CL = $$QMAKE_INCDIR_OPENGL +QMAKE_LIBDIR_OPENGL_ES1CL = $$QMAKE_LIBDIR_OPENGL +QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL +QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_OPENGL +QMAKE_INCDIR_EGL = +QMAKE_LIBDIR_EGL = +QMAKE_INCDIR_OPENVG = +QMAKE_LIBDIR_OPENVG = + +QMAKE_LIBS = -Wl,-rpath-link,SEDME/lib -lglib-2.0 +QMAKE_LIBS_DYNLOAD = -ldl +QMAKE_LIBS_X11 = -lXext -lX11 -lm +QMAKE_LIBS_X11SM = -lSM -lICE +QMAKE_LIBS_NIS = -lnsl +QMAKE_LIBS_EGL = -lEGL -lIMGegl -lsrv_um +QMAKE_LIBS_OPENGL = -lEGL -lGLES_CM -lIMGegl -lsrv_um +QMAKE_LIBS_OPENGL_QT = -lEGL -lGLES_CM -lIMGegl -lsrv_um +QMAKE_LIBS_OPENGL_ES1 = -lEGL -lGLES_CM -lIMGegl -lsrv_um +QMAKE_LIBS_OPENGL_ES1CL = -lGLES_CL +QMAKE_LIBS_OPENGL_ES2 = -lEGL -lGLESv2 -lGLES_CM -lIMGegl -lsrv_um +QMAKE_LIBS_OPENVG = -lOpenVG +QMAKE_LIBS_THREAD = -lpthread + +QMAKE_MOC = $$[QT_INSTALL_BINS]/moc +QMAKE_UIC = $$[QT_INSTALL_BINS]/uic + +QMAKE_AR = ar cqs +QMAKE_OBJCOPY = objcopy +QMAKE_RANLIB = + +QMAKE_TAR = tar -cf +QMAKE_GZIP = gzip -9f + +QMAKE_COPY = cp -f +QMAKE_COPY_FILE = $(COPY) +QMAKE_COPY_DIR = $(COPY) -r +QMAKE_MOVE = mv -f +QMAKE_DEL_FILE = rm -f +QMAKE_DEL_DIR = rmdir +QMAKE_STRIP = strip +QMAKE_STRIPFLAGS_LIB += --strip-unneeded +QMAKE_CHK_DIR_EXISTS = test -d +QMAKE_MKDIR = mkdir -p +QMAKE_INSTALL_FILE = install -m 644 -p +QMAKE_INSTALL_PROGRAM = install -m 755 -p + +DEFINES += QT_QWS_CLIENTBLIT + +include(unix.conf) diff --git a/src/fsm/fsm.h b/src/fsm/fsm.h index d9ea6c39..308fb1f4 100644 --- a/src/fsm/fsm.h +++ b/src/fsm/fsm.h @@ -389,7 +389,7 @@ static inline void fsm_set_flags(struct robo_fsm *fsm, int flag_mask) * Sends an event to another FSM, which may run in another * thread. Event sending is asynchronous, but each FSM has a buffer for * several events. If this buffer is full, @a event_lost flag is set - * and the event is forgotten. This should never happen in carefully + * and the event is lost. This should never happen in a carefully * designed application. * * @note This macro ensures that it is not possible to send an event diff --git a/src/hokuyo/hokuyo.h b/src/hokuyo/hokuyo.h index c4c90f61..962d6376 100644 --- a/src/hokuyo/hokuyo.h +++ b/src/hokuyo/hokuyo.h @@ -14,6 +14,6 @@ #define HOKUYO_INDEX_TO_DEG(x) ((HOKUYO_START_ANGLE-(x)*360.0/HOKUYO_SPLIT_DIVISION) * HOKUYO_ORIENTATION) #define HOKUYO_INDEX_TO_RAD(x) (HOKUYO_INDEX_TO_DEG(x)/180.0*M_PI) -#define HOKUYO_DEG_TO_INDEX(d) ((HOKUYO_START_ANGLE-(d))/(360.0/HOKUYO_SPLIT_DIVISION)) +#define HOKUYO_DEG_TO_INDEX(d) ((HOKUYO_START_ANGLE-(d)/HOKUYO_ORIENTATION)/(360.0/HOKUYO_SPLIT_DIVISION)) #endif //HOKUYO_H diff --git a/src/motion/arc.cc b/src/motion/arc.cc index f3b67e6e..fa34acaf 100644 --- a/src/motion/arc.cc +++ b/src/motion/arc.cc @@ -1,4 +1,4 @@ -// Copyright 2009 Michal Sojka +// Copyright 2009, 2012 Michal Sojka // Copyright 2009 Petr Beneš // // This file is part of Trgen library. @@ -87,7 +87,7 @@ namespace Segment { TrajectorySegment* Arc::splitAt(double distance, Point *newEnd) { if (distance <= 0 || distance >= length) - return NULL; + return 0; getPointAt(distance, newEnd); Arc *ns = new Arc(*this); diff --git a/src/motion/turn.cc b/src/motion/turn.cc index 49bc1fe9..76a4b271 100644 --- a/src/motion/turn.cc +++ b/src/motion/turn.cc @@ -1,4 +1,4 @@ -// Copyright 2009 Michal Sojka +// Copyright 2009, 2012 Michal Sojka // Copyright 2009 Petr Beneš // // This file is part of Trgen library. @@ -54,7 +54,7 @@ namespace Segment { TrajectorySegment* Turn::splitAt(double distance, Point *newEnd) { if (distance <= 0 || distance >= fabs(turnBy)) { dbgPrintf("splitAt: distance=%g turnBy=%g\n", distance, turnBy); - return NULL; + return 0; } Turn *ns = new Turn(*this); @@ -69,7 +69,7 @@ namespace Segment { TrajectorySegment* Turn::splitAtByTime(double time, Point *newEnd) { if (time <= t1 || time >= t2) { dbgPrintf("splitAt: distance=%g turnBy=%g\n", time, turnBy); - return NULL; + return 0; } Turn *ns = new Turn(*this);