Skip to content
Snippets Groups Projects
Commit 413972db authored by Raphael Grimm's avatar Raphael Grimm
Browse files

PlatformUnitGuiPlugin now stopps the platform when a joystick control is released

parent 066f9881
No related branches found
No related tags found
No related merge requests found
......@@ -104,6 +104,8 @@ void PlatformUnitWidget::connectSlots()
{
connect(ui.buttonMoveToPosition, SIGNAL(clicked()), this, SLOT(moveTo()));
connect(&ctrlEvaluationTimer, SIGNAL(timeout()), this, SLOT(controlTimerTick()));
connect(speedCtrl,SIGNAL(released()), this, SLOT(stopPlatform()));
connect(rotaCtrl, SIGNAL(released()), this, SLOT(stopPlatform()));
}
void PlatformUnitWidget::moveTo()
......@@ -137,6 +139,11 @@ void PlatformUnitWidget::reportPlatformVelocity(::Ice::Float currentPlatformVelo
}
void PlatformUnitWidget::stopPlatform()
{
platformUnitProxy->moveRelative(0, 0, 0, 0, 0);
}
void PlatformUnitWidget::controlTimerTick()
{
//speed control cant be tested in the simulator:
......
......@@ -116,8 +116,16 @@ namespace armarx
Ui::PlatformUnitGuiPlugin ui;
private slots:
/**
\brief Checks the joystick contol widgets speedCtrl and rotaCtrl and performs a move if necessary.
Activated when ctrlEvaluationTimer times out.
*/
void controlTimerTick();
/**
\brief Stops the platform
*/
void stopPlatform();
private:
std::string platformUnitProxyName;
std::string platformName;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment