mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
Fixed several compile warning complaints.
Conflicts: ground/openpilotgcs/src/libs/opmapcontrol/src/mapwidget/uavitem.cpp
This commit is contained in:
parent
fa465c54a8
commit
a94142ec30
@ -28,7 +28,7 @@
|
||||
namespace mapcontrol
|
||||
{
|
||||
HomeItem::HomeItem(MapGraphicItem* map,OPMapWidget* parent):safe(true),map(map),mapwidget(parent),
|
||||
showsafearea(true),safearea(1000),altitude(0),isDragging(false),toggleRefresh(true)
|
||||
showsafearea(true),toggleRefresh(true),safearea(1000),altitude(0),isDragging(false)
|
||||
{
|
||||
pic.load(QString::fromUtf8(":/markers/images/home2.svg"));
|
||||
pic=pic.scaled(30,30,Qt::IgnoreAspectRatio);
|
||||
|
@ -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),showDiag(false),diagGraphItem(0),diagTimer(0),overlayOpacity(1)
|
||||
,followmouse(true),compass(0),showuav(false),showhome(false),diagTimer(0),diagGraphItem(0),showDiag(false),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<WayPointItem*>(i);
|
||||
@ -419,7 +419,9 @@ namespace mapcontrol
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void OPMapWidget::deleteAllOverlays()
|
||||
{
|
||||
foreach(QGraphicsItem* i,map->childItems())
|
||||
|
@ -291,7 +291,7 @@ bool ConfigFixedWingWidget::setupFrameFixedWing(QString airframeType)
|
||||
|
||||
int channel;
|
||||
//disable all
|
||||
for (channel=0; channel<VehicleConfig::CHANNEL_NUMELEM; channel++)
|
||||
for (channel=0; (unsigned int) channel<VehicleConfig::CHANNEL_NUMELEM; channel++)
|
||||
{
|
||||
setMixerType(mixer,channel,VehicleConfig::MIXERTYPE_DISABLED);
|
||||
resetMixerVector(mixer, channel);
|
||||
@ -371,7 +371,7 @@ bool ConfigFixedWingWidget::setupFrameElevon(QString airframeType)
|
||||
int channel;
|
||||
double value;
|
||||
//disable all
|
||||
for (channel=0; channel<VehicleConfig::CHANNEL_NUMELEM; channel++)
|
||||
for (channel=0; (unsigned int) channel<VehicleConfig::CHANNEL_NUMELEM; channel++)
|
||||
{
|
||||
setMixerType(mixer,channel,VehicleConfig::MIXERTYPE_DISABLED);
|
||||
resetMixerVector(mixer, channel);
|
||||
@ -449,7 +449,7 @@ bool ConfigFixedWingWidget::setupFrameVtail(QString airframeType)
|
||||
int channel;
|
||||
double value;
|
||||
//disable all
|
||||
for (channel=0; channel<VehicleConfig::CHANNEL_NUMELEM; channel++)
|
||||
for (channel=0; (unsigned int) channel<VehicleConfig::CHANNEL_NUMELEM; channel++)
|
||||
{
|
||||
setMixerType(mixer,channel,VehicleConfig::MIXERTYPE_DISABLED);
|
||||
resetMixerVector(mixer, channel);
|
||||
|
@ -239,7 +239,7 @@ QString ConfigGroundVehicleWidget::updateConfigObjectsFromWidgets()
|
||||
void ConfigGroundVehicleWidget::refreshWidgetsValues(QString frameType)
|
||||
{
|
||||
UAVDataObject* obj;
|
||||
UAVObjectField *field;
|
||||
// UAVObjectField *field;
|
||||
|
||||
GUIConfigDataUnion config = GetConfigData();
|
||||
|
||||
@ -307,7 +307,7 @@ bool ConfigGroundVehicleWidget::setupGroundVehicleMotorcycle(QString airframeTyp
|
||||
|
||||
int channel;
|
||||
//disable all
|
||||
for (channel=0; channel<VehicleConfig::CHANNEL_NUMELEM; channel++) {
|
||||
for (channel=0; (unsigned int) channel<VehicleConfig::CHANNEL_NUMELEM; channel++) {
|
||||
setMixerType(mixer,channel,VehicleConfig::MIXERTYPE_DISABLED);
|
||||
resetMixerVector(mixer, channel);
|
||||
}
|
||||
@ -364,7 +364,7 @@ bool ConfigGroundVehicleWidget::setupGroundVehicleDifferential(QString airframeT
|
||||
|
||||
int channel;
|
||||
//disable all
|
||||
for (channel=0; channel<VehicleConfig::CHANNEL_NUMELEM; channel++) {
|
||||
for (channel=0; (unsigned int) channel<VehicleConfig::CHANNEL_NUMELEM; channel++) {
|
||||
setMixerType(mixer,channel,VehicleConfig::MIXERTYPE_DISABLED);
|
||||
resetMixerVector(mixer, channel);
|
||||
}
|
||||
@ -419,7 +419,7 @@ bool ConfigGroundVehicleWidget::setupGroundVehicleCar(QString airframeType)
|
||||
|
||||
int channel;
|
||||
//disable all
|
||||
for (channel=0; channel<VehicleConfig::CHANNEL_NUMELEM; channel++) {
|
||||
for (channel=0; (unsigned int) channel<VehicleConfig::CHANNEL_NUMELEM; channel++) {
|
||||
setMixerType(mixer,channel,VehicleConfig::MIXERTYPE_DISABLED);
|
||||
resetMixerVector(mixer, channel);
|
||||
}
|
||||
|
@ -971,7 +971,7 @@ bool ConfigMultiRotorWidget::setupMultiRotorMixer(double mixerFactors[8][3])
|
||||
Q_ASSERT(mixer);
|
||||
|
||||
//disable all
|
||||
for (int channel=0; channel<VehicleConfig::CHANNEL_NUMELEM; channel++)
|
||||
for (unsigned int channel=0; channel<VehicleConfig::CHANNEL_NUMELEM; channel++)
|
||||
{
|
||||
setMixerType(mixer,channel,VehicleConfig::MIXERTYPE_DISABLED);
|
||||
resetMixerVector(mixer, channel);
|
||||
|
@ -231,7 +231,7 @@ void ConfigOutputWidget::refreshWidgetsValues(UAVObject * obj)
|
||||
{
|
||||
Q_UNUSED(obj);
|
||||
|
||||
bool dirty=isDirty();
|
||||
// bool dirty=isDirty();
|
||||
|
||||
// Get Actuator Settings
|
||||
ActuatorSettings *actuatorSettings = ActuatorSettings::GetInstance(getObjectManager());
|
||||
|
@ -68,8 +68,8 @@ public:
|
||||
ConfigRevoWidget::ConfigRevoWidget(QWidget *parent) :
|
||||
ConfigTaskWidget(parent),
|
||||
collectingData(false),
|
||||
position(-1),
|
||||
m_ui(new Ui_RevoSensorsWidget())
|
||||
m_ui(new Ui_RevoSensorsWidget()),
|
||||
position(-1)
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
|
@ -109,7 +109,7 @@ ConfigVehicleTypeWidget::ConfigVehicleTypeWidget(QWidget *parent) : ConfigTaskWi
|
||||
|
||||
//Generate lists of mixerTypeNames, mixerVectorNames, channelNames
|
||||
channelNames << "None";
|
||||
for (int i = 0; i < ActuatorSettings::CHANNELADDR_NUMELEM; i++) {
|
||||
for (unsigned int i = 0; i < ActuatorSettings::CHANNELADDR_NUMELEM; i++) {
|
||||
|
||||
mixerTypes << QString("Mixer%1Type").arg(i+1);
|
||||
mixerVectors << QString("Mixer%1Vector").arg(i+1);
|
||||
|
@ -117,7 +117,7 @@ void TelemetryParser::updateSats( UAVObject* object1) {
|
||||
UAVObjectField* azimuth = object1->getField(QString("Azimuth"));
|
||||
UAVObjectField* snr = object1->getField(QString("SNR"));
|
||||
|
||||
for (int i=0;i< prn->getNumElements();i++) {
|
||||
for (unsigned 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());
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -169,6 +169,7 @@ bool flightDataModel::setColumnByIndex(pathPlanData *row,const int index,const
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
QVariant flightDataModel::getColumnByIndex(const pathPlanData *row,const int index) const
|
||||
{
|
||||
|
@ -1773,7 +1773,7 @@ void OPMapGadgetWidget::onAddWayPointAct_triggered(internals::PointLatLng coord)
|
||||
|
||||
if (m_map_mode != Normal_MapMode)
|
||||
return;
|
||||
float alt=15;
|
||||
|
||||
mapProxy->createWayPoint(coord);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
@ -268,7 +268,7 @@ QByteArray UAVObjectUtilManager::getBoardCPUSerial()
|
||||
QByteArray cpuSerial;
|
||||
FirmwareIAPObj::DataFields firmwareIapData = getFirmwareIap();
|
||||
|
||||
for (int i = 0; i < FirmwareIAPObj::CPUSERIAL_NUMELEM; i++)
|
||||
for (unsigned int i = 0; i < FirmwareIAPObj::CPUSERIAL_NUMELEM; i++)
|
||||
cpuSerial.append(firmwareIapData.CPUSerial[i]);
|
||||
|
||||
return cpuSerial;
|
||||
@ -288,7 +288,7 @@ QByteArray UAVObjectUtilManager::getBoardDescription()
|
||||
QByteArray ret;
|
||||
FirmwareIAPObj::DataFields firmwareIapData = getFirmwareIap();
|
||||
|
||||
for (int i = 0; i < FirmwareIAPObj::DESCRIPTION_NUMELEM; i++)
|
||||
for (unsigned int i = 0; i < FirmwareIAPObj::DESCRIPTION_NUMELEM; i++)
|
||||
ret.append(firmwareIapData.Description[i]);
|
||||
|
||||
return ret;
|
||||
|
@ -32,7 +32,7 @@
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
ConfigTaskWidget::ConfigTaskWidget(QWidget *parent) : QWidget(parent),isConnected(false),smartsave(NULL),dirty(false),outOfLimitsStyle("background-color: rgb(255, 0, 0);"),timeOut(NULL),allowWidgetUpdates(true)
|
||||
ConfigTaskWidget::ConfigTaskWidget(QWidget *parent) : QWidget(parent),isConnected(false),allowWidgetUpdates(true),smartsave(NULL),dirty(false),outOfLimitsStyle("background-color: rgb(255, 0, 0);"),timeOut(NULL)
|
||||
{
|
||||
pm = ExtensionSystem::PluginManager::instance();
|
||||
objManager = pm->getObject<UAVObjectManager>();
|
||||
|
@ -457,7 +457,7 @@ bool UAVTalk::processInputByte(quint8 rxbyte)
|
||||
default:
|
||||
rxState = STATE_SYNC;
|
||||
stats.rxErrors++;
|
||||
UAVTALK_QXTLOG_DEBUG("UAVTalk: ???->Sync");
|
||||
UAVTALK_QXTLOG_DEBUG("UAVTalk: \?\?\?->Sync"); //Use the escape character for '?' so that the tripgraph isn't triggered.
|
||||
}
|
||||
|
||||
// Done
|
||||
|
@ -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
|
||||
int32_t timeout; // current timeout. when 'time' reaches this point we have timed out
|
||||
uint32_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
|
||||
|
Loading…
Reference in New Issue
Block a user