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