mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-18 08:54:15 +01:00
OP-1170 Got rid of more compiler warnings.
Uncrustified the code.
This commit is contained in:
parent
b0bc0909ba
commit
076e690337
@ -88,14 +88,15 @@ QVector <double> LKS94Projection::DTM10(const QVector <double> & lonlat)
|
||||
double es; // Eccentricity squared : (a^2 - b^2)/a^2
|
||||
double semiMajor = 6378137.0; // major axis
|
||||
double semiMinor = 6356752.3142451793; // minor axis
|
||||
//double ab; // Semi_major / semi_minor
|
||||
//double ba; // Semi_minor / semi_major
|
||||
//double ses; // Second eccentricity squared : (a^2 - b^2)/b^2
|
||||
|
||||
es = 1.0 - (semiMinor * semiMinor) / (semiMajor * semiMajor); // e^2
|
||||
//ses = (pow(semiMajor, 2) - pow(semiMinor, 2)) / pow(semiMinor, 2);
|
||||
//ba = semiMinor / semiMajor;
|
||||
//ab = semiMajor / semiMinor;
|
||||
// double ab; // Semi_major / semi_minor
|
||||
// double ba; // Semi_minor / semi_major
|
||||
// double ses; // Second eccentricity squared : (a^2 - b^2)/b^2
|
||||
|
||||
es = 1.0 - (semiMinor * semiMinor) / (semiMajor * semiMajor); // e^2
|
||||
// ses = (pow(semiMajor, 2) - pow(semiMinor, 2)) / pow(semiMinor, 2);
|
||||
// ba = semiMinor / semiMajor;
|
||||
// ab = semiMajor / semiMinor;
|
||||
|
||||
// ...
|
||||
|
||||
@ -121,14 +122,14 @@ QVector <double> LKS94Projection::MTD10(QVector <double> & pnt)
|
||||
double es; // Eccentricity squared : (a^2 - b^2)/a^2
|
||||
double semiMajor = 6378137.0; // major axis
|
||||
double semiMinor = 6356752.3141403561; // minor axis
|
||||
//double ab; // Semi_major / semi_minor
|
||||
//double ba; // Semi_minor / semi_major
|
||||
// double ab; // Semi_major / semi_minor
|
||||
// double ba; // Semi_minor / semi_major
|
||||
double ses; // Second eccentricity squared : (a^2 - b^2)/b^2
|
||||
|
||||
es = 1.0 - (semiMinor * semiMinor) / (semiMajor * semiMajor); // e^2
|
||||
ses = (pow(semiMajor, 2) - pow(semiMinor, 2)) / pow(semiMinor, 2);
|
||||
//ba = semiMinor / semiMajor;
|
||||
//ab = semiMajor / semiMinor;
|
||||
// ba = semiMinor / semiMajor;
|
||||
// ab = semiMajor / semiMinor;
|
||||
|
||||
// ...
|
||||
|
||||
@ -201,13 +202,13 @@ QVector <double> LKS94Projection::DTM00(QVector <double> & lonlat)
|
||||
double metersPerUnit = 1.0;
|
||||
|
||||
double e0, e1, e2, e3; // eccentricity constants
|
||||
//double e;
|
||||
// double e;
|
||||
double es;
|
||||
double esp; // eccentricity constants
|
||||
double ml0; // small value m
|
||||
|
||||
es = 1.0 - pow(semiMinor / semiMajor, 2);
|
||||
//e = sqrt(es);
|
||||
// e = sqrt(es);
|
||||
e0 = e0fn(es);
|
||||
e1 = e1fn(es);
|
||||
e2 = e2fn(es);
|
||||
@ -264,14 +265,15 @@ QVector <double> LKS94Projection::DTM01(QVector <double> & lonlat)
|
||||
double es; // Eccentricity squared : (a^2 - b^2)/a^2
|
||||
double semiMajor = 6378137.0; // major axis
|
||||
double semiMinor = 6356752.3141403561; // minor axis
|
||||
//double ab; // Semi_major / semi_minor
|
||||
//double ba; // Semi_minor / semi_major
|
||||
//double ses; // Second eccentricity squared : (a^2 - b^2)/b^2
|
||||
|
||||
es = 1.0 - (semiMinor * semiMinor) / (semiMajor * semiMajor);
|
||||
//ses = (pow(semiMajor, 2) - pow(semiMinor, 2)) / pow(semiMinor, 2);
|
||||
//ba = semiMinor / semiMajor;
|
||||
//ab = semiMajor / semiMinor;
|
||||
// double ab; // Semi_major / semi_minor
|
||||
// double ba; // Semi_minor / semi_major
|
||||
// double ses; // Second eccentricity squared : (a^2 - b^2)/b^2
|
||||
|
||||
es = 1.0 - (semiMinor * semiMinor) / (semiMajor * semiMajor);
|
||||
// ses = (pow(semiMajor, 2) - pow(semiMinor, 2)) / pow(semiMinor, 2);
|
||||
// ba = semiMinor / semiMajor;
|
||||
// ab = semiMajor / semiMinor;
|
||||
|
||||
// ...
|
||||
|
||||
@ -296,14 +298,14 @@ QVector <double> LKS94Projection::MTD01(QVector <double> & pnt)
|
||||
double es; // Eccentricity squared : (a^2 - b^2)/a^2
|
||||
double semiMajor = 6378137.0; // major axis
|
||||
double semiMinor = 6356752.3142451793; // minor axis
|
||||
//double ab; // Semi_major / semi_minor
|
||||
//double ba; // Semi_minor / semi_major
|
||||
// double ab; // Semi_major / semi_minor
|
||||
// double ba; // Semi_minor / semi_major
|
||||
double ses; // Second eccentricity squared : (a^2 - b^2)/b^2
|
||||
|
||||
es = 1.0 - (semiMinor * semiMinor) / (semiMajor * semiMajor);
|
||||
ses = (pow(semiMajor, 2) - pow(semiMinor, 2)) / pow(semiMinor, 2);
|
||||
//ba = semiMinor / semiMajor;
|
||||
//ab = semiMajor / semiMinor;
|
||||
// ba = semiMinor / semiMajor;
|
||||
// ab = semiMajor / semiMinor;
|
||||
|
||||
// ...
|
||||
|
||||
@ -380,14 +382,14 @@ QVector <double> LKS94Projection::MTD11(QVector <double> & p)
|
||||
double metersPerUnit = 1.0;
|
||||
|
||||
double e0, e1, e2, e3; // eccentricity constants
|
||||
//double e;
|
||||
// double e;
|
||||
double es;
|
||||
double esp; // eccentricity constants
|
||||
double ml0; // small value m
|
||||
|
||||
es = (semiMinor * semiMinor) / (semiMajor * semiMajor);
|
||||
es = 1.0 - es;
|
||||
//e = sqrt(es);
|
||||
// e = sqrt(es);
|
||||
e0 = e0fn(es);
|
||||
e1 = e1fn(es);
|
||||
e2 = e2fn(es);
|
||||
|
@ -56,7 +56,7 @@ Point MercatorProjectionYandex::FromLatLngToPixel(double lat, double lng, const
|
||||
}
|
||||
internals::PointLatLng MercatorProjectionYandex::FromPixelToLatLng(const int &x, const int &y, const int &zoom)
|
||||
{
|
||||
//Size s = GetTileMatrixSizePixel(zoom);
|
||||
// Size s = GetTileMatrixSizePixel(zoom);
|
||||
|
||||
// double mapSizeX = s.Width();
|
||||
// double mapSizeY = s.Height();
|
||||
|
@ -1447,7 +1447,7 @@ void ConfigCcpmWidget::setSwashplateLevel(int percent)
|
||||
ActuatorCommand::DataFields actuatorCommandData = actuatorCommand->getData();
|
||||
|
||||
for (int i = 0; i < CCPM_MAX_SWASH_SERVOS; i++) {
|
||||
double value;
|
||||
double value = 0;
|
||||
if (level == 0) {
|
||||
value = newSwashLvlConfiguration.Neutral[i];
|
||||
} else if (level > 0) {
|
||||
|
@ -910,7 +910,7 @@ void ConfigInputWidget::setMoveFromCommand(int command)
|
||||
// CHANNELNUMBER_ACCESSORY1=6,
|
||||
// CHANNELNUMBER_ACCESSORY2=7
|
||||
|
||||
txMovements movement;
|
||||
txMovements movement = moveLeftVerticalStick;
|
||||
|
||||
switch (command) {
|
||||
case ManualControlSettings::CHANNELNUMBER_ROLL:
|
||||
@ -1028,10 +1028,10 @@ void ConfigInputWidget::setTxMovement(txMovements movement)
|
||||
void ConfigInputWidget::moveTxControls()
|
||||
{
|
||||
QTransform trans;
|
||||
QGraphicsItem *item;
|
||||
txMovementType move;
|
||||
int limitMax;
|
||||
int limitMin;
|
||||
QGraphicsItem *item = NULL;
|
||||
txMovementType move = vertical;
|
||||
int limitMax = 0;
|
||||
int limitMin = 0;
|
||||
static bool auxFlag = false;
|
||||
|
||||
switch (currentMovement) {
|
||||
|
@ -896,9 +896,7 @@ void ConfigRevoWidget::doStartNoiseMeasurement()
|
||||
|
||||
Q_UNUSED(lock);
|
||||
|
||||
RevoCalibration *revoCalibration = RevoCalibration::GetInstance(getObjectManager());
|
||||
HomeLocation *homeLocation = HomeLocation::GetInstance(getObjectManager());
|
||||
Q_ASSERT(revoCalibration);
|
||||
Q_ASSERT(homeLocation);
|
||||
HomeLocation::DataFields homeLocationData = homeLocation->getData();
|
||||
|
||||
|
@ -1110,7 +1110,7 @@ MimeType MimeDatabasePrivate::findByFile(const QFileInfo &f) const
|
||||
// Returns a mime type or Null one if none found
|
||||
MimeType MimeDatabasePrivate::findByFile(const QFileInfo &f, unsigned *priorityPtr) const
|
||||
{
|
||||
typedef QList<MimeMapEntry> MimeMapEntryList __attribute__ ((unused));
|
||||
typedef QList<MimeMapEntry> MimeMapEntryList __attribute__((unused));
|
||||
|
||||
// Is the hierarchy set up in case we find several matches?
|
||||
if (m_maxLevel < 0) {
|
||||
|
@ -181,7 +181,7 @@ bool UAVConfigInfo::askToAbort(int compat, QString message)
|
||||
msgBox.setInformativeText(tr("Do you want to continue the import?"));
|
||||
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
|
||||
|
||||
int result;
|
||||
int result = QMessageBox::Abort;
|
||||
|
||||
switch (compat) {
|
||||
case FullyCompatible:
|
||||
|
@ -146,10 +146,10 @@ void GCSControlGadget::sticksChangedLocally(double leftX, double leftY, double r
|
||||
double oldYaw = obj->getField("Yaw")->getDouble();
|
||||
double oldThrottle = obj->getField("Throttle")->getDouble();
|
||||
|
||||
double newRoll;
|
||||
double newPitch;
|
||||
double newYaw;
|
||||
double newThrottle;
|
||||
double newRoll = 0.0;
|
||||
double newPitch = 0.0;
|
||||
double newYaw = 0.0;
|
||||
double newThrottle = 0.0;
|
||||
|
||||
// Remap left X/Y and right X/Y to RPYT depending on mode
|
||||
switch (controlsMode) {
|
||||
|
@ -247,15 +247,15 @@ void FGSimulator::processUpdate(const QByteArray & inp)
|
||||
// Get rollRate (deg/s)
|
||||
float rollRate = fields[9].toFloat();
|
||||
// Get yaw (deg)
|
||||
float yaw = fields[10].toFloat();
|
||||
float yaw = fields[10].toFloat();
|
||||
// Get yawRate (deg/s)
|
||||
float yawRate = fields[11].toFloat();
|
||||
float yawRate = fields[11].toFloat();
|
||||
// Get latitude (deg)
|
||||
float latitude = fields[12].toFloat();
|
||||
float latitude = fields[12].toFloat();
|
||||
// Get longitude (deg)
|
||||
float longitude = fields[13].toFloat();
|
||||
float longitude = fields[13].toFloat();
|
||||
// Get heading (deg)
|
||||
//float heading = fields[14].toFloat();
|
||||
// float heading = fields[14].toFloat();
|
||||
// Get altitude (m)
|
||||
float altitude_msl = fields[15].toFloat() * FT2M;
|
||||
// Get altitudeAGL (m)
|
||||
|
@ -411,9 +411,9 @@ void Simulator::updateUAVOs(Output2Hardware out)
|
||||
homeData.Longitude = out.longitude; // Already in *10^7 integer format
|
||||
homeData.Altitude = out.agl;
|
||||
|
||||
homeData.Be[0] = 0;
|
||||
homeData.Be[1] = 0;
|
||||
homeData.Be[2] = 0;
|
||||
homeData.Be[0] = 0;
|
||||
homeData.Be[1] = 0;
|
||||
homeData.Be[2] = 0;
|
||||
posHome->setData(homeData);
|
||||
posHome->updated();
|
||||
|
||||
@ -494,13 +494,13 @@ void Simulator::updateUAVOs(Output2Hardware out)
|
||||
|
||||
AttitudeSettings::DataFields attSettData = attSettings->getData();
|
||||
float accelKp = attSettData.AccelKp * 0.1666666666666667;
|
||||
//float accelKi = attSettData.AccelKp * 0.1666666666666667;
|
||||
// float accelKi = attSettData.AccelKp * 0.1666666666666667;
|
||||
float yawBiasRate = attSettData.YawBiasRate;
|
||||
|
||||
// calibrate sensors on arming
|
||||
if (flightStatus->getData().Armed == FlightStatus::ARMED_ARMING) {
|
||||
accelKp = 2.0;
|
||||
//accelKi = 0.9;
|
||||
// accelKi = 0.9;
|
||||
}
|
||||
|
||||
float gyro[3] = { out.rollRate, out.pitchRate, out.yawRate };
|
||||
|
@ -48,9 +48,8 @@ PositionField::PositionField(QWidget *parent) :
|
||||
setScene(new QGraphicsScene(this));
|
||||
setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing);
|
||||
|
||||
m_renderer = new QSvgRenderer();
|
||||
bool success = m_renderer->load(QString(":/magicwaypoint/images/positionfield.svg"));
|
||||
Q_ASSERT(success);
|
||||
m_renderer = new QSvgRenderer();
|
||||
m_renderer->load(QString(":/magicwaypoint/images/positionfield.svg"));
|
||||
|
||||
m_background = new QGraphicsSvgItem();
|
||||
m_background->setSharedRenderer(m_renderer);
|
||||
|
@ -641,7 +641,7 @@ void NotifyPluginOptionsPage::on_FinishedPlaying()
|
||||
void NotifyPluginOptionsPage::on_toggled_checkEnableSound(bool state)
|
||||
{
|
||||
Q_UNUSED(state);
|
||||
//bool state1 = 1 ^ state;
|
||||
// bool state1 = 1 ^ state;
|
||||
|
||||
// QList<Phonon::Path> listOutputs = _testSound->outputPaths();
|
||||
// Phonon::AudioOutput *audioOutput = (Phonon::AudioOutput *)listOutputs.last().sink();
|
||||
|
@ -234,11 +234,9 @@ bool NotifyTableModel::dropMimeData(const QMimeData *data, Qt::DropAction action
|
||||
continue;
|
||||
}
|
||||
|
||||
bool success = insertRows(rows + direction, 1, QModelIndex());
|
||||
Q_ASSERT(success);
|
||||
insertRows(rows + direction, 1, QModelIndex());
|
||||
_list.replace(rows + direction, item);
|
||||
success = removeRows(dragged, 1, QModelIndex());
|
||||
Q_ASSERT(success);
|
||||
removeRows(dragged, 1, QModelIndex());
|
||||
if (direction == UP_DIRECTION) {
|
||||
++rows;
|
||||
}
|
||||
|
@ -91,9 +91,11 @@ modelMapProxy::overlayType modelMapProxy::overlayTranslate(int type)
|
||||
case MapDataDelegate::MODE_DRIVEENDPOINT:
|
||||
case MapDataDelegate::MODE_DRIVEVECTOR:
|
||||
return OVERLAY_LINE;
|
||||
|
||||
case MapDataDelegate::MODE_FLYCIRCLERIGHT:
|
||||
case MapDataDelegate::MODE_DRIVECIRCLERIGHT:
|
||||
return OVERLAY_CIRCLE_RIGHT;
|
||||
|
||||
case MapDataDelegate::MODE_FLYCIRCLELEFT:
|
||||
case MapDataDelegate::MODE_DRIVECIRCLELEFT:
|
||||
default:
|
||||
@ -294,7 +296,7 @@ void modelMapProxy::rowsInserted(const QModelIndex &parent, int first, int last)
|
||||
Q_UNUSED(last);
|
||||
|
||||
/*
|
||||
for (int x = first; x < last + 1; x++) {
|
||||
for (int x = first; x < last + 1; x++) {
|
||||
QModelIndex index;
|
||||
WayPointItem *item;
|
||||
internals::PointLatLng latlng;
|
||||
@ -322,8 +324,8 @@ void modelMapProxy::rowsInserted(const QModelIndex &parent, int first, int last)
|
||||
} else {
|
||||
item = myMap->WPInsert(latlng, altitude, desc, x);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
*/
|
||||
refreshOverlays();
|
||||
}
|
||||
void modelMapProxy::deleteWayPoint(int number)
|
||||
|
@ -153,7 +153,7 @@ void PathActionEditorTreeModel::addSingleField(int index, UAVObjectField *field,
|
||||
data.append(QString("[%1]").arg((field->getElementNames())[index]));
|
||||
}
|
||||
|
||||
FieldTreeItem *item;
|
||||
FieldTreeItem *item = NULL;
|
||||
UAVObjectField::FieldType type = field->getType();
|
||||
// hack: list available actions in an enum
|
||||
if (field->getName().compare("Action") == 0 && type == UAVObjectField::UINT8) {
|
||||
@ -424,8 +424,8 @@ void PathActionEditorTreeModel::newInstance(UAVObject *obj)
|
||||
void PathActionEditorTreeModel::objUpdated(UAVObject *obj)
|
||||
{
|
||||
Q_UNUSED(obj);
|
||||
quint16 index = m_objManager->getObject("WaypointActive")->getField("Index")->getValue().toInt();
|
||||
quint16 action;
|
||||
quint16 index = m_objManager->getObject("WaypointActive")->getField("Index")->getValue().toInt();
|
||||
quint16 action = 0;
|
||||
|
||||
foreach(TreeItem * child, m_waypointsTree->treeChildren()) {
|
||||
ObjectTreeItem *objItem = dynamic_cast<ObjectTreeItem *>(child);
|
||||
|
@ -155,7 +155,8 @@ void ConnectionDiagram::setupGraphicsScene()
|
||||
void ConnectionDiagram::setupGraphicsSceneItems(QList<QString> elementsToShow)
|
||||
{
|
||||
qreal z = 0;
|
||||
//QRectF backgBounds = m_renderer->boundsOnElement("background");
|
||||
|
||||
// QRectF backgBounds = m_renderer->boundsOnElement("background");
|
||||
|
||||
foreach(QString elementId, elementsToShow) {
|
||||
if (m_renderer->elementExists(elementId)) {
|
||||
|
@ -392,7 +392,8 @@ void VehicleConfigurationHelper::applySensorBiasConfiguration()
|
||||
|
||||
void VehicleConfigurationHelper::applyStabilizationConfiguration()
|
||||
{
|
||||
StabilizationSettings *stabSettings = StabilizationSettings::GetInstance(m_uavoManager);
|
||||
StabilizationSettings *stabSettings = StabilizationSettings::GetInstance(m_uavoManager);
|
||||
|
||||
Q_ASSERT(stabSettings);
|
||||
|
||||
StabilizationSettings defaultSettings;
|
||||
@ -707,10 +708,6 @@ GUIConfigDataUnion VehicleConfigurationHelper::getGUIConfigData()
|
||||
{
|
||||
GUIConfigDataUnion configData;
|
||||
|
||||
SystemSettings *systemSettings = SystemSettings::GetInstance(m_uavoManager);
|
||||
|
||||
Q_ASSERT(systemSettings);
|
||||
|
||||
for (int i = 0; i < (int)(SystemSettings::GUICONFIGDATA_NUMELEM); i++) {
|
||||
configData.UAVObject[i] = 0; // systemSettingsData.GUIConfigData[i];
|
||||
}
|
||||
@ -722,7 +719,7 @@ void VehicleConfigurationHelper::setupQuadCopter()
|
||||
{
|
||||
mixerChannelSettings channels[10];
|
||||
GUIConfigDataUnion guiSettings = getGUIConfigData();
|
||||
SystemSettings::AirframeTypeOptions frame;
|
||||
SystemSettings::AirframeTypeOptions frame = SystemSettings::AIRFRAMETYPE_QUADX;
|
||||
|
||||
switch (m_configSource->getVehicleSubType()) {
|
||||
case VehicleConfigurationSource::MULTI_ROTOR_QUAD_PLUS:
|
||||
@ -812,7 +809,7 @@ void VehicleConfigurationHelper::setupHexaCopter()
|
||||
{
|
||||
mixerChannelSettings channels[10];
|
||||
GUIConfigDataUnion guiSettings = getGUIConfigData();
|
||||
SystemSettings::AirframeTypeOptions frame;
|
||||
SystemSettings::AirframeTypeOptions frame = SystemSettings::AIRFRAMETYPE_HEXA;
|
||||
|
||||
switch (m_configSource->getVehicleSubType()) {
|
||||
case VehicleConfigurationSource::MULTI_ROTOR_HEXA:
|
||||
@ -991,7 +988,7 @@ void VehicleConfigurationHelper::setupOctoCopter()
|
||||
{
|
||||
mixerChannelSettings channels[10];
|
||||
GUIConfigDataUnion guiSettings = getGUIConfigData();
|
||||
SystemSettings::AirframeTypeOptions frame;
|
||||
SystemSettings::AirframeTypeOptions frame = SystemSettings::AIRFRAMETYPE_OCTO;
|
||||
|
||||
switch (m_configSource->getVehicleSubType()) {
|
||||
case VehicleConfigurationSource::MULTI_ROTOR_OCTO:
|
||||
|
@ -94,13 +94,8 @@ void UAVObjectBrowserWidget::showMetaData(bool show)
|
||||
|
||||
void UAVObjectBrowserWidget::categorize(bool categorize)
|
||||
{
|
||||
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
||||
|
||||
Q_ASSERT(pm);
|
||||
UAVObjectManager *objManager = pm->getObject<UAVObjectManager>();
|
||||
Q_ASSERT(objManager);
|
||||
|
||||
UAVObjectTreeModel *tmpModel = m_model;
|
||||
|
||||
m_model = new UAVObjectTreeModel(0, categorize, m_viewoptions->cbScientific->isChecked());
|
||||
m_model->setRecentlyUpdatedColor(m_recentlyUpdatedColor);
|
||||
m_model->setManuallyChangedColor(m_manuallyChangedColor);
|
||||
@ -115,13 +110,8 @@ void UAVObjectBrowserWidget::categorize(bool categorize)
|
||||
|
||||
void UAVObjectBrowserWidget::useScientificNotation(bool scientific)
|
||||
{
|
||||
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
||||
|
||||
Q_ASSERT(pm);
|
||||
UAVObjectManager *objManager = pm->getObject<UAVObjectManager>();
|
||||
Q_ASSERT(objManager);
|
||||
|
||||
UAVObjectTreeModel *tmpModel = m_model;
|
||||
|
||||
m_model = new UAVObjectTreeModel(0, m_viewoptions->cbCategorized->isChecked(), scientific);
|
||||
m_model->setRecentlyUpdatedColor(m_recentlyUpdatedColor);
|
||||
m_model->setManuallyChangedColor(m_manuallyChangedColor);
|
||||
|
@ -207,7 +207,7 @@ void UAVObjectTreeModel::addSingleField(int index, UAVObjectField *field, TreeIt
|
||||
data.append(QString("[%1]").arg((field->getElementNames())[index]));
|
||||
}
|
||||
|
||||
FieldTreeItem *item;
|
||||
FieldTreeItem *item = NULL;
|
||||
UAVObjectField::FieldType type = field->getType();
|
||||
switch (type) {
|
||||
case UAVObjectField::BITFIELD:
|
||||
|
@ -316,12 +316,11 @@ int UAVObjectUtilManager::setHomeLocation(double LLA[3], bool save_to_sdcard)
|
||||
{
|
||||
double Be[3];
|
||||
|
||||
int result = Utils::HomeLocationUtil().getDetails(LLA, Be);
|
||||
|
||||
Q_ASSERT(result == 0);
|
||||
Utils::HomeLocationUtil().getDetails(LLA, Be);
|
||||
|
||||
// save the new settings
|
||||
HomeLocation *homeLocation = HomeLocation::GetInstance(obm);
|
||||
|
||||
Q_ASSERT(homeLocation != NULL);
|
||||
|
||||
HomeLocation::DataFields homeLocationData = homeLocation->getData();
|
||||
|
@ -404,7 +404,7 @@ void ConfigTaskWidget::widgetsContentsChanged()
|
||||
{
|
||||
QWidget *emitter = ((QWidget *)sender());
|
||||
emit widgetContentsChanged(emitter);
|
||||
double scale;
|
||||
double scale = 1.0;
|
||||
QVariant value;
|
||||
|
||||
foreach(WidgetBinding * binding, m_widgetBindingsPerWidget.values(emitter)) {
|
||||
|
@ -246,7 +246,7 @@ bool DFUObject::UploadData(qint32 const & numberOfBytes, QByteArray & data)
|
||||
buf[1] = OP_DFU::Upload; // DFU Command
|
||||
int packetsize;
|
||||
float percentage;
|
||||
int laspercentage;
|
||||
int laspercentage = 0;
|
||||
for (qint32 packetcount = 0; packetcount < numberOfPackets; ++packetcount) {
|
||||
percentage = (float)(packetcount + 1) / numberOfPackets * 100;
|
||||
if (laspercentage != (int)percentage) {
|
||||
@ -433,7 +433,7 @@ bool DFUObject::StartDownloadT(QByteArray *fw, qint32 const & numberOfBytes, Tra
|
||||
qDebug() << "StartDownload:" << numberOfPackets << "packets" << " Last Packet Size=" << lastPacketCount << " " << result << " bytes sent";
|
||||
}
|
||||
float percentage;
|
||||
int laspercentage;
|
||||
int laspercentage = 0;
|
||||
|
||||
// Now get those packets:
|
||||
for (qint32 x = 0; x < numberOfPackets; ++x) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user