Commit 05bc98cb authored by Mariano Lizarraga's avatar Mariano Lizarraga

Fixed SLUGS related warnings. Commented the visibilityChanged connection...

Fixed SLUGS related warnings. Commented the visibilityChanged connection (MainWindow.cc 535) because it does not take into account when the widget is hidden when changing perspective. Will work on a fix
parent dcfbc8f1
......@@ -150,6 +150,7 @@ void LogCompressor::run()
int offsetLimit = 200;
quint64 offset;
quint64 index = -1;
// FIXME Lorenz (index is an unsigend int)
while (index == -1)
{
if (lastTimeIndex > offsetLimit)
......@@ -161,6 +162,7 @@ void LogCompressor::run()
offset = 0;
}
quint64 index = times->indexOf(time, offset);
// FIXME Lorenz (index is an unsigend int)
if (index == -1)
{
qDebug() << "INDEX NOT FOUND DURING LOGFILE PROCESSING, RESTARTING SEARCH";
......
......@@ -532,8 +532,8 @@ void MainWindow::addToToolsMenu ( QWidget* widget,
// connect the action
connect(tempAction,SIGNAL(triggered()),this, slotName);
connect(qobject_cast <QDockWidget *>(dockWidgets[tool]),
SIGNAL(visibilityChanged(bool)), this, SLOT(updateVisibilitySettings(bool)));
// connect(qobject_cast <QDockWidget *>(dockWidgets[tool]),
// SIGNAL(visibilityChanged(bool)), this, SLOT(updateVisibilitySettings(bool)));
connect(qobject_cast <QDockWidget *>(dockWidgets[tool]),
SIGNAL(dockLocationChanged(Qt::DockWidgetArea)), this, SLOT(updateLocationSettings(Qt::DockWidgetArea)));
......@@ -559,8 +559,9 @@ void MainWindow::showToolWidget()
}
QString chKey = buildMenuKey (SUB_SECTION_CHECKED,static_cast<TOOLS_WIDGET_NAMES>(tool), currentView);
settings.setValue(chKey,temp->isChecked());
settings.sync();
settings.sync();
}
}
......@@ -572,6 +573,8 @@ void MainWindow::showTheWidget (TOOLS_WIDGET_NAMES widget, VIEW_SECTIONS view)
tempVisible = settings.value(buildMenuKey (SUB_SECTION_CHECKED,widget,view), false).toBool();
// qDebug() << buildMenuKey (SUB_SECTION_CHECKED, widget,view) << tempVisible;
// Some widgets are per default visible. Overwrite the settings value if not present.
if (widget == MainWindow::MENU_UAS_LIST)
{
......@@ -640,27 +643,23 @@ void MainWindow::closeEvent(QCloseEvent *event)
*/
void MainWindow::updateVisibilitySettings (bool vis)
{
if (!aboutToCloseFlag)
{
QDockWidget* temp = qobject_cast<QDockWidget *>(sender());
if (temp)
{
QHashIterator<int, QWidget*> i(dockWidgets);
while (i.hasNext())
{
i.next();
if ((static_cast <QDockWidget *>(dockWidgets[i.key()])) == temp)
{
QString chKey = buildMenuKey (SUB_SECTION_CHECKED,static_cast<TOOLS_WIDGET_NAMES>(i.key()), currentView);
settings.setValue(chKey,vis);
settings.sync();
toolsMenuActions[i.key()]->setChecked(vis);
break;
}
}
if (!aboutToCloseFlag) {
QDockWidget* temp = qobject_cast<QDockWidget *>(sender());
if (temp) {
QHashIterator<int, QWidget*> i(dockWidgets);
while (i.hasNext()) {
i.next();
if ((static_cast <QDockWidget *>(dockWidgets[i.key()])) == temp) {
QString chKey = buildMenuKey (SUB_SECTION_CHECKED,static_cast<TOOLS_WIDGET_NAMES>(i.key()), currentView);
settings.setValue(chKey,vis);
settings.sync();
toolsMenuActions[i.key()]->setChecked(vis);
break;
}
}
}
}
}
......@@ -1251,6 +1250,7 @@ void MainWindow::loadMAVLinkView()
void MainWindow::presentView()
{
qDebug() << "LC";
showTheCentralWidget(CENTRAL_LINECHART, currentView);
......@@ -1393,7 +1393,7 @@ void MainWindow::showTheCentralWidget (TOOLS_WIDGET_NAMES centralWidget, VIEW_SE
QWidget* tempWidget = dockWidgets[centralWidget];
tempVisible = settings.value(buildMenuKey (SUB_SECTION_CHECKED,centralWidget,view)).toBool();
qDebug() << buildMenuKey (SUB_SECTION_CHECKED,centralWidget,view) << tempVisible;
// qDebug() << buildMenuKey (SUB_SECTION_CHECKED,centralWidget,view) << tempVisible;
if (toolsMenuActions[centralWidget])
{
toolsMenuActions[centralWidget]->setChecked(tempVisible);
......
......@@ -722,7 +722,8 @@ void MapWidget::changeGlobalWaypointPositionBySpinBox(int index, float lat, floa
void MapWidget::updateCameraPosition(double radio, double bearing, QString dir)
{
// FIXME Mariano
Q_UNUSED(bearing);
Q_UNUSED(dir);
//camPoints.clear();
QPointF currentPos = mc->currentCoordinate();
// QPointF actualPos = getPointxBearing_Range(currentPos.y(),currentPos.x(),bearing,distance);
......
......@@ -207,6 +207,11 @@ uint16_t SlugsHilSim::getUint16FromDatagram (const QByteArray* datagram, unsigne
}
void SlugsHilSim::linkSelected(int cbIndex){
//hilLink = linksAvailable
// FIXME Mariano
#ifdef MAVLINK_ENABLED_SLUGS
// HIL code to go here...
//hilLink = linksAvailable
Q_UNUSED(cbIndex);
#else
Q_UNUSED(cbIndex);
#endif
}
......@@ -506,6 +506,7 @@ void SlugsPIDControl::get_Pitch2dT_PID()
void SlugsPIDControl::recibeMensaje(int systemId, const mavlink_action_ack_t& action)
{
Q_UNUSED(systemId);
ui->recepcion_label->setText(QString::number(action.action) + ":" + QString::number(action.result));
}
......
......@@ -26,6 +26,7 @@ SlugsPadCameraControl::~SlugsPadCameraControl()
void SlugsPadCameraControl::mouseMoveEvent(QMouseEvent *event)
{
Q_UNUSED(event);
//emit mouseMoveCoord(event->x(),event->y());
if(dragging)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment