mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-18 08:54:15 +01:00
OP-834 fixed bad Q_ASSERT around effective code
This commit is contained in:
parent
7c85fa5885
commit
43786badfa
@ -38,9 +38,9 @@
|
||||
|
||||
namespace Utils {
|
||||
|
||||
HomeLocationUtil::HomeLocationUtil()
|
||||
{
|
||||
}
|
||||
HomeLocationUtil::HomeLocationUtil()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get local magnetic field
|
||||
@ -68,8 +68,9 @@ HomeLocationUtil::HomeLocationUtil()
|
||||
|
||||
QDateTime dt = QDateTime::currentDateTime().toUTC();
|
||||
|
||||
//Fetch world magnetic model
|
||||
Q_ASSERT(WorldMagModel().GetMagVector(LLA, dt.date().month(), dt.date().day(), dt.date().year(), Be) >= 0);
|
||||
// Fetch world magnetic model
|
||||
int result = WorldMagModel().GetMagVector(LLA, dt.date().month(), dt.date().day(), dt.date().year(), Be);
|
||||
Q_ASSERT(result >= 0);
|
||||
|
||||
return 0; // OK
|
||||
}
|
||||
|
@ -49,7 +49,8 @@ PositionField::PositionField(QWidget *parent) :
|
||||
setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing);
|
||||
|
||||
m_renderer = new QSvgRenderer();
|
||||
Q_ASSERT( m_renderer->load(QString(":/magicwaypoint/images/positionfield.svg")) != 0 );
|
||||
bool success = m_renderer->load(QString(":/magicwaypoint/images/positionfield.svg"));
|
||||
Q_ASSERT(success);
|
||||
|
||||
m_background = new QGraphicsSvgItem();
|
||||
m_background->setSharedRenderer(m_renderer);
|
||||
|
@ -312,7 +312,8 @@ int UAVObjectUtilManager::setHomeLocation(double LLA[3], bool save_to_sdcard)
|
||||
{
|
||||
double Be[3];
|
||||
|
||||
Q_ASSERT (Utils::HomeLocationUtil().getDetails(LLA, Be) >= 0);
|
||||
int result = Utils::HomeLocationUtil().getDetails(LLA, Be);
|
||||
Q_ASSERT(result >= 0);
|
||||
|
||||
// ******************
|
||||
// save the new settings
|
||||
|
Loading…
x
Reference in New Issue
Block a user