Subversion Repositories Projects

Rev

Rev 449 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 449 Rev 500
Line 58... Line 58...
58
void MKTool::init_GUI()
58
void MKTool::init_GUI()
59
{
59
{
60
    setWindowTitle(QA_NAME + " v" + QA_VERSION);
60
    setWindowTitle(QA_NAME + " v" + QA_VERSION);
Line 61... Line 61...
61
 
61
 
62
    // Tab mit Debug-Elementen verbergen
62
    // Tab mit Debug-Elementen verbergen
Line 63... Line 63...
63
    tab_Main->removeTab(6);
63
    //tab_Main->removeTab(6);
64
 
64
 
65
    // Develop - Nicht gebrauchte sachen abschalten.
65
    // Develop - Nicht gebrauchte sachen abschalten.
66
    pb_SettingsReset->hide();
66
    pb_SettingsReset->hide();
Line 200... Line 200...
200
{
200
{
201
    //new KopterData object that contains all data from MK
201
    //new KopterData object that contains all data from MK
202
    data = new KopterData();
202
    data = new KopterData();
Line 203... Line 203...
203
 
203
 
204
    //new QT-Communication object
204
    //new QT-Communication object
Line 205... Line 205...
205
    com = new QTSerialCommunication();
205
    com = new QTSerialCommunication(handler);
206
 
206
 
Line 207... Line 207...
207
    //create handler that handles incomming data
207
    //create handler that handles incomming data
Line 247... Line 247...
247
    // Daten Senden / Empfangen
247
    // Daten Senden / Empfangen
248
//FIXME: put this in QTCommunication.cpp
248
//FIXME: put this in QTCommunication.cpp
249
//    connect(o_Connection, SIGNAL(newData(sRxData)), this, SLOT(slot_newData(sRxData)));
249
//    connect(o_Connection, SIGNAL(newData(sRxData)), this, SLOT(slot_newData(sRxData)));
250
//    connect(o_Connection, SIGNAL(showTerminal(int, QString)), this, SLOT(slot_showTerminal(int, QString)));
250
//    connect(o_Connection, SIGNAL(showTerminal(int, QString)), this, SLOT(slot_showTerminal(int, QString)));
Line 251... Line 251...
251
 
251
 
252
    // Serielle Verbundung öffnen / schließen
252
    // click on button to open/close serial connection
Line 253... Line 253...
253
    connect(ac_ConnectTTY, SIGNAL(triggered()), this, SLOT(slot_OpenPort()));
253
    connect(ac_ConnectTTY, SIGNAL(triggered()), this, SLOT(slot_serial_connect()));
254
 
254
 
Line 255... Line 255...
255
    // TCP-Connection for other QMK-Groundstations
255
    // clock on button for the TCP-Connection to other QMK-Groundstations
256
    connect(ac_QMKServer, SIGNAL(triggered()), this, SLOT(slot_QMKS_Connect()));
256
    connect(ac_QMKServer, SIGNAL(triggered()), this, SLOT(slot_QMKS_Connect()));
257
 
257
 
Line 566... Line 566...
566
//FIXME: Put this somewhere in libMK/QTCommunication.cpp
566
//FIXME: Put this somewhere in libMK/QTCommunication.cpp
567
// Ticker-Event
567
// Ticker-Event
568
///////////////
568
///////////////
569
/*void MKTool::slot_Ticker()
569
/*void MKTool::slot_Ticker()
570
{
570
{
571
 
-
 
572
 
-
 
573
    if (TickerDiv)
571
    if (TickerDiv)
574
        TickerDiv = false;
572
        TickerDiv = false;
575
    else
573
    else
576
        TickerDiv = true;
574
        TickerDiv = true;
Line 1478... Line 1476...
1478
        }
1476
        }
1479
        break;
1477
        break;
1480
    }
1478
    }
1481
}
1479
}
Line 1482... Line 1480...
1482
 
1480
 
1483
// Verbindung zum Kopter herstellen / Trennen
1481
// connect to MK
1484
void MKTool::slot_OpenPort()
1482
void MKTool::slot_serial_connect()
-
 
1483
{
-
 
1484
    //connect to Mikrokopter
-
 
1485
    com->connect_MK(le_Port->text().toAscii().data());
-
 
1486
    //TODO: check, if connection really is established
-
 
1487
    ac_ConnectTTY->setText(tr("Kopter Trennen"));
-
 
1488
 
-
 
1489
    le_Port->setEnabled(false);
-
 
1490
 
-
 
1491
    //send command to get version of MK
-
 
1492
    handler->get_version();
-
 
1493
 
-
 
1494
    //TODO: Ticker->start(2000);
-
 
1495
    //TODO: disconnect
1485
{
1496
 
1486
//FIXME: Put this in libMK/QTCommunication.cpp
1497
    //FIXME: Put this in libMK/QTCommunication.cpp
1487
/*
1498
/*
1488
    if (o_Connection->isOpen())
1499
    if (o_Connection->isOpen())
1489
    {
1500
    {
1490
        TX_Data[0] = Settings->Data.Debug_Off / 10;
1501
        TX_Data[0] = Settings->Data.Debug_Off / 10;