From: Kate Alhola Date: Wed, 11 Apr 2012 12:04:02 +0000 (+0300) Subject: sync repo X-Git-Url: http://git.maemo.org/git/?p=mardrone;a=commitdiff_plain;h=372d9eeeee4e86a9f1dfb557fc97a9b644929ee4;hp=28f5a0cf898ef5c975fab1e144008e61fcc38d9b sync repo --- diff --git a/mardrone/dronelib/dronecontrol.cpp b/mardrone/dronelib/dronecontrol.cpp index ca6aab4..b0e4a4b 100644 --- a/mardrone/dronelib/dronecontrol.cpp +++ b/mardrone/dronelib/dronecontrol.cpp @@ -268,6 +268,16 @@ void DroneControl::setConfUseJoyStick(bool val) emit configChanged(); }; +int DroneControl::confSimuMode() +{ + return droneSettings->value("SimuMode",true).toInt(); +}; +void DroneControl::setConfSimuMode(int val) +{ + droneSettings->setValue("SimuMode",val); + emit configChanged(); +}; + bool DroneControl::confFullScreen() { return droneSettings->value("fullScreen",true).toBool(); @@ -278,6 +288,7 @@ void DroneControl::setConfFullScreen(bool val) emit configChanged(); }; + float DroneControl::confForwardGain() { return droneSettings->value("forwardGain",1.0).toFloat(); diff --git a/mardrone/dronelib/video.cpp b/mardrone/dronelib/video.cpp index 5bf3328..c8363ca 100644 --- a/mardrone/dronelib/video.cpp +++ b/mardrone/dronelib/video.cpp @@ -21,6 +21,10 @@ #include "video.h" #include +#ifdef QT_IOS +#define NO_VIDEO +#endif + DroneVideo::DroneVideo() { droneHost.setAddress("192.168.1.1"); @@ -90,6 +94,7 @@ void VideoThread::run() luma_only=FALSE; num_picture_decoded=0; /// Picture configuration +#ifndef NO_VIDEO picture.format = PIX_FMT_YUV420P; picture.width = pictureWidth; picture.height = pictureHeight; @@ -102,7 +107,9 @@ void VideoThread::run() picture.cr_line_size = pictureWidth / 2; picture.y_pad = 0; picture.c_pad = 0; + qDebug() << "video_codec_open=" << video_codec_open(&controller, (codec_type_t)codec_type); +#endif //stateTimer->start(1000); qDebug() << "videoThread::run() initialized"; sendVideoPort("AT"); @@ -150,6 +157,7 @@ void VideoThread::decodeTransform(QByteArray &videoData) bool_t got_image = FALSE; //qDebug() <<"VideoThread::decodeTransform" << controller.video_codec; +#ifndef NO_VIDEO if(controller.video_codec!=NULL) video_decode_blockline( &controller, &picture, &got_image ); //else qDebug() << "No video controller"; //qDebug() <<"VideoThread::decodeTransform 2"; @@ -168,7 +176,7 @@ void VideoThread::decodeTransform(QByteArray &videoData) // qDebug() << "pic " << num_picture_decoded; } - +#endif };