Subversion Repositories Projects

Rev

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

Rev 163 Rev 166
Line 57... Line 57...
57
 
57
 
58
void MKTool::init_GUI()
58
void MKTool::init_GUI()
59
{
59
{
Line -... Line 60...
-
 
60
    setWindowTitle(QA_NAME + " v" + QA_VERSION);
-
 
61
 
-
 
62
    toolBar->addWidget(lb_Port);
-
 
63
    toolBar->addWidget(le_Port);
-
 
64
    toolBar->addSeparator();
-
 
65
    toolBar->addWidget(cb_Hardware);
-
 
66
 
-
 
67
    lb_Status->setText("Hallo bei QMK-Groundstation...!!!");
-
 
68
 
60
    setWindowTitle(QA_NAME + " v" + QA_VERSION);
69
    tab_Main->removeTab(6);
61
 
70
 
-
 
71
#ifdef _EEEPC_
62
#ifdef _EEEPC_
72
    toolBar->hide();
Line 63... Line 73...
63
    toolBar->hide();
73
    lb_Status->hide();
64
#endif
74
#endif
Line 145... Line 155...
145
 
155
 
146
    connect(ac_Motortest,    SIGNAL(triggered()), this, SLOT(slot_ac_Motortest()));
156
    connect(ac_Motortest,    SIGNAL(triggered()), this, SLOT(slot_ac_Motortest()));
147
    connect(ac_StartPlotter, SIGNAL(triggered()), this, SLOT(slot_ac_StartPlotter()));
157
    connect(ac_StartPlotter, SIGNAL(triggered()), this, SLOT(slot_ac_StartPlotter()));
148
    connect(ac_MehrDaten,    SIGNAL(triggered()), this, SLOT(slot_ac_MehrDaten()));
158
    connect(ac_MehrDaten,    SIGNAL(triggered()), this, SLOT(slot_ac_MehrDaten()));
-
 
159
    connect(ac_About,        SIGNAL(triggered()), this, SLOT(slot_ac_About()));
149
    connect(ac_About,        SIGNAL(triggered()), this, SLOT(slot_ac_About()));
160
    connect(ac_KeineDaten,   SIGNAL(triggered()), this, SLOT(slot_ac_KeineDaten()));
Line 150... Line 161...
150
    connect(ac_GetLabels,    SIGNAL(triggered()), this, SLOT(slot_ac_GetLabels()));
161
    connect(ac_GetLabels,    SIGNAL(triggered()), this, SLOT(slot_ac_GetLabels()));
151
 
162
 
152
    // Tabs ein & ausblenden
163
    // Tabs ein & ausblenden
153
    connect(ac_View0,        SIGNAL(triggered()), this, SLOT(slot_ac_View()));
164
    connect(ac_View0,        SIGNAL(triggered()), this, SLOT(slot_ac_View()));
154
    connect(ac_View1,        SIGNAL(triggered()), this, SLOT(slot_ac_View()));
165
    connect(ac_View1,        SIGNAL(triggered()), this, SLOT(slot_ac_View()));
155
    connect(ac_View2,        SIGNAL(triggered()), this, SLOT(slot_ac_View()));
166
    connect(ac_View2,        SIGNAL(triggered()), this, SLOT(slot_ac_View()));
156
    connect(ac_View3,        SIGNAL(triggered()), this, SLOT(slot_ac_View()));
167
    connect(ac_View3,        SIGNAL(triggered()), this, SLOT(slot_ac_View()));
Line 157... Line 168...
157
    connect(ac_View4,        SIGNAL(triggered()), this, SLOT(slot_ac_View()));
168
    connect(ac_View4,        SIGNAL(triggered()), this, SLOT(slot_ac_View()));
-
 
169
    connect(ac_View5,        SIGNAL(triggered()), this, SLOT(slot_ac_View()));
Line 158... Line 170...
158
    connect(ac_View5,        SIGNAL(triggered()), this, SLOT(slot_ac_View()));
170
 
159
 
171
    connect(pb_Update,  SIGNAL(clicked()), this, SLOT(slot_pb_Update()));
Line 160... Line 172...
160
//    connect(pb_Update,  SIGNAL(clicked()), this, SLOT(slot_pb_Update()));
172
    connect(pb_HexFile,  SIGNAL(clicked()), this, SLOT(slot_pb_HexFile()));
Line 251... Line 263...
251
    Grid->setMajPen(QPen(Qt::gray, 0, Qt::DotLine));
263
    Grid->setMajPen(QPen(Qt::gray, 0, Qt::DotLine));
Line 252... Line 264...
252
 
264
 
Line 253... Line 265...
253
 
265
 
Line 254... Line 266...
254
    Grid->attach(qwtPlot);
266
    Grid->attach(qwtPlot);
255
 
267
 
256
    qwtPlot->setAxisScale(QwtPlot::xBottom,0,PlotWide,0);
268
    qwtPlot->setAxisScale(QwtPlot::xBottom,0,Settings->Data.Plotter_Count,0);
257
 
269
 
Line 386... Line 398...
386
 
398
 
387
void MKTool::slot_ac_Preferences()
399
void MKTool::slot_ac_Preferences()
388
{
400
{
Line -... Line 401...
-
 
401
    dlg_Preferences *f_Preferences = new dlg_Preferences(this);
389
    dlg_Preferences *f_Preferences = new dlg_Preferences(this);
402
 
Line 390... Line 403...
390
 
403
    Settings->TTY.Port = le_Port->text();
391
    f_Preferences->set_Settings(Settings);
404
    f_Preferences->set_Settings(Settings);
392
 
405
 
393
    if (f_Preferences->exec()==QDialog::Accepted)
406
    if (f_Preferences->exec()==QDialog::Accepted)
-
 
407
    {
-
 
408
        Settings = f_Preferences->get_Settings();
394
    {
409
        Settings->write_Settings();
395
        Settings = f_Preferences->get_Settings();
410
        le_Port->setText(Settings->TTY.Port);
Line 396... Line 411...
396
        Settings->write_Settings();
411
        config_Plot();
397
    }
412
    }
Line 451... Line 466...
451
    }
466
    }
452
}
467
}
Line 453... Line 468...
453
 
468
 
454
void MKTool::slot_ac_MehrDaten() // DONE 0.71g
469
void MKTool::slot_ac_MehrDaten() // DONE 0.71g
455
{
470
{
456
    if (ac_MehrDaten->isChecked())
471
    if (!ac_KeineDaten->isChecked())
-
 
472
    {
-
 
473
        if (ac_MehrDaten->isChecked())
-
 
474
        {
-
 
475
            TX_Data[0] = Settings->Data.Debug_Fast / 10;
-
 
476
            send_Data('d', ADDRESS_ALL, TX_Data, 1, false);
-
 
477
        }
-
 
478
        else
-
 
479
        {
-
 
480
            TX_Data[0] = Settings->Data.Debug_Slow / 10;
-
 
481
            send_Data('d', ADDRESS_ALL, TX_Data, 1, false);
-
 
482
        }
-
 
483
    }
-
 
484
}
-
 
485
 
-
 
486
void MKTool::slot_ac_KeineDaten() // DONE 0.71g
-
 
487
{
-
 
488
    if (ac_KeineDaten->isChecked())
457
    {
489
    {
458
        TX_Data[0] = 10;
490
        TX_Data[0] = 0;
-
 
491
        send_Data('d', ADDRESS_ALL, TX_Data, 1, false);
459
        send_Data('d', ADDRESS_ALL, TX_Data, 1, false);    }
492
    }
460
    else
493
    else
-
 
494
    {
-
 
495
        if (ac_MehrDaten->isChecked())
461
    {
496
        {
462
        TX_Data[0] = 50;
497
            TX_Data[0] = Settings->Data.Debug_Fast / 10;
-
 
498
            send_Data('d', ADDRESS_ALL, TX_Data, 1, false);
-
 
499
        }
-
 
500
        else
-
 
501
        {
-
 
502
            TX_Data[0] = Settings->Data.Debug_Slow / 10;
-
 
503
            send_Data('d', ADDRESS_ALL, TX_Data, 1, false);
-
 
504
        }
463
        send_Data('d', ADDRESS_ALL, TX_Data, 1, false);    }
505
    }
Line 464... Line 506...
464
}
506
}
465
 
507
 
466
void MKTool::slot_ac_About()
508
void MKTool::slot_ac_About()
Line 482... Line 524...
482
    for (int a = 0; a < MaxAnalog; a++)
524
    for (int a = 0; a < MaxAnalog; a++)
483
    {
525
    {
484
        Plot[a]->setData(aID,aData[a],NextPlot - 1);
526
        Plot[a]->setData(aID,aData[a],NextPlot - 1);
485
    }
527
    }
Line 486... Line 528...
486
 
528
 
487
    if ((NextPlot > PlotWide))
529
    if ((NextPlot > Settings->Data.Plotter_Count))
488
    {
530
    {
489
        scroll_plot->setMaximum(NextPlot - PlotWide);
531
        scroll_plot->setMaximum(NextPlot - Settings->Data.Plotter_Count);
Line 490... Line 532...
490
    }
532
    }
491
 
533
 
492
    if ((scroll_plot->value() == NextPlot - (PlotWide + 1)))
534
    if ((scroll_plot->value() == NextPlot - (Settings->Data.Plotter_Count + 1)))
493
    {
535
    {
494
        qwtPlot->setAxisScale(QwtPlot::xBottom,NextPlot - PlotWide,NextPlot,0);
536
        qwtPlot->setAxisScale(QwtPlot::xBottom,NextPlot - Settings->Data.Plotter_Count,NextPlot,0);
Line 495... Line 537...
495
        scroll_plot->setValue(NextPlot - PlotWide);
537
        scroll_plot->setValue(NextPlot - Settings->Data.Plotter_Count);
496
    }
538
    }
Line 497... Line 539...
497
 
539
 
498
    qwtPlot->replot();
540
    qwtPlot->replot();
-
 
541
}
-
 
542
 
-
 
543
void MKTool::config_Plot()
499
}
544
{
500
 
545
//    qDebug("Plotter rekonfiguriert..!!");
501
void MKTool::config_Plot()
546
    qwtPlot->setAxisScale(QwtPlot::xBottom,0,Settings->Data.Plotter_Count,0);
502
{
547
 
Line 509... Line 554...
509
        {
554
        {
510
            Plot[a]->setTitle(Settings->Analog1.Label[a]);
555
            Plot[a]->setTitle(Settings->Analog1.Label[a]);
511
            Plot[a]->attach(qwtPlot);
556
            Plot[a]->attach(qwtPlot);
512
        }
557
        }
513
    }
558
    }
-
 
559
    qwtPlot->replot();
514
}
560
}
Line 515... Line 561...
515
 
561
 
516
void MKTool::slot_ScrollPlot(int Pos)
562
void MKTool::slot_ScrollPlot(int Pos)
517
{
563
{
518
    qwtPlot->setAxisScale(QwtPlot::xBottom,Pos,Pos + PlotWide,0);
564
    qwtPlot->setAxisScale(QwtPlot::xBottom,Pos,Pos + Settings->Data.Plotter_Count,0);
519
    qwtPlot->replot();
565
    qwtPlot->replot();
Line 520... Line 566...
520
}
566
}
521
 
567
 
522
 
568
 
523
// Firmeware-Update
569
// Firmeware-Update
524
///////////////////
-
 
Line -... Line 570...
-
 
570
///////////////////
-
 
571
void MKTool::slot_pb_Update()
-
 
572
{
-
 
573
 
-
 
574
 
525
void MKTool::slot_pb_Update()
575
    QString Message = "Firmeware-Datei \n\n";
526
{
576
    Message = Message + le_HexFile->text() + "\n\n";
527
    qDebug("Update");
577
    Message = Message + trUtf8("an FlightCtrl mit AVRDUDE - Seriel & Bootloader über ") + le_Port->text() + trUtf8(" übertragen?\n");
528
 
578
 
-
 
579
    if (le_HexFile->text() == "")
-
 
580
    {
-
 
581
        QMessageBox::warning(this, QA_NAME, trUtf8("Bitte Firmeware-Datei wählen."), QMessageBox::Ok);
-
 
582
    }
-
 
583
    else if (QMessageBox::warning(this, QA_NAME, Message, QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes)
-
 
584
    {
-
 
585
        QString Programm = "avrdude" ;
-
 
586
        QString Device   = "m644";
-
 
587
 
-
 
588
        QStringList Argumente;
-
 
589
 
-
 
590
        Update = new QProcess();
-
 
591
 
-
 
592
        if (serialPort->isOpen())
-
 
593
        {
-
 
594
            slot_OpenPort();
-
 
595
        }
-
 
596
 
-
 
597
        Argumente << "-P";
-
 
598
        Argumente << le_Port->text();
-
 
599
        Argumente << "-p";
-
 
600
        Argumente << Device;
-
 
601
        Argumente << "-c";
-
 
602
        Argumente << "butterfly";
Line 529... Line 603...
529
    if (serialPort->isOpen())
603
        Argumente << "-b";
Line 530... Line -...
530
    {
-
 
531
        slot_OpenPort();
604
        Argumente << "57600";
Line 532... Line 605...
532
    }
605
        Argumente << "-U";
533
 
606
        Argumente << "flash:w:" + le_HexFile->text();
-
 
607
 
534
    Update = new QProcess();
608
//    QString Programm = "/home/Manuel/bin/avrdude -p m644 -P /dev/ttyS0 -c butterfly -b 57600 -U flash:w:/home/Manuel/Documents/Mikrokopter/Firmeware/FlightCtrl/Flight-Ctrl_MEGA644_V0_71h.hex";
535
 
609
 
536
    const QString Programm = "avrdude -p m644 -P /dev/ttyS0 -c butterfly -b 57600 -U flash:w:Flight-Ctrl_MEGA644_V0_71f.hex";
-
 
537
    const QStringList Argumente = (QStringList() << "-?");
610
        te_Shell->setText(""); // Ausgabefenster säubern
Line 538... Line 611...
538
 
611
 
539
    te_Shell->setText(""); // Ausgabefenster säubern
612
        connect(Update, SIGNAL(readyReadStandardOutput()), this, SLOT(slot_UpdateShell()) );
540
    Update->start(Programm); // Programmaufruf
613
        connect(Update, SIGNAL(readyReadStandardError()), this, SLOT(slot_UpdateShell()) );
541
//   Update.waitForFinished(); // auf Rückmeldung warten
-
 
542
//   Update.close(); // Kanal schließen
-
 
Line -... Line 614...
-
 
614
 
543
     connect(Update, SIGNAL(readyReadStandardOutput()), this, SLOT(slot_UpdateShell()) );
615
        Update->start(Programm, Argumente); // Programmaufruf
544
}
616
    }
Line -... Line 617...
-
 
617
}
545
 
618
 
546
void MKTool::slot_UpdateShell()
619
void MKTool::slot_UpdateShell()
547
{
620
{
Line -... Line 621...
-
 
621
    QByteArray Output;
-
 
622
 
-
 
623
    Output = Update->readAllStandardError(); // Shellausgabe an Variable
-
 
624
    te_Shell->moveCursor(QTextCursor::End,  QTextCursor::MoveAnchor);
-
 
625
    te_Shell->insertPlainText(QString::fromUtf8(Output));
-
 
626
 
-
 
627
    Output = Update->readAll();
-
 
628
    te_Shell->moveCursor(QTextCursor::End,  QTextCursor::MoveAnchor);
-
 
629
    te_Shell->insertPlainText(QString::fromUtf8(Output));
Line 548... Line 630...
548
    QByteArray Output;
630
}
549
//   te_Shell->setText(""); // Ausgabefenster säubern
631
 
Line 550... Line 632...
550
    Output = Update->readAllStandardOutput(); // Shellausgabe an Variable
632
void MKTool::slot_pb_HexFile()
Line 810... Line 892...
810
    if (Combo->currentText() == QString("Poti 4"))
892
    if (Combo->currentText() == QString("Poti 4"))
811
        return 254;
893
        return 254;
812
    return Combo->currentText().toInt();
894
    return Combo->currentText().toInt();
813
}
895
}
Line 814... Line 896...
814
 
896
 
815
void MKTool::store_ParameterSet(int Set) // DONE 0.71g
897
void MKTool::store_ParameterSet(int Set) // DONE 0.71h
816
{
898
{
Line 817... Line 899...
817
    char *Name = le_SetName->text().toLatin1().data();
899
    char *Name = le_SetName->text().toLatin1().data();
Line 946... Line 1028...
946
    ParameterSet[Set][P_NAV_GPS_I]      = get_Value(cb_12_6);
1028
    ParameterSet[Set][P_NAV_GPS_I]      = get_Value(cb_12_6);
947
    ParameterSet[Set][P_NAV_GPS_D]      = get_Value(cb_12_7);
1029
    ParameterSet[Set][P_NAV_GPS_D]      = get_Value(cb_12_7);
948
    ParameterSet[Set][P_NAV_GPS_ACC]    = get_Value(cb_12_8);
1030
    ParameterSet[Set][P_NAV_GPS_ACC]    = get_Value(cb_12_8);
Line 949... Line 1031...
949
 
1031
 
950
    //Seite 13
1032
    //Seite 13
951
    ParameterSet[Set][P_NAV_WIND_CORR]  = get_Value(cb_13_1);
1033
    ParameterSet[Set][P_NAV_WIND_CORR]   = get_Value(cb_13_1);
952
    ParameterSet[Set][P_NAV_SPEED_COMP] = get_Value(cb_13_2);
1034
    ParameterSet[Set][P_NAV_SPEED_COMP]  = get_Value(cb_13_2);
-
 
1035
    ParameterSet[Set][P_NAV_RADIUS]      = get_Value(cb_13_3);
953
    ParameterSet[Set][P_NAV_RADIUS]     = get_Value(cb_13_3);
1036
    ParameterSet[Set][P_NAV_ANGLE_LIMIT] = get_Value(cb_13_4);
Line 954... Line 1037...
954
}
1037
}
955
 
1038
 
956
void MKTool::slot_SaveParameter() // DONE 0.71g
1039
void MKTool::slot_SaveParameter() // DONE 0.71g
Line 1206... Line 1289...
1206
 
1289
 
1207
        show_ParameterSet(Set);
1290
        show_ParameterSet(Set);
1208
    }
1291
    }
Line 1209... Line 1292...
1209
}
1292
}
1210
 
1293
 
1211
void MKTool::show_ParameterSet(int Set) // DONE 0.71g
1294
void MKTool::show_ParameterSet(int Set) // DONE 0.71h
1212
{
1295
{
1213
    char Name[12];
1296
    char Name[12];
1214
    for (int a = 0; a < 12; a++)
1297
    for (int a = 0; a < 12; a++)
Line 1374... Line 1457...
1374
    // Seite 13
1457
    // Seite 13
1375
{
1458
{
1376
    cb_13_1 = setCombo(cb_13_1, Set, P_NAV_WIND_CORR);
1459
    cb_13_1 = setCombo(cb_13_1, Set, P_NAV_WIND_CORR);
1377
    cb_13_2 = setCombo(cb_13_2, Set, P_NAV_SPEED_COMP);
1460
    cb_13_2 = setCombo(cb_13_2, Set, P_NAV_SPEED_COMP);
1378
    cb_13_3 = setCombo(cb_13_3, Set, P_NAV_RADIUS);
1461
    cb_13_3 = setCombo(cb_13_3, Set, P_NAV_RADIUS);
-
 
1462
    cb_13_4 = setCombo(cb_13_4, Set, P_NAV_ANGLE_LIMIT);
1379
}
1463
}
Line 1380... Line 1464...
1380
 
1464
 
Line 1477... Line 1561...
1477
    Settings->GUI.TabViews.setBit(5, ac_View5->isChecked());
1561
    Settings->GUI.TabViews.setBit(5, ac_View5->isChecked());
Line 1478... Line 1562...
1478
 
1562
 
1479
    Settings->GUI.Term_Info   = cb_ShowMSG->isChecked();
1563
    Settings->GUI.Term_Info   = cb_ShowMSG->isChecked();
1480
    Settings->GUI.Term_Data   = cb_ShowData->isChecked();
1564
    Settings->GUI.Term_Data   = cb_ShowData->isChecked();
-
 
1565
    Settings->GUI.Term_Always = cb_ShowAlways->isChecked();
Line 1481... Line 1566...
1481
    Settings->GUI.Term_Always = cb_ShowAlways->isChecked();
1566
    Settings->GUI.Term_Send   = cb_ShowSend->isChecked();
Line 1482... Line 1567...
1482
 
1567
 
Line 1664... Line 1749...
1664
                            Settings->Analog1.Label[Position] = ToolBox::Data2QString(RX.Decode,1,17).trimmed();
1749
                            Settings->Analog1.Label[Position] = ToolBox::Data2QString(RX.Decode,1,17).trimmed();
1665
                            Position ++;
1750
                            Position ++;
1666
                            TX_Data[0] = Position;
1751
                            TX_Data[0] = Position;
1667
                            send_Data('a', ADDRESS_ALL, TX_Data, 1, false);
1752
                            send_Data('a', ADDRESS_ALL, TX_Data, 1, false);
1668
                        }
1753
                        }
1669
                        if (Position == 32)
1754
                        if (Position == 31)
1670
                        {
1755
                        {
1671
                            for (int a = 0; a < MaxAnalog; a++)
1756
                            for (int a = 0; a < MaxAnalog; a++)
1672
                            {
1757
                            {
1673
                                lb_Analog[a]->setText(Settings->Analog1.Label[a]);
1758
                                lb_Analog[a]->setText(Settings->Analog1.Label[a]);
1674
                            }
1759
                            }
Line 1739... Line 1824...
1739
                            AllowSend = false;
1824
                            AllowSend = false;
1740
                            QMessageBox::warning(this, QA_NAME,
1825
                            QMessageBox::warning(this, QA_NAME,
1741
                               "Serielles Protokoll Inkompatibel. \nBitte neue Programmversion installieren,", QMessageBox::Ok);
1826
                               "Serielles Protokoll Inkompatibel. \nBitte neue Programmversion installieren,", QMessageBox::Ok);
1742
                    }
1827
                    }
Line 1743... Line 1828...
1743
 
1828
 
1744
                    TX_Data[0] = 50;
1829
                    TX_Data[0] = Settings->Data.Debug_Slow / 10;
Line 1745... Line 1830...
1745
                    send_Data('d', ADDRESS_ALL, TX_Data, 1, false);
1830
                    send_Data('d', ADDRESS_ALL, TX_Data, 1, false);
1746
 
1831
 
1747
                    if (Mode.ID == ADDRESS_FC)
1832
                    if (Mode.ID == ADDRESS_FC)
Line 1764... Line 1849...
1764
                    Settings->read_Settings_Analog(HardwareID);
1849
                    Settings->read_Settings_Analog(HardwareID);
1765
                    Settings->read_Settings_AnalogLabels(HardwareID);
1850
                    Settings->read_Settings_AnalogLabels(HardwareID);
Line 1766... Line 1851...
1766
 
1851
 
1767
                    if (Settings->Analog1.Version != Mode.Version)
1852
                    if (Settings->Analog1.Version != Mode.Version)
-
 
1853
                    {
1768
                    {
1854
                        lb_Status->setText("Analoglabel-Version unterschiedlich. Lese Analoglabels neu aus.");
1769
                        slot_ac_GetLabels();
1855
                        slot_ac_GetLabels();
1770
                    }
1856
                    }
1771
                    else
1857
                    else
1772
                    for (int a = 0; a < MaxAnalog; a++)
1858
                    for (int a = 0; a < MaxAnalog; a++)
Line 1801... Line 1887...
1801
                new_RXData(RxData);
1887
                new_RXData(RxData);
Line 1802... Line 1888...
1802
 
1888
 
1803
                if ((cb_ShowData->isChecked()) && ((tab_Main->currentWidget()->objectName() == QString("Tab_3")) || (cb_ShowAlways->isChecked())))
1889
                if ((cb_ShowData->isChecked()) && ((tab_Main->currentWidget()->objectName() == QString("Tab_3")) || (cb_ShowAlways->isChecked())))
1804
                {
1890
                {
1805
                    te_RX->moveCursor(QTextCursor::End,  QTextCursor::MoveAnchor);
1891
                    te_RX->moveCursor(QTextCursor::End,  QTextCursor::MoveAnchor);
-
 
1892
//                    te_RX->insertPlainText(" > " + RxData.String + '\r');
1806
                    te_RX->insertPlainText(RxData.String + '\r');
1893
                    te_RX->insertHtml("<span style=\"color:#00008b;\">" + RxData.String + "<br /></span>");
1807
                }
1894
                }
1808
            }
1895
            }
1809
            else
1896
            else
1810
            {
1897
            {
1811
                if ((cb_ShowMSG->isChecked()) && ((tab_Main->currentWidget()->objectName() == QString("Tab_3")) || (cb_ShowAlways->isChecked())))
1898
                if ((cb_ShowMSG->isChecked()) && ((tab_Main->currentWidget()->objectName() == QString("Tab_3")) || (cb_ShowAlways->isChecked())))
1812
                {
1899
                {
1813
                    te_RX->moveCursor(QTextCursor::End,  QTextCursor::MoveAnchor);
1900
                    te_RX->moveCursor(QTextCursor::End,  QTextCursor::MoveAnchor);
-
 
1901
//                    te_RX->insertPlainText(" > " + RxData.String + '\r');
1814
                    te_RX->insertPlainText(RxData.String + '\r');
1902
                    te_RX->insertHtml("<span style=\"color:#008b00;\">" + RxData.String + "<br /></span>");
1815
                }
1903
                }
1816
            }
1904
            }
1817
            RxData.String = QString("");
1905
            RxData.String = QString("");
1818
        }
1906
        }
Line 1893... Line 1981...
1893
            TickerEvent[0] = true;
1981
            TickerEvent[0] = true;
1894
        }
1982
        }
Line 1895... Line 1983...
1895
 
1983
 
1896
        QByteArray Temp(TX_Data.toUtf8());
1984
        QByteArray Temp(TX_Data.toUtf8());
-
 
1985
        serialPort->sendData(Temp);
-
 
1986
 
-
 
1987
        if (cb_ShowSend->isChecked())
-
 
1988
        {
-
 
1989
            te_RX->moveCursor(QTextCursor::End,  QTextCursor::MoveAnchor);
-
 
1990
            te_RX->insertHtml("<span style='color:#8b0000;'>" + TX_Data + "<br /></span>");
1897
        serialPort->sendData(Temp);
1991
        }
1898
    }
1992
    }
Line 1899... Line 1993...
1899
}
1993
}
1900
 
1994
 
Line 1901... Line 1995...
1901
 
1995
 
1902
// Programm beenden
1996
// Programm beenden
1903
///////////////////
1997
///////////////////
1904
 
1998
 
1905
MKTool::~MKTool()
1999
MKTool::~MKTool()
1906
{
2000
{
1907
    qDebug(" Programm Ende ..!! ");
2001
//    qDebug(" Programm Ende ..!! ");