mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-01 17:10:26 +08:00
Upgraded trunk version to 0.7.1
Added version in ini config file Fixed rtabmap-console for loop closure detection-only git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1823 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -44,6 +44,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include "ui_preferencesDialog.h"
|
||||
|
||||
#include "rtabmap/core/Version.h"
|
||||
#include "rtabmap/core/Rtabmap.h"
|
||||
#include "rtabmap/core/Parameters.h"
|
||||
#include "rtabmap/core/Odometry.h"
|
||||
@@ -1101,6 +1102,34 @@ bool PreferencesDialog::readCoreSettings(const QString & filePath)
|
||||
|
||||
|
||||
settings.beginGroup("Core");
|
||||
|
||||
// Compare version in ini with the current RTAB-Map version
|
||||
QStringList version = settings.value("Version", "").toString().split('.');
|
||||
if(version.size() == 3)
|
||||
{
|
||||
if(!RTABMAP_VERSION_COMPARE(version[0].toInt(), version[1].toInt(), version[2].toInt()))
|
||||
{
|
||||
if(path.contains(".rtabmap"))
|
||||
{
|
||||
UWARN("Version in the config file \"%s\" is more recent (\"%s\") than "
|
||||
"current RTAB-Map version used (\"%s\"). The config file will be upgraded "
|
||||
"to new version.",
|
||||
path.toStdString().c_str(),
|
||||
settings.value("Version", "").toString().toStdString().c_str(),
|
||||
RTABMAP_VERSION);
|
||||
}
|
||||
else
|
||||
{
|
||||
UERROR("Version in the config file \"%s\" is more recent (\"%s\") than "
|
||||
"current RTAB-Map version used (\"%s\"). New parameters (if there are some) will "
|
||||
"be ignored.",
|
||||
path.toStdString().c_str(),
|
||||
settings.value("Version", "").toString().toStdString().c_str(),
|
||||
RTABMAP_VERSION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QStringList keys = settings.allKeys();
|
||||
// Get profile
|
||||
const rtabmap::ParametersMap & parameters = Parameters::getDefaultParameters();
|
||||
@@ -1304,6 +1333,9 @@ void PreferencesDialog::writeCoreSettings(const QString & filePath)
|
||||
QSettings settings(path, QSettings::IniFormat);
|
||||
settings.beginGroup("Core");
|
||||
|
||||
// save current RTAB-Map version
|
||||
settings.setValue("Version", QString(RTABMAP_VERSION));
|
||||
|
||||
const rtabmap::ParametersMap & parameters = Parameters::getDefaultParameters();
|
||||
for(rtabmap::ParametersMap::const_iterator iter=parameters.begin(); iter!=parameters.end(); ++iter)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user