]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
robomon: Remove dead code
authorMichal Vokac <vokac.m@gmail.com>
Sun, 5 Oct 2014 08:42:03 +0000 (10:42 +0200)
committerMichal Vokac <vokac.m@gmail.com>
Sun, 5 Oct 2014 08:42:03 +0000 (10:42 +0200)
src/robomon/RobomonAtlantis.cpp

index 7a47c548b6357ba9cea4644abf523336af1056c0..3fa77df50fe2184b4dc5ed640042b38e9e6e05fc 100644 (file)
@@ -67,9 +67,6 @@ RobomonAtlantis::RobomonAtlantis(QStatusBar *_statusBar)
        createActions();
        createMap();
 
-//     connect(vidle, SIGNAL(valueChanged(int)),
-//             robotEstPosBest, SLOT(setVidle(int)));
-
        setFocusPolicy(Qt::StrongFocus);
        sharedMemoryOpened = false;
        WDBG("Youuuhouuuu!!");
@@ -104,7 +101,6 @@ void RobomonAtlantis::createRightLayout()
        rightLayout->addWidget(obstSimGroupBox);
        rightLayout->addWidget(miscGroupBox);
        rightLayout->addWidget(fsmGroupBox);
-       //rightLayout->addWidget(powerGroupBox);
        rightLayout->addWidget(actuatorsGroupBox);
 }
 
@@ -115,8 +111,6 @@ void RobomonAtlantis::createPlaygroundGroupBox()
 
        playgroundScene = new PlaygroundScene();
        playgroundSceneView = new PlaygroundView(playgroundScene);
-       //playgroundSceneView->setMinimumWidth(630);
-       //playgroundSceneView->setMinimumHeight(445);
        playgroundSceneView->setMatrix(QMatrix(1,0,0,-1,0,0), true);
        playgroundSceneView->fitInView(playgroundScene->itemsBoundingRect());
        playgroundSceneView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
@@ -249,17 +243,8 @@ void RobomonAtlantis::createActuatorsGroupBox()
        actuatorsGroupBox = new QGroupBox(tr("Actuators"));
        actuatorsGroupBox->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
        QHBoxLayout *layout = new QHBoxLayout();
-//     vidle = new QDial();
-
-//     vidle->setMinimum(VIDLE_VYSIP);
-//     vidle->setMaximum((VIDLE_UP-VIDLE_VYSIP)+VIDLE_VYSIP);
-//     vidle->setEnabled(true);
-
-       //createMotorsGroupBox();
 
        layout->setAlignment(Qt::AlignLeft);
-//     layout->addWidget(vidle);
-       //layout->addWidget(enginesGroupBox);
        actuatorsGroupBox->setLayout(layout);
 }
 
@@ -368,14 +353,6 @@ void RobomonAtlantis::createActions()
        connect(voltage80CheckBox, SIGNAL(stateChanged(int)),
                        this, SLOT(setVoltage80(int)));
 
-       /* motors */
-//     connect(leftMotorSlider, SIGNAL(valueChanged(int)),
-//                     this, SLOT(setLeftMotor(int)));
-//     connect(rightMotorSlider, SIGNAL(valueChanged(int)),
-//                     this, SLOT(setRightMotor(int)));
-//     connect(stopMotorsPushButton, SIGNAL(clicked()),
-//                     this, SLOT(stopMotors()));
-
        connect(startPlug, SIGNAL(stateChanged(int)), this, SLOT(sendStart(int)));
        connect(colorChoser, SIGNAL(stateChanged(int)), this, SLOT(setTeamColor(int)));
        connect(strategyButton, SIGNAL(pressed()), this, SLOT(changeStrategy_1()));
@@ -441,44 +418,6 @@ void RobomonAtlantis::setVoltage80(int state)
                orte.pwr_ctrl.voltage80 = false;
 }
 
-// void RobomonAtlantis::setLeftMotor(int value)
-// {
-//     short int leftMotor;
-//     short int rightMotor;
-
-//     if(bothMotorsCheckBox->isChecked())
-//             rightMotorSlider->setValue(value);
-
-//     leftMotor = (short int)(MOTOR_LIMIT * (leftMotorSlider->value()/100.0));
-//     rightMotor = (short int)(MOTOR_LIMIT * (rightMotorSlider->value()/100.0));
-
-//     orte.motion_speed.left = leftMotor;
-//     orte.motion_speed.right = rightMotor;
-
-// }
-
-// void RobomonAtlantis::setRightMotor(int value)
-// {
-//     short int leftMotor;
-//     short int rightMotor;
-
-//     if(bothMotorsCheckBox->isChecked())
-//             leftMotorSlider->setValue(value);
-
-//     leftMotor = (short int)(MOTOR_LIMIT * (leftMotorSlider->value()/100.0));
-//     rightMotor = (short int)(MOTOR_LIMIT * (rightMotorSlider->value()/100.0));
-
-//     orte.motion_speed.left = leftMotor;
-//     orte.motion_speed.right = rightMotor;
-
-// }
-
-// void RobomonAtlantis::stopMotors()
-// {
-//     leftMotorSlider->setValue(0);
-//     rightMotorSlider->setValue(0);
-// }
-
 void RobomonAtlantis::useOpenGL(bool use)
 {
        playgroundSceneView->useOpenGL(&use);
@@ -551,20 +490,6 @@ void RobomonAtlantis::paintMap()
        }
 }
 
-// void RobomonAtlantis::setSimulation(int state)
-// {
-//     if(state) {
-//             robottype_publisher_sick_scan_create(&orte, NULL, this);
-//             robottype_publisher_hokuyo_scan_create(&orte, NULL, this);
-//     } else {
-//             if (!simulationEnabled)
-//                     return;
-//             robottype_publisher_sick_scan_destroy(&orte);
-//             robottype_publisher_hokuyo_scan_destroy(&orte);
-//     }
-//     simulationEnabled = state;
-// }
-
 void RobomonAtlantis::setHokuyoSimulation(int state)
 {
        if(state) {
@@ -601,32 +526,6 @@ void RobomonAtlantis::setSick551Simulation(int state)
        sick551SimEnabled = state;
 }
 
-/*!
-               \fn RobomonAtlantis::setObstacleSimulation(int state)
- */
-// void RobomonAtlantis::setObstacleSimulation(int state)
-// {
-//     if (state) {
-//             /* TODO Maybe it is possible to attach only once to Shmap */
-//             ShmapInit(0);
-//             obstacleSimulationTimer = new QTimer(this);
-//             connect(obstacleSimulationTimer, SIGNAL(timeout()),
-//                     this, SLOT(simulateObstaclesHokuyo()));
-//             connect(obstacleSimulationTimer, SIGNAL(timeout()),
-//                     this, SLOT(simulateObstaclesSick()));
-//             obstacleSimulationTimer->start(100);
-//             setMouseTracking(true);
-//             hokuyoScan->setVisible(true);
-//             sickScan->setVisible(true);
-//     } else {
-//             if (obstacleSimulationTimer)
-//                     delete obstacleSimulationTimer;
-//             // Hide scans of lidars
-//             hokuyoScan->setVisible(false);
-//             sickScan->setVisible(false);
-//     }
-// }
-
 void RobomonAtlantis::setHokuyoObstacleSimulation(int state)
 {
        if (state) {