mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-02 10:24:11 +01:00
Revert "Fixed several compile warning complaints."
These touch much more than the map lib and plugin so they should
be base on next and sent for review
This reverts commit ca4fbd5102
.
This commit is contained in:
parent
c6706ce6b2
commit
2a4c54a073
@ -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);
|
||||
|
@ -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<WayPointItem*>(i);
|
||||
@ -419,9 +419,7 @@ namespace mapcontrol
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void OPMapWidget::deleteAllOverlays()
|
||||
{
|
||||
foreach(QGraphicsItem* i,map->childItems())
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -299,7 +299,7 @@ bool ConfigFixedWingWidget::setupFrameFixedWing(QString airframeType)
|
||||
|
||||
int channel;
|
||||
//disable all
|
||||
for (channel=0; (unsigned int) channel<VehicleConfig::CHANNEL_NUMELEM; channel++)
|
||||
for (channel=0; channel<VehicleConfig::CHANNEL_NUMELEM; channel++)
|
||||
{
|
||||
setMixerType(mixer,channel,VehicleConfig::MIXERTYPE_DISABLED);
|
||||
resetMixerVector(mixer, channel);
|
||||
@ -386,7 +386,7 @@ bool ConfigFixedWingWidget::setupFrameElevon(QString airframeType)
|
||||
int channel;
|
||||
double value;
|
||||
//disable all
|
||||
for (channel=0; (unsigned int) channel<VehicleConfig::CHANNEL_NUMELEM; channel++)
|
||||
for (channel=0; channel<VehicleConfig::CHANNEL_NUMELEM; channel++)
|
||||
{
|
||||
setMixerType(mixer,channel,VehicleConfig::MIXERTYPE_DISABLED);
|
||||
resetMixerVector(mixer, channel);
|
||||
@ -471,7 +471,7 @@ bool ConfigFixedWingWidget::setupFrameVtail(QString airframeType)
|
||||
int channel;
|
||||
double value;
|
||||
//disable all
|
||||
for (channel=0; (unsigned int) channel<VehicleConfig::CHANNEL_NUMELEM; channel++)
|
||||
for (channel=0; 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();
|
||||
|
||||
@ -314,7 +314,7 @@ bool ConfigGroundVehicleWidget::setupGroundVehicleMotorcycle(QString airframeTyp
|
||||
|
||||
int channel;
|
||||
//disable all
|
||||
for (channel=0; (unsigned int) channel<VehicleConfig::CHANNEL_NUMELEM; channel++) {
|
||||
for (channel=0; channel<VehicleConfig::CHANNEL_NUMELEM; channel++) {
|
||||
setMixerType(mixer,channel,VehicleConfig::MIXERTYPE_DISABLED);
|
||||
resetMixerVector(mixer, channel);
|
||||
}
|
||||
@ -376,7 +376,7 @@ bool ConfigGroundVehicleWidget::setupGroundVehicleDifferential(QString airframeT
|
||||
|
||||
int channel;
|
||||
//disable all
|
||||
for (channel=0; (unsigned int) channel<VehicleConfig::CHANNEL_NUMELEM; channel++) {
|
||||
for (channel=0; channel<VehicleConfig::CHANNEL_NUMELEM; channel++) {
|
||||
setMixerType(mixer,channel,VehicleConfig::MIXERTYPE_DISABLED);
|
||||
resetMixerVector(mixer, channel);
|
||||
}
|
||||
@ -438,7 +438,7 @@ bool ConfigGroundVehicleWidget::setupGroundVehicleCar(QString airframeType)
|
||||
|
||||
int channel;
|
||||
//disable all
|
||||
for (channel=0; (unsigned int) channel<VehicleConfig::CHANNEL_NUMELEM; channel++) {
|
||||
for (channel=0; channel<VehicleConfig::CHANNEL_NUMELEM; channel++) {
|
||||
setMixerType(mixer,channel,VehicleConfig::MIXERTYPE_DISABLED);
|
||||
resetMixerVector(mixer, channel);
|
||||
}
|
||||
|
@ -1041,7 +1041,7 @@ bool ConfigMultiRotorWidget::setupMultiRotorMixer(double mixerFactors[8][3])
|
||||
Q_ASSERT(mixer);
|
||||
|
||||
//disable all
|
||||
for (unsigned int channel=0; channel<VehicleConfig::CHANNEL_NUMELEM; channel++)
|
||||
for (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),
|
||||
m_ui(new Ui_RevoSensorsWidget()),
|
||||
position(-1)
|
||||
position(-1),
|
||||
m_ui(new Ui_RevoSensorsWidget())
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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());
|
||||
}
|
||||
|
@ -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,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
|
||||
{
|
||||
|
@ -1772,7 +1772,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;
|
||||
|
@ -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;
|
||||
|
@ -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<UAVObjectManager>();
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user