diff --git a/ground/openpilotgcs/src/libs/opmapcontrol/src/mapwidget/homeitem.cpp b/ground/openpilotgcs/src/libs/opmapcontrol/src/mapwidget/homeitem.cpp index 7ca0d033b..22f5062e3 100644 --- a/ground/openpilotgcs/src/libs/opmapcontrol/src/mapwidget/homeitem.cpp +++ b/ground/openpilotgcs/src/libs/opmapcontrol/src/mapwidget/homeitem.cpp @@ -28,7 +28,7 @@ namespace mapcontrol { HomeItem::HomeItem(MapGraphicItem* map,OPMapWidget* parent):safe(true),map(map),mapwidget(parent), - showsafearea(true),toggleRefresh(true),safearea(1000),altitude(0),isDragging(false) + showsafearea(true),safearea(1000),altitude(0),isDragging(false),toggleRefresh(true) { pic.load(QString::fromUtf8(":/markers/images/home2.svg")); pic=pic.scaled(30,30,Qt::IgnoreAspectRatio); diff --git a/ground/openpilotgcs/src/libs/opmapcontrol/src/mapwidget/opmapwidget.cpp b/ground/openpilotgcs/src/libs/opmapcontrol/src/mapwidget/opmapwidget.cpp index 419b52a0c..54cc1e575 100644 --- a/ground/openpilotgcs/src/libs/opmapcontrol/src/mapwidget/opmapwidget.cpp +++ b/ground/openpilotgcs/src/libs/opmapcontrol/src/mapwidget/opmapwidget.cpp @@ -34,7 +34,7 @@ namespace mapcontrol { OPMapWidget::OPMapWidget(QWidget *parent, Configuration *config):QGraphicsView(parent),configuration(config),UAV(0),GPS(0),Home(0) - ,followmouse(true),compass(0),showuav(false),showhome(false),diagTimer(0),diagGraphItem(0),showDiag(false),overlayOpacity(1) + ,followmouse(true),compass(0),showuav(false),showhome(false),showDiag(false),diagGraphItem(0),diagTimer(0),overlayOpacity(1) { setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); core=new internals::Core; @@ -392,7 +392,7 @@ namespace mapcontrol } void OPMapWidget::WPDeleteAll() { -// int x=0; + int x=0; foreach(QGraphicsItem* i,map->childItems()) { WayPointItem* w=qgraphicsitem_cast(i); @@ -419,9 +419,7 @@ namespace mapcontrol } } } - return false; } - void OPMapWidget::deleteAllOverlays() { foreach(QGraphicsItem* i,map->childItems()) diff --git a/ground/openpilotgcs/src/libs/opmapcontrol/src/mapwidget/uavitem.cpp b/ground/openpilotgcs/src/libs/opmapcontrol/src/mapwidget/uavitem.cpp index 3870596a0..b80ce2c31 100644 --- a/ground/openpilotgcs/src/libs/opmapcontrol/src/mapwidget/uavitem.cpp +++ b/ground/openpilotgcs/src/libs/opmapcontrol/src/mapwidget/uavitem.cpp @@ -33,9 +33,8 @@ namespace mapcontrol double UAVItem::groundspeed_mps_filt = 0; - UAVItem::UAVItem(MapGraphicItem* map,OPMapWidget* parent,QString uavPic):map(map),mapwidget(parent) - ,altitude(0),showtrail(true),showtrailline(true),trailtime(5),traildistance(50),autosetreached(true) - ,autosetdistance(100),showUAVInfo(false),showJustChanged(false),refreshPaint_flag(true) + UAVItem::UAVItem(MapGraphicItem* map,OPMapWidget* parent,QString uavPic):map(map),mapwidget(parent),showtrail(true),showtrailline(true),trailtime(5),traildistance(50),autosetreached(true) + ,autosetdistance(100),altitude(0),showUAVInfo(false),showJustChanged(false) { pic.load(uavPic); this->setFlag(QGraphicsItem::ItemIsMovable,false); diff --git a/ground/openpilotgcs/src/libs/opmapcontrol/src/mapwidget/uavitem.h b/ground/openpilotgcs/src/libs/opmapcontrol/src/mapwidget/uavitem.h index bc063f0fc..a135d9685 100644 --- a/ground/openpilotgcs/src/libs/opmapcontrol/src/mapwidget/uavitem.h +++ b/ground/openpilotgcs/src/libs/opmapcontrol/src/mapwidget/uavitem.h @@ -223,7 +223,6 @@ namespace mapcontrol void generateArrowhead(); MapGraphicItem* map; - OPMapWidget* mapwidget; QPolygonF arrowHead; QLineF arrowShaft; int altitude; @@ -238,6 +237,7 @@ namespace mapcontrol double yawRate_dps; QPixmap pic; core::Point localposition; + OPMapWidget* mapwidget; QGraphicsItemGroup* trail; QGraphicsItemGroup * trailLine; internals::PointLatLng lasttrailline; diff --git a/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configfixedwingwidget.cpp b/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configfixedwingwidget.cpp index 6636c51f4..cbb7f94cf 100644 --- a/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configfixedwingwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configfixedwingwidget.cpp @@ -299,7 +299,7 @@ bool ConfigFixedWingWidget::setupFrameFixedWing(QString airframeType) int channel; //disable all - for (channel=0; (unsigned int) channelsetupUi(this); diff --git a/ground/openpilotgcs/src/plugins/config/configvehicletypewidget.cpp b/ground/openpilotgcs/src/plugins/config/configvehicletypewidget.cpp index 8859468a6..19047af55 100644 --- a/ground/openpilotgcs/src/plugins/config/configvehicletypewidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configvehicletypewidget.cpp @@ -109,7 +109,7 @@ ConfigVehicleTypeWidget::ConfigVehicleTypeWidget(QWidget *parent) : ConfigTaskWi //Generate lists of mixerTypeNames, mixerVectorNames, channelNames channelNames << "None"; - for (unsigned int i = 0; i < ActuatorSettings::CHANNELADDR_NUMELEM; i++) { + for (int i = 0; i < ActuatorSettings::CHANNELADDR_NUMELEM; i++) { mixerTypes << QString("Mixer%1Type").arg(i+1); mixerVectors << QString("Mixer%1Vector").arg(i+1); diff --git a/ground/openpilotgcs/src/plugins/gpsdisplay/telemetryparser.cpp b/ground/openpilotgcs/src/plugins/gpsdisplay/telemetryparser.cpp index b0db7f291..e08d2be52 100644 --- a/ground/openpilotgcs/src/plugins/gpsdisplay/telemetryparser.cpp +++ b/ground/openpilotgcs/src/plugins/gpsdisplay/telemetryparser.cpp @@ -117,7 +117,7 @@ void TelemetryParser::updateSats( UAVObject* object1) { UAVObjectField* azimuth = object1->getField(QString("Azimuth")); UAVObjectField* snr = object1->getField(QString("SNR")); - for (unsigned int i=0;i< prn->getNumElements();i++) { + for (int i=0;i< prn->getNumElements();i++) { emit satellite(i,prn->getValue(i).toInt(),elevation->getValue(i).toInt(), azimuth->getValue(i).toInt(), snr->getValue(i).toInt()); } diff --git a/ground/openpilotgcs/src/plugins/ipconnection/ipconnectionplugin.cpp b/ground/openpilotgcs/src/plugins/ipconnection/ipconnectionplugin.cpp index 78a056378..5d166584c 100644 --- a/ground/openpilotgcs/src/plugins/ipconnection/ipconnectionplugin.cpp +++ b/ground/openpilotgcs/src/plugins/ipconnection/ipconnectionplugin.cpp @@ -73,7 +73,7 @@ void IPConnection::onOpenDevice(QString HostName, int Port, bool UseTCP) { QAbstractSocket *ipSocket; const int Timeout = 5 * 1000; -// int state; + int state; ipConMutex.lock(); if (UseTCP) { diff --git a/ground/openpilotgcs/src/plugins/opmap/flightdatamodel.cpp b/ground/openpilotgcs/src/plugins/opmap/flightdatamodel.cpp index 6e4a0d045..a1aafb21f 100644 --- a/ground/openpilotgcs/src/plugins/opmap/flightdatamodel.cpp +++ b/ground/openpilotgcs/src/plugins/opmap/flightdatamodel.cpp @@ -169,7 +169,6 @@ bool flightDataModel::setColumnByIndex(pathPlanData *row,const int index,const default: return false; } - return false; } QVariant flightDataModel::getColumnByIndex(const pathPlanData *row,const int index) const { diff --git a/ground/openpilotgcs/src/plugins/opmap/opmapgadgetwidget.cpp b/ground/openpilotgcs/src/plugins/opmap/opmapgadgetwidget.cpp index fe2e948d7..8a3d8426f 100644 --- a/ground/openpilotgcs/src/plugins/opmap/opmapgadgetwidget.cpp +++ b/ground/openpilotgcs/src/plugins/opmap/opmapgadgetwidget.cpp @@ -1772,7 +1772,7 @@ void OPMapGadgetWidget::onAddWayPointAct_triggered(internals::PointLatLng coord) if (m_map_mode != Normal_MapMode) return; - + float alt=15; mapProxy->createWayPoint(coord); } diff --git a/ground/openpilotgcs/src/plugins/rawhid/pjrc_rawhid_mac.cpp b/ground/openpilotgcs/src/plugins/rawhid/pjrc_rawhid_mac.cpp index b490f5ddc..382c43829 100644 --- a/ground/openpilotgcs/src/plugins/rawhid/pjrc_rawhid_mac.cpp +++ b/ground/openpilotgcs/src/plugins/rawhid/pjrc_rawhid_mac.cpp @@ -315,7 +315,7 @@ int pjrc_rawhid::send(int num, void *buf, int len, int timeout) QString pjrc_rawhid::getserial(int num) { hid_t *hid; -// char buf[128]; + char buf[128]; hid = get_hid(num); diff --git a/ground/openpilotgcs/src/plugins/rawhid/usbmonitor_mac.cpp b/ground/openpilotgcs/src/plugins/rawhid/usbmonitor_mac.cpp index 3e661c598..51fd6cce7 100644 --- a/ground/openpilotgcs/src/plugins/rawhid/usbmonitor_mac.cpp +++ b/ground/openpilotgcs/src/plugins/rawhid/usbmonitor_mac.cpp @@ -45,8 +45,8 @@ static bool HID_GetStrProperty(IOHIDDeviceRef dev, CFStringRef property, QString */ USBMonitor::USBMonitor(QObject *parent): QThread(parent) { hid_manager=NULL; -// CFMutableDictionaryRef dict; -// CFNumberRef num; + CFMutableDictionaryRef dict; + CFNumberRef num; IOReturn ret; m_instance = this; @@ -131,7 +131,7 @@ void USBMonitor::attach_callback(void *context, IOReturn r, void *hid_mgr, IOHID { bool got_properties = true; -// CFTypeRef prop; + CFTypeRef prop; USBPortInfo deviceInfo; deviceInfo.dev_handle = dev; diff --git a/ground/openpilotgcs/src/plugins/uavobjectutil/uavobjectutilmanager.cpp b/ground/openpilotgcs/src/plugins/uavobjectutil/uavobjectutilmanager.cpp index bd30b65a0..a30172fb0 100644 --- a/ground/openpilotgcs/src/plugins/uavobjectutil/uavobjectutilmanager.cpp +++ b/ground/openpilotgcs/src/plugins/uavobjectutil/uavobjectutilmanager.cpp @@ -276,7 +276,7 @@ QByteArray UAVObjectUtilManager::getBoardCPUSerial() QByteArray cpuSerial; FirmwareIAPObj::DataFields firmwareIapData = getFirmwareIap(); - for (unsigned int i = 0; i < FirmwareIAPObj::CPUSERIAL_NUMELEM; i++) + for (int i = 0; i < FirmwareIAPObj::CPUSERIAL_NUMELEM; i++) cpuSerial.append(firmwareIapData.CPUSerial[i]); return cpuSerial; @@ -296,7 +296,7 @@ QByteArray UAVObjectUtilManager::getBoardDescription() QByteArray ret; FirmwareIAPObj::DataFields firmwareIapData = getFirmwareIap(); - for (unsigned int i = 0; i < FirmwareIAPObj::DESCRIPTION_NUMELEM; i++) + for (int i = 0; i < FirmwareIAPObj::DESCRIPTION_NUMELEM; i++) ret.append(firmwareIapData.Description[i]); return ret; diff --git a/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/configtaskwidget.cpp b/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/configtaskwidget.cpp index ee1623ded..7fb8d70c7 100644 --- a/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/configtaskwidget.cpp +++ b/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/configtaskwidget.cpp @@ -32,7 +32,7 @@ /** * Constructor */ -ConfigTaskWidget::ConfigTaskWidget(QWidget *parent) : QWidget(parent),isConnected(false),allowWidgetUpdates(true),smartsave(NULL),dirty(false),outOfLimitsStyle("background-color: rgb(255, 0, 0);"),timeOut(NULL) +ConfigTaskWidget::ConfigTaskWidget(QWidget *parent) : QWidget(parent),isConnected(false),smartsave(NULL),dirty(false),outOfLimitsStyle("background-color: rgb(255, 0, 0);"),timeOut(NULL),allowWidgetUpdates(true) { pm = ExtensionSystem::PluginManager::instance(); objManager = pm->getObject(); diff --git a/ground/openpilotgcs/src/plugins/uavtalk/uavtalk.cpp b/ground/openpilotgcs/src/plugins/uavtalk/uavtalk.cpp index 2e7faff1f..03da96a6f 100644 --- a/ground/openpilotgcs/src/plugins/uavtalk/uavtalk.cpp +++ b/ground/openpilotgcs/src/plugins/uavtalk/uavtalk.cpp @@ -449,7 +449,7 @@ bool UAVTalk::processInputByte(quint8 rxbyte) default: rxState = STATE_SYNC; stats.rxErrors++; - UAVTALK_QXTLOG_DEBUG("UAVTalk: \?\?\?->Sync"); //Use the escape character for '?' so that the tripgraph isn't triggered. + UAVTALK_QXTLOG_DEBUG("UAVTalk: ???->Sync"); } // Done diff --git a/ground/openpilotgcs/src/plugins/uploader/SSP/port.h b/ground/openpilotgcs/src/plugins/uploader/SSP/port.h index 1521ab412..ff4725b99 100644 --- a/ground/openpilotgcs/src/plugins/uploader/SSP/port.h +++ b/ground/openpilotgcs/src/plugins/uploader/SSP/port.h @@ -43,7 +43,7 @@ public: uint8_t maxRetryCount; // max. times to try to transmit the 'send' packet uint16_t max_retry; // Maximum number of retrys for a single transmit. int32_t timeoutLen; // how long to wait for each retry to succeed - uint32_t timeout; // current timeout. when 'time' reaches this point we have timed out + int32_t timeout; // current timeout. when 'time' reaches this point we have timed out uint8_t txSeqNo; // current 'send' packet sequence number uint16_t rxBufPos; // current buffer position in the receive packet uint16_t rxBufLen; // number of 'data' bytes in the buffer