Subversion Repositories Projects

Rev

Rev 159 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 159 Rev 162
Line 38... Line 38...
38
MKTool::MKTool()
38
MKTool::MKTool()
39
{
39
{
40
    setupUi(this);
40
    setupUi(this);
Line 41... Line 41...
41
 
41
 
42
    Settings = new cSettings;
42
    Settings = new cSettings;
43
    Settings->read_Settings();
43
//    Settings->read_Settings();
Line 44... Line 44...
44
    Settings->read_Settings_FC();
44
//    Settings->read_Settings_FC();
45
 
45
 
46
    init_Arrays();
46
    init_Arrays();
Line 71... Line 71...
71
        showMaximized();
71
        showMaximized();
72
    }
72
    }
Line 73... Line 73...
73
 
73
 
74
    for (int a = 0; a < MaxAnalog; a++)
74
    for (int a = 0; a < MaxAnalog; a++)
75
    {
75
    {
76
        lb_Analog[a]->setText(Settings->Analog[a].Name);
76
        lb_Analog[a]->setText(Settings->Analog1.Label[a]);
Line 77... Line 77...
77
    }
77
    }
78
 
78
 
79
    for (int b = 0; b < 6; b++)
79
    for (int b = 0; b < 6; b++)
Line 103... Line 103...
103
    ac_View3->setChecked(Settings->GUI.TabViews[3]);
103
    ac_View3->setChecked(Settings->GUI.TabViews[3]);
104
    ac_View4->setChecked(Settings->GUI.TabViews[4]);
104
    ac_View4->setChecked(Settings->GUI.TabViews[4]);
105
    ac_View5->setChecked(Settings->GUI.TabViews[5]);
105
    ac_View5->setChecked(Settings->GUI.TabViews[5]);
Line 106... Line 106...
106
 
106
 
-
 
107
    le_Port->setText(Settings->TTY.Port);
-
 
108
 
-
 
109
    cb_ShowMSG->setChecked(Settings->GUI.Term_Info);
-
 
110
    cb_ShowData->setChecked(Settings->GUI.Term_Data);
107
    le_Port->setText(Settings->TTY.Port);
111
    cb_ShowAlways->setChecked(Settings->GUI.Term_Always);
Line 108... Line 112...
108
}
112
}
109
 
113
 
110
void MKTool::init_Objects()
114
void MKTool::init_Objects()
Line 151... Line 155...
151
    connect(ac_View2,        SIGNAL(triggered()), this, SLOT(slot_ac_View()));
155
    connect(ac_View2,        SIGNAL(triggered()), this, SLOT(slot_ac_View()));
152
    connect(ac_View3,        SIGNAL(triggered()), this, SLOT(slot_ac_View()));
156
    connect(ac_View3,        SIGNAL(triggered()), this, SLOT(slot_ac_View()));
153
    connect(ac_View4,        SIGNAL(triggered()), this, SLOT(slot_ac_View()));
157
    connect(ac_View4,        SIGNAL(triggered()), this, SLOT(slot_ac_View()));
154
    connect(ac_View5,        SIGNAL(triggered()), this, SLOT(slot_ac_View()));
158
    connect(ac_View5,        SIGNAL(triggered()), this, SLOT(slot_ac_View()));
Line 155... Line 159...
155
 
159
 
Line 156... Line 160...
156
    connect(pb_Update,  SIGNAL(clicked()), this, SLOT(slot_pb_Update()));
160
//    connect(pb_Update,  SIGNAL(clicked()), this, SLOT(slot_pb_Update()));
157
 
-
 
158
    connect(ac_ConnectTTY, SIGNAL(triggered()), this, SLOT(slot_OpenPort()));
161
 
Line 159... Line 162...
159
    connect(ac_Quit,       SIGNAL(triggered()), this, SLOT(slot_Quit()));
162
    connect(ac_ConnectTTY, SIGNAL(triggered()), this, SLOT(slot_OpenPort()));
160
    connect(ac_RecordCSV,  SIGNAL(triggered()), this, SLOT(slot_RecordCSV()));
163
    connect(ac_RecordCSV,  SIGNAL(triggered()), this, SLOT(slot_RecordCSV()));
Line 161... Line 164...
161
 
164
 
162
    connect(ac_LogDir,       SIGNAL(triggered()), this, SLOT(slot_SetLogDir()));
-
 
163
    connect(ac_ParameterDir, SIGNAL(triggered()), this, SLOT(slot_SetParDir()));
-
 
164
 
165
    connect(ac_LogDir,       SIGNAL(triggered()), this, SLOT(slot_SetLogDir()));
Line 165... Line 166...
165
    // Timer-Events
166
    connect(ac_ParameterDir, SIGNAL(triggered()), this, SLOT(slot_SetParDir()));
166
//    connect(timer,    SIGNAL(timeout()),       SLOT(slot_Timer()));
167
 
167
//    connect(Poll,     SIGNAL(timeout()),       SLOT(slot_Poll()));
168
    // Timer-Events
Line 257... Line 258...
257
 
258
 
Line 258... Line 259...
258
    qwtPlot->setAxisScale(QwtPlot::xBottom,0,PlotWide,0);
259
    qwtPlot->setAxisScale(QwtPlot::xBottom,0,PlotWide,0);
259
 
260
 
260
    for (int a = 0; a < MaxAnalog; a++)
261
    for (int a = 0; a < MaxAnalog; a++)
261
    {
262
    {
262
        Plot[a] = new QwtPlotCurve(Settings->Analog[a].Name);
263
        Plot[a] = new QwtPlotCurve(Settings->Analog1.Label[a]);
Line 263... Line 264...
263
        Plot[a]->setPen(QPen(QColor(Settings->Analog[a].Color)));
264
        Plot[a]->setPen(QPen(QColor(Def_Colors[a])));
264
//        Plot[a]->setRenderHint(QwtPlotItem::RenderAntialiased);
265
//        Plot[a]->setRenderHint(QwtPlotItem::RenderAntialiased);
265
 
266
 
266
        if (Settings->Analog[a].Plot)
267
        if (Settings->Analog1.PlotView[a])
267
            Plot[a]->attach(qwtPlot);
268
            Plot[a]->attach(qwtPlot);
Line 356... Line 357...
356
    send_Data('t', ADDRESS_FC, TX_Data, 4, false);
357
    send_Data('t', ADDRESS_FC, TX_Data, 4, false);
357
}
358
}
Line 358... Line 359...
358
 
359
 
359
void MKTool::slot_ac_Config()
360
void MKTool::slot_ac_Config()
360
{
361
{
-
 
362
    set_Analog Old_Analog1;
361
    set_Analog Old_Analog[MaxAnalog];
363
 
Line 362... Line 364...
362
    memcpy(Old_Analog, Settings->Analog, sizeof(Settings->Analog));
364
    Old_Analog1 = Settings->Analog1;
363
 
365
 
Line 364... Line 366...
364
    dlg_Config *f_Config = new dlg_Config(this);
366
    dlg_Config *f_Config = new dlg_Config(this);
365
    f_Config->set_Settings(Settings);
367
    f_Config->set_Settings(Settings, Mode.ID);
366
 
368
 
367
    if (f_Config->exec()==QDialog::Accepted)
369
    if (f_Config->exec()==QDialog::Accepted)
Line 368... Line 370...
368
    {
370
    {
369
        Settings = f_Config->get_Settings();
371
        Settings = f_Config->get_Settings();
370
        Settings->write_Settings_FC();
372
        Settings->write_Settings_Analog(Mode.ID);
371
 
373
 
372
        for (int a = 0; a < MaxAnalog; a++)
374
        for (int a = 0; a < MaxAnalog; a++)
373
        {
375
        {
374
            if (Old_Analog[a].Plot == Settings->Analog[a].Plot)
376
            if (Old_Analog1.PlotView[a] == Settings->Analog1.PlotView[a])
375
                continue;
377
                continue;
Line 382... Line 384...
382
 
384
 
383
        if (CSVFile->isOpen())
385
        if (CSVFile->isOpen())
384
        {
386
        {
385
            for (int a = 0; a < MaxAnalog; a++)
387
            for (int a = 0; a < MaxAnalog; a++)
386
            {
388
            {
387
                if (Old_Analog[a].Log == Settings->Analog[a].Log)
389
                if (Old_Analog1.LogView[a] == Settings->Analog1.LogView[a])
388
                    continue;
390
                    continue;
389
                else
391
                else
390
                {
392
                {
391
                    slot_RecordCSV();
393
                    slot_RecordCSV();
Line 512... Line 514...
512
void MKTool::config_Plot()
514
void MKTool::config_Plot()
513
{
515
{
514
    for (int a = 0; a < MaxAnalog; a++)
516
    for (int a = 0; a < MaxAnalog; a++)
515
    {
517
    {
516
        Plot[a]->detach();
518
        Plot[a]->detach();
517
        Plot[a]->setPen(QPen(QColor(Settings->Analog[a].Color)));
519
        Plot[a]->setPen(QPen(QColor(Def_Colors[a])));
Line 518... Line 520...
518
 
520
 
-
 
521
        if (Settings->Analog1.PlotView[a])
-
 
522
        {
519
        if (Settings->Analog[a].Plot)
523
            Plot[a]->setTitle(Settings->Analog1.Label[a]);
-
 
524
            Plot[a]->attach(qwtPlot);
520
            Plot[a]->attach(qwtPlot);
525
        }
521
    }
526
    }
Line 522... Line 527...
522
}
527
}
523
 
528
 
Line 530... Line 535...
530
 
535
 
531
// Firmeware-Update
536
// Firmeware-Update
532
///////////////////
537
///////////////////
533
void MKTool::slot_pb_Update()
538
void MKTool::slot_pb_Update()
-
 
539
{
-
 
540
    qDebug("Update");
534
{
541
 
-
 
542
    if (serialPort->isOpen())
535
   diskfree = new QProcess();
543
    {
-
 
544
        slot_OpenPort();
-
 
545
    }
536
   QByteArray ausgabe;
546
 
-
 
547
    Update = new QProcess();
-
 
548
 
537
   const QString programm = "find";
549
    const QString Programm = "avrdude -p m644 -P /dev/ttyS0 -c butterfly -b 57600 -U flash:w:Flight-Ctrl_MEGA644_V0_71f.hex";
538
   const QStringList argumente = (QStringList() << "/home/Manuel/");
550
    const QStringList Argumente = (QStringList() << "-?");
539
 
551
 
540
   te_Shell->setText(""); // Ausgabefenster säubern
552
    te_Shell->setText(""); // Ausgabefenster säubern
541
   diskfree->start(programm, argumente); // Programmaufruf
553
    Update->start(Programm); // Programmaufruf
542
//   diskfree.waitForFinished(); // auf Rückmeldung warten   
554
//   Update.waitForFinished(); // auf Rückmeldung warten
543
//   diskfree.close(); // Kanal schließen     
555
//   Update.close(); // Kanal schließen
544
    connect(diskfree, SIGNAL(readyReadStandardOutput()), this, SLOT(slot_UpdateShell()) );
556
     connect(Update, SIGNAL(readyReadStandardOutput()), this, SLOT(slot_UpdateShell()) );
Line 545... Line 557...
545
}
557
}
546
 
558
 
547
void MKTool::slot_UpdateShell()
559
void MKTool::slot_UpdateShell()
548
{
560
{
549
   QByteArray ausgabe;
561
    QByteArray Output;
Line 550... Line 562...
550
//   te_Shell->setText(""); // Ausgabefenster säubern
562
//   te_Shell->setText(""); // Ausgabefenster säubern
551
//   ausgabe = diskfree->readAllStandardOutput(); // Shellausgabe an Variable
563
    Output = Update->readAllStandardOutput(); // Shellausgabe an Variable
Line 552... Line 564...
552
 
564
 
553
   te_Shell->moveCursor(QTextCursor::End,  QTextCursor::MoveAnchor);
565
    te_Shell->moveCursor(QTextCursor::End,  QTextCursor::MoveAnchor);
554
   te_Shell->insertPlainText(QString::fromUtf8(ausgabe));
566
    te_Shell->insertPlainText(QString::fromUtf8(Output));
Line 555... Line -...
555
 
-
 
556
//   te_Shell->setText(QString::fromUtf8(ausgabe)); // ...und endlich: Ausgabe im QLabel
567
 
557
//    qDebug("Shell");
568
    te_Shell->setText(QString::fromUtf8(Output)); // ...und endlich: Ausgabe im QLabel
558
}
569
    qDebug("Shell");
559
 
570
}
560
 
571
 
Line 1409... Line 1420...
1409
}
1420
}
Line 1410... Line 1421...
1410
 
1421
 
1411
void MKTool::slot_TabChanged(int Tab) // DONE 0.71g
1422
void MKTool::slot_TabChanged(int Tab) // DONE 0.71g
1412
{
1423
{
1413
    Tab = Tab;
-
 
1414
 
1424
    Tab = Tab;
1415
    if ((tab_Main->currentWidget()->objectName() == QString("Tab_2")) && (tab_Par->currentIndex() == 1))
1425
    if (tab_Main->count() != 0)
-
 
1426
    {
-
 
1427
        if ((tab_Main->currentWidget()->objectName() == QString("Tab_2")) && (tab_Par->currentIndex() == 1))
1416
    {
1428
        {
1417
        TX_Data[0] = 0;
1429
            TX_Data[0] = 0;
Line 1418... Line 1430...
1418
        send_Data('p', ADDRESS_FC, TX_Data, 0, true);
1430
            send_Data('p', ADDRESS_FC, TX_Data, 0, true);
1419
 
1431
 
1420
        Ticker->setInterval(500);
1432
            Ticker->setInterval(500);
1421
        TickerEvent[1] = true;
1433
            TickerEvent[1] = true;
1422
    }
1434
        }
1423
    else
1435
        else
1424
    {
1436
        {
1425
        Ticker->setInterval(2000);
1437
            Ticker->setInterval(2000);
Line 1426... Line 1438...
1426
        TickerEvent[1] = false;
1438
            TickerEvent[1] = false;
1427
    }
1439
        }
1428
 
1440
 
1429
    if ((tab_Main->currentWidget()->objectName() == QString("Tab_4")))
1441
        if ((tab_Main->currentWidget()->objectName() == QString("Tab_4")))
1430
    {
1442
        {
Line 1431... Line 1443...
1431
        TX_Data[0] = 0;
1443
            TX_Data[0] = 0;
1432
        TX_Data[1] = 0;
1444
            TX_Data[1] = 0;
1433
        send_Data('l', ADDRESS_ALL, TX_Data, 1, true);
1445
            send_Data('l', ADDRESS_ALL, TX_Data, 1, true);
1434
 
1446
 
1435
        Ticker->setInterval(500);
1447
            Ticker->setInterval(500);
1436
        TickerEvent[2] = true;
1448
            TickerEvent[2] = true;
1437
    }
1449
        }
-
 
1450
        else
1438
    else
1451
        {
1439
    {
-
 
1440
        Ticker->setInterval(2000);
1452
            Ticker->setInterval(2000);
Line 1441... Line 1453...
1441
        TickerEvent[2] = false;
1453
            TickerEvent[2] = false;
1442
    }
1454
        }
1443
 
1455
    }
Line 1500... Line 1512...
1500
    TabViews.setBit(2, ac_View2->isChecked());
1512
    TabViews.setBit(2, ac_View2->isChecked());
1501
    TabViews.setBit(3, ac_View3->isChecked());
1513
    TabViews.setBit(3, ac_View3->isChecked());
1502
    TabViews.setBit(4, ac_View4->isChecked());
1514
    TabViews.setBit(4, ac_View4->isChecked());
1503
    TabViews.setBit(5, ac_View5->isChecked());
1515
    TabViews.setBit(5, ac_View5->isChecked());
Line -... Line 1516...
-
 
1516
 
-
 
1517
    Settings->GUI.Term_Info   = cb_ShowMSG->isChecked();
-
 
1518
    Settings->GUI.Term_Data   = cb_ShowData->isChecked();
-
 
1519
    Settings->GUI.Term_Always = cb_ShowAlways->isChecked();
1504
 
1520
 
Line 1505... Line 1521...
1505
    QSettings Setting("KeyOz-Net", "QMK-Groundstation");
1521
    QSettings Setting("KeyOz-Net", "QMK-Groundstation");
1506
 
1522
 
1507
    Setting.beginGroup("Port");
1523
    Setting.beginGroup("Port");
Line 1522... Line 1538...
1522
void MKTool::write_CSV()
1538
void MKTool::write_CSV()
1523
{
1539
{
1524
    QTextStream Out(CSVFile);
1540
    QTextStream Out(CSVFile);
1525
    for (int a=0; a<MaxAnalog; a++)
1541
    for (int a=0; a<MaxAnalog; a++)
1526
    {
1542
    {
1527
        if (Settings->Analog[a].Log)
1543
        if (Settings->Analog1.LogView[a])
1528
        {
1544
        {
1529
            Out << AnalogData[a];
1545
            Out << AnalogData[a];
1530
            if (a < MaxAnalog - 1)
1546
            if (a < MaxAnalog - 1)
1531
                Out << ';';
1547
                Out << ';';
1532
        }
1548
        }
Line 1547... Line 1563...
1547
 
1563
 
Line 1548... Line 1564...
1548
            QTextStream Out(CSVFile);
1564
            QTextStream Out(CSVFile);
1549
 
1565
 
1550
            for (int a = 0; a < MaxAnalog; a++)
1566
            for (int a = 0; a < MaxAnalog; a++)
1551
            {
1567
            {
1552
                if (Settings->Analog[a].Log)
1568
                if (Settings->Analog1.LogView[a])
Line 1553... Line 1569...
1553
                {
1569
                {
1554
                    Out << Settings->Analog[a].Name;
1570
                    Out << Settings->Analog1.Label[a];
1555
 
1571
 
1556
                    if (a < MaxAnalog - 1)
1572
                    if (a < MaxAnalog - 1)
Line 1562... Line 1578...
1562
        else
1578
        else
1563
        {
1579
        {
1564
            CSVFile->open(QIODevice::Append | QIODevice::Text);
1580
            CSVFile->open(QIODevice::Append | QIODevice::Text);
1565
        }
1581
        }
Line 1566... Line -...
1566
 
-
 
1567
//        QIcon icon;
-
 
1568
//        icon.addPixmap(QPixmap(QString::fromUtf8(":/Actions/Images/media-playback-stop.png")), QIcon::Normal, QIcon::Off);
1582
 
1569
        pb_Record->setIcon(Icons[6]);
1583
        pb_Record->setIcon(Icons[6]);
1570
        pb_Record->setText("CSV Stop");
1584
        pb_Record->setText("CSV Stop");
1571
        ac_RecordCSV->setIcon(Icons[6]);
1585
        ac_RecordCSV->setIcon(Icons[6]);
1572
        ac_RecordCSV->setText("CSV Stop");
1586
        ac_RecordCSV->setText("CSV Stop");
1573
    }
1587
    }
1574
    else
1588
    else
1575
    {
1589
    {
1576
        CSVFile->close();
-
 
1577
//        QIcon icon;
-
 
1578
//        icon.addPixmap(QPixmap(QString::fromUtf8(":/Actions/Images/media-record.png")), QIcon::Normal, QIcon::Off);
1590
        CSVFile->close();
1579
        pb_Record->setIcon(Icons[7]);
1591
        pb_Record->setIcon(Icons[7]);
1580
        pb_Record->setText("CSV Aufzeichnen");
1592
        pb_Record->setText("CSV Aufzeichnen");
1581
        ac_RecordCSV->setIcon(Icons[7]);
1593
        ac_RecordCSV->setIcon(Icons[7]);
1582
        ac_RecordCSV->setText("CSV  Aufzeichnen");
1594
        ac_RecordCSV->setText("CSV  Aufzeichnen");
Line 1648... Line 1660...
1648
 
1660
 
1649
    if (LastSend.length() > 2)
1661
    if (LastSend.length() > 2)
1650
    {
1662
    {
Line -... Line 1663...
-
 
1663
    }
-
 
1664
 
1651
    }
1665
    int HardwareID = RX.Input[1] - 'a';
1652
 
1666
 
1653
    switch(RX.Input[2])
1667
    switch(RX.Input[2])
1654
    {
1668
    {
1655
        case 'L' : // DONE 0.71g
1669
        case 'L' : // DONE 0.71g
Line 1686... Line 1700...
1686
                    if (ToolBox::Decode64(RX, true))
1700
                    if (ToolBox::Decode64(RX, true))
1687
                    {
1701
                    {
1688
                        int Position = RX.Decode[0];
1702
                        int Position = RX.Decode[0];
1689
                        if (Position < 32)
1703
                        if (Position < 32)
1690
                        {
1704
                        {
1691
                            Settings->Analog[Position].Name = ToolBox::Data2QString(RX.Decode,1,17).trimmed();
1705
                            Settings->Analog1.Label[Position] = ToolBox::Data2QString(RX.Decode,1,17).trimmed();
1692
                            Position ++;
1706
                            Position ++;
1693
                            TX_Data[0] = Position;
1707
                            TX_Data[0] = Position;
1694
                            send_Data('a', ADDRESS_ALL, TX_Data, 1, false);
1708
                            send_Data('a', ADDRESS_ALL, TX_Data, 1, false);
1695
                        }
1709
                        }
1696
                        if (Position == 32)
1710
                        if (Position == 32)
1697
                        {
1711
                        {
1698
                            for (int a = 0; a < MaxAnalog; a++)
1712
                            for (int a = 0; a < MaxAnalog; a++)
1699
                            {
1713
                            {
1700
                                lb_Analog[a]->setText(Settings->Analog[a].Name);
1714
                                lb_Analog[a]->setText(Settings->Analog1.Label[a]);
1701
                            }
1715
                            }
1702
                            Settings->write_Settings_FC();
1716
                            Settings->write_Settings_AnalogLabels(HardwareID);
1703
                            config_Plot();
1717
                            config_Plot();
1704
                        }
1718
                        }
1705
                    }
1719
                    }
1706
                break;
1720
                break;
1707
        case 'D' : // DONE 0.71g
1721
        case 'D' : // DONE 0.71g
Line 1784... Line 1798...
1784
                            pb_Write->setDisabled(true);
1798
                            pb_Write->setDisabled(true);
Line 1785... Line 1799...
1785
 
1799
 
1786
//                            QMessageBox::warning(this, QA_NAME,
1800
//                            QMessageBox::warning(this, QA_NAME,
1787
//                               "Keine Verbindung zur FlightCtrl. \nParameterbearbeitung nicht moeglich.", QMessageBox::Ok);
1801
//                               "Keine Verbindung zur FlightCtrl. \nParameterbearbeitung nicht moeglich.", QMessageBox::Ok);
-
 
1802
                    }
-
 
1803
 
-
 
1804
                    Settings->read_Settings_AnalogLabels(HardwareID);
-
 
1805
                    Settings->read_Settings_Analog(HardwareID);
-
 
1806
                    for (int a = 0; a < MaxAnalog; a++)
-
 
1807
                    {
-
 
1808
                        lb_Analog[a]->setText(Settings->Analog1.Label[a]);
-
 
1809
                    }
-
 
1810
                    config_Plot();
1788
                    }
1811
 
1789
                break;
1812
                break;
1790
    }
1813
    }
Line 1791... Line 1814...
1791
}
1814
}
Line 1809... Line 1832...
1809
            if (ToolBox::check_CRC(RxData.String))
1832
            if (ToolBox::check_CRC(RxData.String))
1810
            {
1833
            {
1811
                RxData.Input = RxData.String.toLatin1().data();
1834
                RxData.Input = RxData.String.toLatin1().data();
1812
                new_RXData(RxData);
1835
                new_RXData(RxData);
Line 1813... Line 1836...
1813
 
1836
 
1814
                if ((cb_ShowData->isChecked()) && (tab_Main->currentWidget()->objectName() == QString("Tab_3")))
1837
                if ((cb_ShowData->isChecked()) && ((tab_Main->currentWidget()->objectName() == QString("Tab_3")) || (cb_ShowAlways->isChecked())))
1815
                {
1838
                {
1816
                    te_RX->moveCursor(QTextCursor::End,  QTextCursor::MoveAnchor);
1839
                    te_RX->moveCursor(QTextCursor::End,  QTextCursor::MoveAnchor);
1817
                    te_RX->insertPlainText(RxData.String + '\r');
1840
                    te_RX->insertPlainText(RxData.String + '\r');
1818
                }
1841
                }
1819
            }
1842
            }
1820
            else
1843
            else
1821
            {
1844
            {
1822
                if ((cb_ShowMSG->isChecked()) && (tab_Main->currentWidget()->objectName() == QString("Tab_3")))
1845
                if ((cb_ShowMSG->isChecked()) && ((tab_Main->currentWidget()->objectName() == QString("Tab_3")) || (cb_ShowAlways->isChecked())))
1823
                {
1846
                {
1824
                    te_RX->moveCursor(QTextCursor::End,  QTextCursor::MoveAnchor);
1847
                    te_RX->moveCursor(QTextCursor::End,  QTextCursor::MoveAnchor);
1825
                    te_RX->insertPlainText(RxData.String + '\r');
1848
                    te_RX->insertPlainText(RxData.String + '\r');
1826
                }
1849
                }
Line 1910... Line 1933...
1910
}
1933
}
Line 1911... Line 1934...
1911
 
1934
 
1912
 
1935
 
-
 
1936
// Programm beenden
1913
// Programm beenden
1937
///////////////////
1914
///////////////////
1938
 
-
 
1939
MKTool::~MKTool()
1915
void MKTool::slot_Quit()
1940
{
1916
{
1941
    qDebug(" Programm Ende ..!! ");
1917
    if (serialPort->isOpen())
1942
    if (serialPort->isOpen())
1918
    {
1943
    {
Line 1919... Line 1944...
1919
        serialPort->close();
1944
        serialPort->close();
-
 
1945
    }
Line 1920... Line 1946...
1920
    }
1946
 
1921
 
1947
    write_Settings();
1922
    write_Settings();
1948
    Settings->write_Settings();
1923
 
1949
 
Line 1924... Line 1950...
1924
    if (CSVFile->isOpen())
1950
    if (CSVFile->isOpen())
1925
    {
-
 
1926
        CSVFile->close();
-
 
1927
    }
-
 
1928
 
-
 
1929
    close();
-
 
1930
}
-
 
1931
 
1951
    {