From: Kate Alhola Date: Mon, 11 Jun 2012 11:32:23 +0000 (+0300) Subject: Joinig to video broadcast group on OSX improved X-Git-Url: http://git.maemo.org/git/?p=mardrone;a=commitdiff_plain;h=323e8e1692d15a3435f1813f038e757cd2614938 Joinig to video broadcast group on OSX improved --- diff --git a/mardrone/Makefile b/mardrone/Makefile index 55d71cf..748b4ed 100644 --- a/mardrone/Makefile +++ b/mardrone/Makefile @@ -1,6 +1,6 @@ ############################################################################# # Makefile for building: mardrone.app/Contents/MacOS/mardrone -# Generated by qmake (2.01a) (Qt 4.8.0) on: Tue May 8 18:18:49 2012 +# Generated by qmake (2.01a) (Qt 4.8.0) on: Wed May 30 18:01:04 2012 # Project: mardrone.pro # Template: app # Command: /usr/bin/qmake -spec /usr/local/Qt4.8/mkspecs/macx-g++ CONFIG+=declarative_debug -o Makefile mardrone.pro @@ -56,7 +56,8 @@ SOURCES = main.cpp \ qdeclarativetoucharea.cpp \ gauges/gaugearc.cpp \ uilistelement.cpp \ - gauges/gaugehsi.cpp moc_dronecontrol.cpp \ + gauges/gaugehsi.cpp \ + qmlappviewer.cpp moc_dronecontrol.cpp \ moc_navdata.cpp \ moc_video.cpp \ moc_gauge.cpp \ @@ -68,6 +69,7 @@ SOURCES = main.cpp \ moc_gaugearc.cpp \ moc_uilistelement.cpp \ moc_gaugehsi.cpp \ + moc_qmlappviewer.cpp \ qrc_ardrone.cpp OBJECTS = main.o \ dronecontrol.o \ @@ -82,6 +84,7 @@ OBJECTS = main.o \ gaugearc.o \ uilistelement.o \ gaugehsi.o \ + qmlappviewer.o \ moc_dronecontrol.o \ moc_navdata.o \ moc_video.o \ @@ -94,6 +97,7 @@ OBJECTS = main.o \ moc_gaugearc.o \ moc_uilistelement.o \ moc_gaugehsi.o \ + moc_qmlappviewer.o \ qrc_ardrone.o DIST = /usr/local/Qt4.8/mkspecs/common/unix.conf \ /usr/local/Qt4.8/mkspecs/common/mac.conf \ @@ -272,7 +276,7 @@ mardrone.app/Contents/Info.plist: @sed -e "s,@SHORT_VERSION@,1.0,g" -e "s,@TYPEINFO@,????,g" -e "s,@ICON@,,g" -e "s,@EXECUTABLE@,mardrone,g" -e "s,@TYPEINFO@,????,g" /usr/local/Qt4.8/mkspecs/macx-g++/Info.plist.app >mardrone.app/Contents/Info.plist dist: @$(CHK_DIR_EXISTS) .tmp/mardrone1.0.0 || $(MKDIR) .tmp/mardrone1.0.0 - $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/mardrone1.0.0/ && $(COPY_FILE) --parents dronelib/dronecontrol.h dronelib/navdata.h dronelib/video.h gauges/gauge.h gauges/gaugelabel.h gauges/gaugetape.h gauges/gaugehorizon.h dronelib/joystick.h qdeclarativetoucharea.h gauges/gaugearc.h uilistelement.h gauges/gaugehsi.h .tmp/mardrone1.0.0/ && $(COPY_FILE) --parents ardrone.qrc .tmp/mardrone1.0.0/ && $(COPY_FILE) --parents main.cpp dronelib/dronecontrol.cpp dronelib/navdata.cpp dronelib/video.cpp gauges/gauge.cpp gauges/gaugelabel.cpp gauges/gaugetape.cpp gauges/gaugehorizon.cpp dronelib/joystick.cpp qdeclarativetoucharea.cpp gauges/gaugearc.cpp uilistelement.cpp gauges/gaugehsi.cpp .tmp/mardrone1.0.0/ && (cd `dirname .tmp/mardrone1.0.0` && $(TAR) mardrone1.0.0.tar mardrone1.0.0 && $(COMPRESS) mardrone1.0.0.tar) && $(MOVE) `dirname .tmp/mardrone1.0.0`/mardrone1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/mardrone1.0.0 + $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/mardrone1.0.0/ && $(COPY_FILE) --parents dronelib/dronecontrol.h dronelib/navdata.h dronelib/video.h gauges/gauge.h gauges/gaugelabel.h gauges/gaugetape.h gauges/gaugehorizon.h dronelib/joystick.h qdeclarativetoucharea.h gauges/gaugearc.h uilistelement.h gauges/gaugehsi.h qmlappviewer.h .tmp/mardrone1.0.0/ && $(COPY_FILE) --parents ardrone.qrc .tmp/mardrone1.0.0/ && $(COPY_FILE) --parents main.cpp dronelib/dronecontrol.cpp dronelib/navdata.cpp dronelib/video.cpp gauges/gauge.cpp gauges/gaugelabel.cpp gauges/gaugetape.cpp gauges/gaugehorizon.cpp dronelib/joystick.cpp qdeclarativetoucharea.cpp gauges/gaugearc.cpp uilistelement.cpp gauges/gaugehsi.cpp qmlappviewer.cpp .tmp/mardrone1.0.0/ && (cd `dirname .tmp/mardrone1.0.0` && $(TAR) mardrone1.0.0.tar mardrone1.0.0 && $(COMPRESS) mardrone1.0.0.tar) && $(MOVE) `dirname .tmp/mardrone1.0.0`/mardrone1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/mardrone1.0.0 clean:compiler_clean @@ -295,9 +299,9 @@ mocables: compiler_moc_header_make_all compiler_moc_source_make_all compiler_objective_c_make_all: compiler_objective_c_clean: -compiler_moc_header_make_all: moc_dronecontrol.cpp moc_navdata.cpp moc_video.cpp moc_gauge.cpp moc_gaugelabel.cpp moc_gaugetape.cpp moc_gaugehorizon.cpp moc_joystick.cpp moc_qdeclarativetoucharea.cpp moc_gaugearc.cpp moc_uilistelement.cpp moc_gaugehsi.cpp +compiler_moc_header_make_all: moc_dronecontrol.cpp moc_navdata.cpp moc_video.cpp moc_gauge.cpp moc_gaugelabel.cpp moc_gaugetape.cpp moc_gaugehorizon.cpp moc_joystick.cpp moc_qdeclarativetoucharea.cpp moc_gaugearc.cpp moc_uilistelement.cpp moc_gaugehsi.cpp moc_qmlappviewer.cpp compiler_moc_header_clean: - -$(DEL_FILE) moc_dronecontrol.cpp moc_navdata.cpp moc_video.cpp moc_gauge.cpp moc_gaugelabel.cpp moc_gaugetape.cpp moc_gaugehorizon.cpp moc_joystick.cpp moc_qdeclarativetoucharea.cpp moc_gaugearc.cpp moc_uilistelement.cpp moc_gaugehsi.cpp + -$(DEL_FILE) moc_dronecontrol.cpp moc_navdata.cpp moc_video.cpp moc_gauge.cpp moc_gaugelabel.cpp moc_gaugetape.cpp moc_gaugehorizon.cpp moc_joystick.cpp moc_qdeclarativetoucharea.cpp moc_gaugearc.cpp moc_uilistelement.cpp moc_gaugehsi.cpp moc_qmlappviewer.cpp moc_dronecontrol.cpp: dronelib/dronecontrol.h /Developer/Tools/Qt/moc $(DEFINES) $(INCPATH) -D__APPLE__ -D__GNUC__ dronelib/dronecontrol.h -o moc_dronecontrol.cpp @@ -339,46 +343,51 @@ moc_uilistelement.cpp: uilistelement.h moc_gaugehsi.cpp: gauges/gaugehsi.h /Developer/Tools/Qt/moc $(DEFINES) $(INCPATH) -D__APPLE__ -D__GNUC__ gauges/gaugehsi.h -o moc_gaugehsi.cpp +moc_qmlappviewer.cpp: qmlappviewer.h + /Developer/Tools/Qt/moc $(DEFINES) $(INCPATH) -D__APPLE__ -D__GNUC__ qmlappviewer.h -o moc_qmlappviewer.cpp + compiler_rcc_make_all: qrc_ardrone.cpp compiler_rcc_clean: -$(DEL_FILE) qrc_ardrone.cpp qrc_ardrone.cpp: ardrone.qrc \ - gauges/ati1.png \ - gauges/HeadingGauge.qml \ ConfigDialogDesktop.qml \ - ardrone_harmattan.qml \ + gauges/ati6.png \ + gauges/alt2.png \ gauges/GenericGauge.qml \ - gauges/AltGauge.qml \ + ConfigDialogAndroid.qml \ gear32x32.png \ - gauges/tach-2700-redline.png \ + ardrone_symbian.qml \ + ConfigDialogSymbian.qml \ + gauges/AttitudeGauge.qml \ + JoyStickCalibrator.qml \ + gauges/ati1.png \ + ardrone_harmattan.qml \ gauges/EfisPFD.qml \ - gauges/hdg2.png \ gauges/glareshield1.png \ - joyknob.png \ - CalibrateDialog.qml \ - BarGauge.qml \ - gauges/ati6.png \ - gauges/ati2.png \ + ConfigDialog.qml \ gauges/needle2.png \ - ardrone_symbian.qml \ + gauges/tach-2700-redline.png \ + gauges/ati2.png \ JoyStickTouch.qml \ - ConfigDialogSymbian.qml \ - JoyStickCalibrator.qml \ - CalibrateDialogDesktop.qml \ - gauges/ati3.png \ + gauges/HeadingGauge.qml \ + gauges/hdg1.png \ gauges/needle1.png \ - gauges/AttitudeGauge.qml \ - JoyStickIndicator.qml \ + BarGauge.qml \ + gauges/ati3.png \ joybox.png \ - ardrone_desktop.qml \ + gauges/hdg2.png \ + gauges/AltGauge.qml \ + joyknob.png \ + JoyStickCalibratorDesktop.qml \ gauges/ati4.png \ - ardrone_plainqml.qml \ - gauges/bezel.png \ - gauges/alt2.png \ - ConfigDialog.qml \ - gauges/hdg1.png \ + CalibrateDialogDesktop.qml \ + CalibrateDialog.qml \ + ardrone_android.qml \ gauges/ati5.png \ - JoyStickCalibratorDesktop.qml \ + JoyStickIndicator.qml \ + gauges/bezel.png \ + ardrone_plainqml.qml \ + ardrone_desktop.qml \ gauges/EfisPFD.qml \ gauges/AltGauge.qml \ gauges/qmldir @@ -404,7 +413,8 @@ compiler_clean: compiler_moc_header_clean compiler_rcc_clean ####### Compile main.o: main.cpp uilistelement.h \ - qdeclarativetoucharea.h + qdeclarativetoucharea.h \ + qmlappviewer.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp dronecontrol.o: dronelib/dronecontrol.cpp dronelib/dronecontrol.h \ @@ -450,6 +460,9 @@ uilistelement.o: uilistelement.cpp uilistelement.h gaugehsi.o: gauges/gaugehsi.cpp gauges/gaugehsi.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o gaugehsi.o gauges/gaugehsi.cpp +qmlappviewer.o: qmlappviewer.cpp qmlappviewer.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o qmlappviewer.o qmlappviewer.cpp + moc_dronecontrol.o: moc_dronecontrol.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_dronecontrol.o moc_dronecontrol.cpp @@ -486,6 +499,9 @@ moc_uilistelement.o: moc_uilistelement.cpp moc_gaugehsi.o: moc_gaugehsi.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_gaugehsi.o moc_gaugehsi.cpp +moc_qmlappviewer.o: moc_qmlappviewer.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_qmlappviewer.o moc_qmlappviewer.cpp + qrc_ardrone.o: qrc_ardrone.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o qrc_ardrone.o qrc_ardrone.cpp diff --git a/mardrone/ardrone_android.qml b/mardrone/ardrone_android.qml index 4e24d26..a5cb860 100644 --- a/mardrone/ardrone_android.qml +++ b/mardrone/ardrone_android.qml @@ -87,6 +87,7 @@ PageStackWindow { pitch:drone.dronePitch ias:drone.droneSpeed alt:drone.droneAltitude + heading:drone.droneYaw indicatorColor:"#00FF00" skyColor:"#00000000" groundColor:"#00000000" diff --git a/mardrone/ardrone_desktop.qml b/mardrone/ardrone_desktop.qml index d5bf0b8..8fe14df 100644 --- a/mardrone/ardrone_desktop.qml +++ b/mardrone/ardrone_desktop.qml @@ -92,37 +92,13 @@ Window { pitch:drone.dronePitch ias:drone.droneSpeed alt:drone.droneAltitude/10 + heading:drone.droneYaw indicatorColor:"green" skyColor:"#00000000" groundColor:"#00000000" width:640;height:480; } - Text { - y:100 - visible:drone.confShowDebug - color: "#00FF00" - id: droneCtrlValues - font.pixelSize:20 - text: "cmd:pitch=" + drone.pitch.toFixed(2) + " roll= " + drone.roll.toFixed(2) + " yaw=" + drone.yaw.toFixed(2) + " vv= " + drone.vVelocity.toFixed(2) - } - - Text { - y:115 - visible:drone.confShowDebug - color: "#00FF00" - id: droneNavData - font.pixelSize:20 - text: "pitch=" + Math.round(drone.dronePitch) + " roll= " + Math.round(drone.droneRoll) + "yaw=" + Math.round(drone.droneYaw) + " alt= " + Math.round(drone.droneAltitude) - } - Text { - y:130 - visible:drone.confShowDebug - color: "#00FF00" - id: droneStatus - font.pixelSize:20 - text: drone.decodedStatus - } /* Button { y:150;x:0 height: 50 @@ -179,6 +155,45 @@ Window { text:"Elevator" } } + Text { + x:0 + anchors.top:parent.top + visible:drone.confShowDebug + color: "#00FF00" + id: droneCtrlValues + font.pixelSize:10 + text: "cmd:pitch=" + drone.pitch.toFixed(2) + " roll= " + drone.roll.toFixed(2) + " yaw=" + drone.yaw.toFixed(2) + " vv= " + drone.vVelocity.toFixed(2) + } + + Text { + x:400 + anchors.top:parent.top + visible:drone.confShowDebug + color: "#00FF00" + id: droneNavData + font.pixelSize:10 + text: "pitch=" + Math.round(drone.dronePitch) + " roll= " + Math.round(drone.droneRoll) + "yaw=" + Math.round(drone.droneYaw) + " alt= " + Math.round(drone.droneAltitude) + } + + Text { + x:400 + anchors.bottom:parent.bottom + visible:drone.confShowDebug + color: "#00FF00" + id: droneStatus + font.pixelSize:10 + text: drone.decodedStatus + } + Text { + x:00 + anchors.bottom:parent.bottom + visible:drone.confShowDebug + // visible:droneVideo.recVideo + color: "#00FF00" + id: droneFrameSeq + font.pixelSize:10 + text: droneVideo.videoFileName+ " "+droneVideo.frameSeq + } JoyStickTouch { id:lj @@ -232,6 +247,7 @@ Window { pitch:drone.dronePitch ias:drone.droneSpeed alt:drone.droneAltitude/10 + heading:drone.droneYaw // bezel:"glareshield1.png" } Grid { diff --git a/mardrone/ardrone_harmattan.qml b/mardrone/ardrone_harmattan.qml index 49c3fe5..7aa238c 100644 --- a/mardrone/ardrone_harmattan.qml +++ b/mardrone/ardrone_harmattan.qml @@ -82,6 +82,7 @@ PageStackWindow { pitch:drone.dronePitch ias:drone.droneSpeed alt:drone.droneAltitude + heading:drone.droneYaw indicatorColor:"#00FF00" skyColor:"#00000000" groundColor:"#00000000" diff --git a/mardrone/dronelib/dronecontrol.cpp b/mardrone/dronelib/dronecontrol.cpp index 9571a68..2a52f0d 100644 --- a/mardrone/dronelib/dronecontrol.cpp +++ b/mardrone/dronelib/dronecontrol.cpp @@ -421,7 +421,7 @@ DroneThread::DroneThread(DroneControl *parentp,QHostAddress host) } } if(!navSock->bind(QHostAddress::Any,5554)) - qDebug() << "Cant open any: 5554" << navSock->errorString() ; + qDebug() << "DroneThread::DroneThread Can't bind to port: 5554" << navSock->errorString() ; //#if 0 // Qt 4.7.x imreq.imr_multiaddr.s_addr=inet_addr("224.1.1.1"); diff --git a/mardrone/dronelib/video.cpp b/mardrone/dronelib/video.cpp index 7ba76ad..a4ec155 100644 --- a/mardrone/dronelib/video.cpp +++ b/mardrone/dronelib/video.cpp @@ -18,7 +18,15 @@ ! ! *===================================================================*/ +#include +#include +#include +#include +#include #include "video.h" +#include +#include +#include #include #include #include @@ -99,12 +107,39 @@ QRectF DroneVideo::boundingRect() const VideoThread::VideoThread(DroneVideo *parentp,QHostAddress host,QImage *_image) { + struct ip_mreq imreq; + QString my_ip; + my_ip="192.168.1.2"; image=_image; qDebug() << "videoThread::videoThread"; stopped=false; parent=parentp; videoSock=new QUdpSocket(); - videoSock->bind(QHostAddress::Any,5555); + if(!videoSock->bind(QHostAddress::Any,5555)) qDebug() << "VideoThread::VideoThread ** Cant Bind to port 5555 ***" << videoSock->errorString(); + QList netconfs=QNetworkConfigurationManager().allConfigurations(); + foreach (QNetworkConfiguration np,netconfs) { + qDebug() << "network Confifuration name " << np.name() << np.bearerName() << np.bearerTypeName(); + QNetworkSession ns(np); + if(ns.interface().addressEntries().empty()) + qDebug() << "network session " << ns.interface().humanReadableName() << "**NotConfig**"; + else { + qDebug() << "network session " << ns.interface().humanReadableName() << ns.interface().addressEntries().first().ip(); + // Ubuntu may give wlan0 as "Ethernet" + if((np.bearerName()==QString("WLAN")) || (ns.interface().humanReadableName()==QString("wlan0")) ) { + my_ip=ns.interface().addressEntries().first().ip().toString(); + qDebug() << "My IP is " << my_ip; + } + } + } + // Qt 4.7.x + imreq.imr_multiaddr.s_addr=inet_addr("224.1.1.1"); + imreq.imr_interface.s_addr=inet_addr(my_ip.toAscii()); + setsockopt(videoSock->socketDescriptor(),IPPROTO_IP,IP_ADD_MEMBERSHIP,&imreq,sizeof(imreq)); +//#else + // Qt 4.8 + if(!videoSock->joinMulticastGroup(QHostAddress("224.1.1.1"))) + qDebug() << "VideoThread::VideoThread can't join multicast Group 224.1.1.1" << videoSock->errorString(); +//#endif droneHost=host; videoRec=FALSE; videoFile=NULL; diff --git a/mardrone/gauges/EfisPFD.qml b/mardrone/gauges/EfisPFD.qml index 71b7d5c..fefd82b 100644 --- a/mardrone/gauges/EfisPFD.qml +++ b/mardrone/gauges/EfisPFD.qml @@ -8,6 +8,7 @@ Item { property real roll property real alt property real ias + property real heading property real tapeMargin:60 property color indicatorColor:"white" property bool showHSI:false @@ -96,7 +97,7 @@ Item { gaugeStyle:5 color:indicatorColor backColor:"#40000000" - value:alt + value:heading // x:90; anchors.horizontalCenter: parent.horizontalCenter y:tapeMargin/2-10 @@ -112,7 +113,7 @@ Item { tickMinor:5 color:indicatorColor backColor:"#40000000" - value:alt + value:heading anchors.horizontalCenter: parent.horizontalCenter anchors.bottom:parent.bottom anchors.bottomMargin: 20 diff --git a/mardrone/gauges/gaugearc.cpp b/mardrone/gauges/gaugearc.cpp index 969a996..5227aff 100644 --- a/mardrone/gauges/gaugearc.cpp +++ b/mardrone/gauges/gaugearc.cpp @@ -55,7 +55,6 @@ void GaugeArc::paintArcScale(QPainter *painter,int width,int height) painter->drawChord(QRect(-xo,-xo,2*xo,2*xo),0,360*16); painter->setBrush(cbrush); painter->setPen(pen); - qDebug() << "paintArcScale" << m_lowPosition << m_highPosition; while(alpha<=(m_highPosition GaugeHSI::GaugeHSI(QGraphicsItem *parent) : Gauge(parent) @@ -10,7 +11,8 @@ void GaugeHSI::paintHSI(QPainter *painter,int width,int height) float alpha; int xo=(width/2)/m_scale; int yo=(height/2)/m_scale; - painter->setTransform(QTransform().scale(m_scale,m_scale)); + int r=width/2; + painter->setTransform(QTransform().translate(scenePos().x()+width/2,scenePos().y()+height/2).scale(m_scale,m_scale)); QTransform savematrix= painter->transform (); QPen pen(m_color); pen.setWidth(1); @@ -24,8 +26,10 @@ void GaugeHSI::paintHSI(QPainter *painter,int width,int height) QBrush backBrush(m_backColor); alpha=0; - painter->setFont(m_font); - QFontMetrics fm(m_font); + QFont font=m_font; + font.setPixelSize(font.pixelSize()*width/150.0); // Scale font relative to "default" size + painter->setFont(font); + QFontMetrics fm(font); QPolygon zeroTriangle; QPolygon zeroPlane; @@ -52,20 +56,20 @@ void GaugeHSI::paintHSI(QPainter *painter,int width,int height) - painter->setTransform(QTransform().translate(xo+scenePos().x()/m_scale, yo+scenePos().y()/m_scale),true); + painter->setBrush(backBrush); painter->setPen(nopen); - painter->drawChord(QRect(-xo,-xo,2*xo,2*xo),0,360*16); + painter->drawChord(QRect(-r,-r,2*r,2*r),0,360*16); painter->setBrush(cbrush); painter->setPen(pen); painter->drawPolygon(zeroTriangle); - painter->drawPolygon(zeroPlane); + painter->drawPolygon(zeroPlane); while(alpha<360) { QString label; painter->setTransform(savematrix); - painter->setTransform(QTransform().translate(xo+scenePos().x()/m_scale, yo+scenePos().y()/m_scale).rotate(alpha+m_value),true); + painter->setTransform(QTransform().rotate(alpha+m_value),true); label=QString("%1").arg(alpha/10); if(alpha==0) label=" N"; if(alpha==90) label=" E"; @@ -73,24 +77,24 @@ void GaugeHSI::paintHSI(QPainter *painter,int width,int height) if(alpha==270) label=" W"; int labelWidth=fm.width(label); int labelHeight=fm.height(); - painter->drawText(labelWidth/-2,-xo+10+labelHeight,label); - painter->drawLine(0,xo-2,0,xo-12); + painter->drawText(labelWidth/-2,-r+10+labelHeight,label); + painter->drawLine(0,r-2,0,r-12); painter->setTransform(savematrix); - painter->setTransform(QTransform().translate(xo+scenePos().x()/m_scale, yo+scenePos().y()/m_scale).rotate(alpha+m_value+10),true); - painter->drawLine(0,xo-2,0,xo-7); + painter->setTransform(QTransform().rotate(alpha+m_value+10),true); + painter->drawLine(0,r-2,0,r-7); painter->setTransform(savematrix); - painter->setTransform(QTransform().translate(xo+scenePos().x()/m_scale, yo+scenePos().y()/m_scale).rotate(alpha+m_value+20),true); - painter->drawLine(0,xo-2,0,xo-7); + painter->setTransform(QTransform().rotate(alpha+m_value+20),true); + painter->drawLine(0,r-2,0,r-7); painter->setTransform(savematrix); - painter->setTransform(QTransform().translate(xo+scenePos().x()/m_scale, yo+scenePos().y()/m_scale).rotate(alpha+m_value+5),true); - painter->drawLine(0,xo-2,0,xo-7); + painter->setTransform(QTransform().rotate(alpha+m_value+5),true); + painter->drawLine(0,r-2,0,r-7); painter->setTransform(savematrix); - painter->setTransform(QTransform().translate(xo+scenePos().x()/m_scale, yo+scenePos().y()/m_scale).rotate(alpha+m_value+15),true); - painter->drawLine(0,xo-2,0,xo-7); + painter->setTransform(QTransform().rotate(alpha+m_value+15),true); + painter->drawLine(0,r-2,0,r-7); painter->setTransform(savematrix); - painter->setTransform(QTransform().translate(xo+scenePos().x()/m_scale, yo+scenePos().y()/m_scale).rotate(alpha+m_value+25),true); - painter->drawLine(0,xo-2,0,xo-7); - alpha+=m_tickIncrement; + painter->setTransform(QTransform().rotate(alpha+m_value+25),true); + painter->drawLine(0,r-2,0,r-7); + alpha+=m_tickIncrement?m_tickIncrement:10; } } diff --git a/mardrone/mardrone.pro.user b/mardrone/mardrone.pro.user index d1381ca..7479f2b 100644 --- a/mardrone/mardrone.pro.user +++ b/mardrone/mardrone.pro.user @@ -1,6 +1,6 @@ - + ProjectExplorer.Project.ActiveTarget @@ -91,7 +91,7 @@ 0 0 - ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-macos-generic-mach_o-64bit./usr/bin/gdb + ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-macos-generic-mach_o-32bit./usr/bin/gdb qmake @@ -140,7 +140,107 @@ 3 false - 1 + + INVALID + + + qmake + + QtProjectManager.QMakeBuildStep + false + true + + false + + + Make + + Qt4ProjectManager.MakeStep + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + Make + + Qt4ProjectManager.MakeStep + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Qt 4.8.1 (qt-everywhere-ios-gles2-4.8.1) Debug + + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + 4 + true + + + INVALID + + + qmake + + QtProjectManager.QMakeBuildStep + false + true + -spec default + false + + + Make + + Qt4ProjectManager.MakeStep + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + Make + + Qt4ProjectManager.MakeStep + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Qt 4.8.1 (qt-everywhere-ios-gles2-4.8.1) Release + + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 4 + true + + 3 0 @@ -286,7 +386,7 @@ 2 false - Harmattan Target - QEmu PR1.2 (Qt SDK) Release + Qt 4.7.4 (harmattan_10.2011.34-1_rt1.2) Release Qt4ProjectManager.Qt4BuildConfiguration 0 @@ -569,7 +669,16 @@ 2012-05-07T15:56:16 - 2 + + Upload files via SFTP + + MaemoDirectDeviceUploadStep + + + + + + 3 Deploy ProjectExplorer.BuildSteps.Deploy @@ -578,7 +687,7 @@ Build Debian Package and Install to Harmattan Device DeployToHarmattan - 0 + 1 1 @@ -712,12 +821,12 @@ 2 false - Necessitas Qt 4.8.0 for Android armv5 Debug + Necessitas Qt 4.8.0 for Android armv7a Debug Qt4ProjectManager.Qt4BuildConfiguration 2 - 1 + 2 true @@ -945,7 +1054,859 @@ false true - 2 + + true + true + + + false + false + false + false + false + false + false + false + true + true + 0.01 + 0.01 + 10 + 10 + true + true + 25 + 25 + + + true + true + valgrind + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + Run on Android device + Run on Android device11 + Qt4ProjectManager.AndroidRunConfiguration + 3768 + true + false + true + + + true + true + + + false + false + false + false + false + false + false + false + true + true + 0.01 + 0.01 + 10 + 10 + true + true + 25 + 25 + + + true + true + valgrind + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + Run on Android device + Run on Android device12 + Qt4ProjectManager.AndroidRunConfiguration + 3768 + true + false + true + + + true + true + + + false + false + false + false + false + false + false + false + true + true + 0.01 + 0.01 + 10 + 10 + true + true + 25 + 25 + + + true + true + valgrind + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + Run on Android device + Run on Android device13 + Qt4ProjectManager.AndroidRunConfiguration + 3768 + true + false + true + + + true + true + + + false + false + false + false + false + false + false + false + true + true + 0.01 + 0.01 + 10 + 10 + true + true + 25 + 25 + + + true + true + valgrind + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + Run on Android device + Run on Android device14 + Qt4ProjectManager.AndroidRunConfiguration + 3768 + true + false + true + + + true + true + + + false + false + false + false + false + false + false + false + true + true + 0.01 + 0.01 + 10 + 10 + true + true + 25 + 25 + + + true + true + valgrind + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + Run on Android device + Run on Android device3 + Qt4ProjectManager.AndroidRunConfiguration + 3768 + true + false + true + + + true + true + + + false + false + false + false + false + false + false + false + true + true + 0.01 + 0.01 + 10 + 10 + true + true + 25 + 25 + + + true + true + valgrind + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + Run on Android device + Run on Android device4 + Qt4ProjectManager.AndroidRunConfiguration + 3768 + true + false + true + + + true + true + + + false + false + false + false + false + false + false + false + true + true + 0.01 + 0.01 + 10 + 10 + true + true + 25 + 25 + + + true + true + valgrind + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + Run on Android device + Run on Android device5 + Qt4ProjectManager.AndroidRunConfiguration + 3768 + true + false + true + + + true + true + + + false + false + false + false + false + false + false + false + true + true + 0.01 + 0.01 + 10 + 10 + true + true + 25 + 25 + + + true + true + valgrind + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + Run on Android device + Run on Android device6 + Qt4ProjectManager.AndroidRunConfiguration + 3768 + true + false + true + + + true + true + + + false + false + false + false + false + false + false + false + true + true + 0.01 + 0.01 + 10 + 10 + true + true + 25 + 25 + + + true + true + valgrind + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + Run on Android device + Run on Android device7 + Qt4ProjectManager.AndroidRunConfiguration + 3768 + true + false + true + + + true + true + + + false + false + false + false + false + false + false + false + true + true + 0.01 + 0.01 + 10 + 10 + true + true + 25 + 25 + + + true + true + valgrind + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + Run on Android device + Run on Android device8 + Qt4ProjectManager.AndroidRunConfiguration + 3768 + true + false + true + + + true + true + + + false + false + false + false + false + false + false + false + true + true + 0.01 + 0.01 + 10 + 10 + true + true + 25 + 25 + + + true + true + valgrind + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + Run on Android device + Run on Android device9 + Qt4ProjectManager.AndroidRunConfiguration + 3768 + true + false + true + + + true + true + + + false + false + false + false + false + false + false + false + true + true + 0.01 + 0.01 + 10 + 10 + true + true + 25 + 25 + + + true + true + valgrind + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + Run on Android device + Run on Android device10 + Qt4ProjectManager.AndroidRunConfiguration + 3768 + true + false + true + + 14