mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-03 11:24:10 +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
|
namespace mapcontrol
|
||||||
{
|
{
|
||||||
HomeItem::HomeItem(MapGraphicItem* map,OPMapWidget* parent):safe(true),map(map),mapwidget(parent),
|
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.load(QString::fromUtf8(":/markers/images/home2.svg"));
|
||||||
pic=pic.scaled(30,30,Qt::IgnoreAspectRatio);
|
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)
|
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);
|
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
|
||||||
core=new internals::Core;
|
core=new internals::Core;
|
||||||
@ -392,7 +392,7 @@ namespace mapcontrol
|
|||||||
}
|
}
|
||||||
void OPMapWidget::WPDeleteAll()
|
void OPMapWidget::WPDeleteAll()
|
||||||
{
|
{
|
||||||
// int x=0;
|
int x=0;
|
||||||
foreach(QGraphicsItem* i,map->childItems())
|
foreach(QGraphicsItem* i,map->childItems())
|
||||||
{
|
{
|
||||||
WayPointItem* w=qgraphicsitem_cast<WayPointItem*>(i);
|
WayPointItem* w=qgraphicsitem_cast<WayPointItem*>(i);
|
||||||
@ -419,9 +419,7 @@ namespace mapcontrol
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OPMapWidget::deleteAllOverlays()
|
void OPMapWidget::deleteAllOverlays()
|
||||||
{
|
{
|
||||||
foreach(QGraphicsItem* i,map->childItems())
|
foreach(QGraphicsItem* i,map->childItems())
|
||||||
|
@ -33,9 +33,8 @@ namespace mapcontrol
|
|||||||
|
|
||||||
double UAVItem::groundspeed_mps_filt = 0;
|
double UAVItem::groundspeed_mps_filt = 0;
|
||||||
|
|
||||||
UAVItem::UAVItem(MapGraphicItem* map,OPMapWidget* parent,QString uavPic):map(map),mapwidget(parent)
|
UAVItem::UAVItem(MapGraphicItem* map,OPMapWidget* parent,QString uavPic):map(map),mapwidget(parent),showtrail(true),showtrailline(true),trailtime(5),traildistance(50),autosetreached(true)
|
||||||
,altitude(0),showtrail(true),showtrailline(true),trailtime(5),traildistance(50),autosetreached(true)
|
,autosetdistance(100),altitude(0),showUAVInfo(false),showJustChanged(false)
|
||||||
,autosetdistance(100),showUAVInfo(false),showJustChanged(false),refreshPaint_flag(true)
|
|
||||||
{
|
{
|
||||||
pic.load(uavPic);
|
pic.load(uavPic);
|
||||||
this->setFlag(QGraphicsItem::ItemIsMovable,false);
|
this->setFlag(QGraphicsItem::ItemIsMovable,false);
|
||||||
|
@ -223,7 +223,6 @@ namespace mapcontrol
|
|||||||
void generateArrowhead();
|
void generateArrowhead();
|
||||||
|
|
||||||
MapGraphicItem* map;
|
MapGraphicItem* map;
|
||||||
OPMapWidget* mapwidget;
|
|
||||||
QPolygonF arrowHead;
|
QPolygonF arrowHead;
|
||||||
QLineF arrowShaft;
|
QLineF arrowShaft;
|
||||||
int altitude;
|
int altitude;
|
||||||
@ -238,6 +237,7 @@ namespace mapcontrol
|
|||||||
double yawRate_dps;
|
double yawRate_dps;
|
||||||
QPixmap pic;
|
QPixmap pic;
|
||||||
core::Point localposition;
|
core::Point localposition;
|
||||||
|
OPMapWidget* mapwidget;
|
||||||
QGraphicsItemGroup* trail;
|
QGraphicsItemGroup* trail;
|
||||||
QGraphicsItemGroup * trailLine;
|
QGraphicsItemGroup * trailLine;
|
||||||
internals::PointLatLng lasttrailline;
|
internals::PointLatLng lasttrailline;
|
||||||
|
@ -299,7 +299,7 @@ bool ConfigFixedWingWidget::setupFrameFixedWing(QString airframeType)
|
|||||||
|
|
||||||
int channel;
|
int channel;
|
||||||
//disable all
|
//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);
|
setMixerType(mixer,channel,VehicleConfig::MIXERTYPE_DISABLED);
|
||||||
resetMixerVector(mixer, channel);
|
resetMixerVector(mixer, channel);
|
||||||
@ -386,7 +386,7 @@ bool ConfigFixedWingWidget::setupFrameElevon(QString airframeType)
|
|||||||
int channel;
|
int channel;
|
||||||
double value;
|
double value;
|
||||||
//disable all
|
//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);
|
setMixerType(mixer,channel,VehicleConfig::MIXERTYPE_DISABLED);
|
||||||
resetMixerVector(mixer, channel);
|
resetMixerVector(mixer, channel);
|
||||||
@ -471,7 +471,7 @@ bool ConfigFixedWingWidget::setupFrameVtail(QString airframeType)
|
|||||||
int channel;
|
int channel;
|
||||||
double value;
|
double value;
|
||||||
//disable all
|
//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);
|
setMixerType(mixer,channel,VehicleConfig::MIXERTYPE_DISABLED);
|
||||||
resetMixerVector(mixer, channel);
|
resetMixerVector(mixer, channel);
|
||||||
|
@ -239,7 +239,7 @@ QString ConfigGroundVehicleWidget::updateConfigObjectsFromWidgets()
|
|||||||
void ConfigGroundVehicleWidget::refreshWidgetsValues(QString frameType)
|
void ConfigGroundVehicleWidget::refreshWidgetsValues(QString frameType)
|
||||||
{
|
{
|
||||||
UAVDataObject* obj;
|
UAVDataObject* obj;
|
||||||
// UAVObjectField *field;
|
UAVObjectField *field;
|
||||||
|
|
||||||
GUIConfigDataUnion config = GetConfigData();
|
GUIConfigDataUnion config = GetConfigData();
|
||||||
|
|
||||||
@ -314,7 +314,7 @@ bool ConfigGroundVehicleWidget::setupGroundVehicleMotorcycle(QString airframeTyp
|
|||||||
|
|
||||||
int channel;
|
int channel;
|
||||||
//disable all
|
//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);
|
setMixerType(mixer,channel,VehicleConfig::MIXERTYPE_DISABLED);
|
||||||
resetMixerVector(mixer, channel);
|
resetMixerVector(mixer, channel);
|
||||||
}
|
}
|
||||||
@ -376,7 +376,7 @@ bool ConfigGroundVehicleWidget::setupGroundVehicleDifferential(QString airframeT
|
|||||||
|
|
||||||
int channel;
|
int channel;
|
||||||
//disable all
|
//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);
|
setMixerType(mixer,channel,VehicleConfig::MIXERTYPE_DISABLED);
|
||||||
resetMixerVector(mixer, channel);
|
resetMixerVector(mixer, channel);
|
||||||
}
|
}
|
||||||
@ -438,7 +438,7 @@ bool ConfigGroundVehicleWidget::setupGroundVehicleCar(QString airframeType)
|
|||||||
|
|
||||||
int channel;
|
int channel;
|
||||||
//disable all
|
//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);
|
setMixerType(mixer,channel,VehicleConfig::MIXERTYPE_DISABLED);
|
||||||
resetMixerVector(mixer, channel);
|
resetMixerVector(mixer, channel);
|
||||||
}
|
}
|
||||||
|
@ -1041,7 +1041,7 @@ bool ConfigMultiRotorWidget::setupMultiRotorMixer(double mixerFactors[8][3])
|
|||||||
Q_ASSERT(mixer);
|
Q_ASSERT(mixer);
|
||||||
|
|
||||||
//disable all
|
//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);
|
setMixerType(mixer,channel,VehicleConfig::MIXERTYPE_DISABLED);
|
||||||
resetMixerVector(mixer, channel);
|
resetMixerVector(mixer, channel);
|
||||||
|
@ -231,7 +231,7 @@ void ConfigOutputWidget::refreshWidgetsValues(UAVObject * obj)
|
|||||||
{
|
{
|
||||||
Q_UNUSED(obj);
|
Q_UNUSED(obj);
|
||||||
|
|
||||||
// bool dirty=isDirty();
|
bool dirty=isDirty();
|
||||||
|
|
||||||
// Get Actuator Settings
|
// Get Actuator Settings
|
||||||
ActuatorSettings *actuatorSettings = ActuatorSettings::GetInstance(getObjectManager());
|
ActuatorSettings *actuatorSettings = ActuatorSettings::GetInstance(getObjectManager());
|
||||||
|
@ -68,8 +68,8 @@ public:
|
|||||||
ConfigRevoWidget::ConfigRevoWidget(QWidget *parent) :
|
ConfigRevoWidget::ConfigRevoWidget(QWidget *parent) :
|
||||||
ConfigTaskWidget(parent),
|
ConfigTaskWidget(parent),
|
||||||
collectingData(false),
|
collectingData(false),
|
||||||
m_ui(new Ui_RevoSensorsWidget()),
|
position(-1),
|
||||||
position(-1)
|
m_ui(new Ui_RevoSensorsWidget())
|
||||||
{
|
{
|
||||||
m_ui->setupUi(this);
|
m_ui->setupUi(this);
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ ConfigVehicleTypeWidget::ConfigVehicleTypeWidget(QWidget *parent) : ConfigTaskWi
|
|||||||
|
|
||||||
//Generate lists of mixerTypeNames, mixerVectorNames, channelNames
|
//Generate lists of mixerTypeNames, mixerVectorNames, channelNames
|
||||||
channelNames << "None";
|
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);
|
mixerTypes << QString("Mixer%1Type").arg(i+1);
|
||||||
mixerVectors << QString("Mixer%1Vector").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* azimuth = object1->getField(QString("Azimuth"));
|
||||||
UAVObjectField* snr = object1->getField(QString("SNR"));
|
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(),
|
emit satellite(i,prn->getValue(i).toInt(),elevation->getValue(i).toInt(),
|
||||||
azimuth->getValue(i).toInt(), snr->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;
|
QAbstractSocket *ipSocket;
|
||||||
const int Timeout = 5 * 1000;
|
const int Timeout = 5 * 1000;
|
||||||
// int state;
|
int state;
|
||||||
|
|
||||||
ipConMutex.lock();
|
ipConMutex.lock();
|
||||||
if (UseTCP) {
|
if (UseTCP) {
|
||||||
|
@ -169,7 +169,6 @@ bool flightDataModel::setColumnByIndex(pathPlanData *row,const int index,const
|
|||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
QVariant flightDataModel::getColumnByIndex(const pathPlanData *row,const int index) const
|
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)
|
if (m_map_mode != Normal_MapMode)
|
||||||
return;
|
return;
|
||||||
|
float alt=15;
|
||||||
mapProxy->createWayPoint(coord);
|
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) {
|
QString pjrc_rawhid::getserial(int num) {
|
||||||
hid_t *hid;
|
hid_t *hid;
|
||||||
// char buf[128];
|
char buf[128];
|
||||||
|
|
||||||
hid = get_hid(num);
|
hid = get_hid(num);
|
||||||
|
|
||||||
|
@ -45,8 +45,8 @@ static bool HID_GetStrProperty(IOHIDDeviceRef dev, CFStringRef property, QString
|
|||||||
*/
|
*/
|
||||||
USBMonitor::USBMonitor(QObject *parent): QThread(parent) {
|
USBMonitor::USBMonitor(QObject *parent): QThread(parent) {
|
||||||
hid_manager=NULL;
|
hid_manager=NULL;
|
||||||
// CFMutableDictionaryRef dict;
|
CFMutableDictionaryRef dict;
|
||||||
// CFNumberRef num;
|
CFNumberRef num;
|
||||||
IOReturn ret;
|
IOReturn ret;
|
||||||
|
|
||||||
m_instance = this;
|
m_instance = this;
|
||||||
@ -131,7 +131,7 @@ void USBMonitor::attach_callback(void *context, IOReturn r, void *hid_mgr, IOHID
|
|||||||
{
|
{
|
||||||
bool got_properties = true;
|
bool got_properties = true;
|
||||||
|
|
||||||
// CFTypeRef prop;
|
CFTypeRef prop;
|
||||||
USBPortInfo deviceInfo;
|
USBPortInfo deviceInfo;
|
||||||
|
|
||||||
deviceInfo.dev_handle = dev;
|
deviceInfo.dev_handle = dev;
|
||||||
|
@ -276,7 +276,7 @@ QByteArray UAVObjectUtilManager::getBoardCPUSerial()
|
|||||||
QByteArray cpuSerial;
|
QByteArray cpuSerial;
|
||||||
FirmwareIAPObj::DataFields firmwareIapData = getFirmwareIap();
|
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]);
|
cpuSerial.append(firmwareIapData.CPUSerial[i]);
|
||||||
|
|
||||||
return cpuSerial;
|
return cpuSerial;
|
||||||
@ -296,7 +296,7 @@ QByteArray UAVObjectUtilManager::getBoardDescription()
|
|||||||
QByteArray ret;
|
QByteArray ret;
|
||||||
FirmwareIAPObj::DataFields firmwareIapData = getFirmwareIap();
|
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]);
|
ret.append(firmwareIapData.Description[i]);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
/**
|
/**
|
||||||
* Constructor
|
* 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();
|
pm = ExtensionSystem::PluginManager::instance();
|
||||||
objManager = pm->getObject<UAVObjectManager>();
|
objManager = pm->getObject<UAVObjectManager>();
|
||||||
|
@ -449,7 +449,7 @@ bool UAVTalk::processInputByte(quint8 rxbyte)
|
|||||||
default:
|
default:
|
||||||
rxState = STATE_SYNC;
|
rxState = STATE_SYNC;
|
||||||
stats.rxErrors++;
|
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
|
// Done
|
||||||
|
@ -43,7 +43,7 @@ public:
|
|||||||
uint8_t maxRetryCount; // max. times to try to transmit the 'send' packet
|
uint8_t maxRetryCount; // max. times to try to transmit the 'send' packet
|
||||||
uint16_t max_retry; // Maximum number of retrys for a single transmit.
|
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 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
|
uint8_t txSeqNo; // current 'send' packet sequence number
|
||||||
uint16_t rxBufPos; // current buffer position in the receive packet
|
uint16_t rxBufPos; // current buffer position in the receive packet
|
||||||
uint16_t rxBufLen; // number of 'data' bytes in the buffer
|
uint16_t rxBufLen; // number of 'data' bytes in the buffer
|
||||||
|
Loading…
Reference in New Issue
Block a user