Commit 24560f76 authored by PIXHAWK Team's avatar PIXHAWK Team

Arrow key control

parent c7deeaa8
......@@ -637,10 +637,39 @@ void HSIDisplay::keyPressEvent(QKeyEvent* event)
statusClearTimer.start();
sendBodySetPointCoordinates();
}
else
else if ((event->key() == Qt::Key_Up))
{
HDDisplay::keyPressEvent(event);
setBodySetpointCoordinateXY(0.5, 0);
}
else if ((event->key() == Qt::Key_Down))
{
setBodySetpointCoordinateXY(-0.5, 0);
}
else if ((event->key() == Qt::Key_Left))
{
setBodySetpointCoordinateXY(0, -0.5);
}
else if ((event->key() == Qt::Key_Right))
{
setBodySetpointCoordinateXY(0, 0.5);
}
else if ((event->key() == Qt::Key_Plus))
{
setBodySetpointCoordinateZ(-0.2);
}
else if ((event->key() == Qt::Key_Minus))
{
setBodySetpointCoordinateZ(+0.2);
}
else if ((event->key() == Qt::Key_L))
{
setBodySetpointCoordinateYaw(-0.1);
}
else if ((event->key() == Qt::Key_R))
{
setBodySetpointCoordinateYaw(0.1);
}
HDDisplay::keyPressEvent(event);
}
void HSIDisplay::contextMenuEvent (QContextMenuEvent* event)
......
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