Subversion Repositories Projects

Rev

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

Rev 307 Rev 313
Line 722... Line 722...
722
 
722
 
723
void MKTool::slot_ac_Map()
723
void MKTool::slot_ac_Map()
724
{
724
{
725
    if (!f_Map->isVisible())
725
    if (!f_Map->isVisible())
726
    {
-
 
727
//        delete f_Map;
-
 
728
//        f_Map = new dlg_Map(this);
-
 
729
//        f_Map->create_Map(Settings);
-
 
730
 
726
    {
731
        f_Map->show();
727
        f_Map->show();
732
    }
728
    }
Line 733... Line 729...
733
}
729
}
Line 1138... Line 1134...
1138
    if (tab_Main->count() != 0)
1134
    if (tab_Main->count() != 0)
1139
    {
1135
    {
1140
        if ((tab_Main->currentWidget()->objectName() == QString("Tab_2")) && (f_Settings->listWidget->currentRow() == 1))
1136
        if ((tab_Main->currentWidget()->objectName() == QString("Tab_2")) && (f_Settings->listWidget->currentRow() == 1))
1141
        {
1137
        {
1142
            TX_Data[0] = 0;
1138
            TX_Data[0] = 0;
1143
            o_Connection->send_Cmd('p', ADDRESS_FC, TX_Data, 0, true);
1139
            o_Connection->send_Cmd('p', ADDRESS_FC, TX_Data, 0, false);
Line 1144... Line 1140...
1144
 
1140
 
1145
            Ticker->setInterval(500);
1141
            Ticker->setInterval(500);
1146
            TickerEvent[1] = true;
1142
            TickerEvent[1] = true;
1147
        }
1143
        }
Line 1180... Line 1176...
1180
void MKTool::slot_GetFCSettings() // DONE 0.71g
1176
void MKTool::slot_GetFCSettings() // DONE 0.71g
1181
{
1177
{
1182
    lb_Status->setText(tr("Lese FlightCtrl-Settings aus."));
1178
    lb_Status->setText(tr("Lese FlightCtrl-Settings aus."));
1183
    TX_Data[0] = f_Settings->sb_Set->value();
1179
    TX_Data[0] = f_Settings->sb_Set->value();
1184
    TX_Data[1] = 0;
1180
    TX_Data[1] = 0;
1185
    o_Connection->send_Cmd('q', ADDRESS_FC, TX_Data, 1);
1181
    o_Connection->send_Cmd('q', ADDRESS_FC, TX_Data, 1, true);
1186
}
1182
}
Line 1187... Line 1183...
1187
 
1183
 
1188
void MKTool::slot_SetFCSettings() // DONE 0.71g
1184
void MKTool::slot_SetFCSettings() // DONE 0.71g
1189
{
1185
{
Line 1190... Line 1186...
1190
    char *TX_Data2 = f_Settings->GetFCSettings();
1186
    char *TX_Data2 = f_Settings->GetFCSettings();
Line 1191... Line 1187...
1191
 
1187
 
1192
    lb_Status->setText(tr("Schreibe FlightCtrl-Settings."));
1188
    lb_Status->setText(tr("Schreibe FlightCtrl-Settings."));
Line 1193... Line 1189...
1193
 
1189
 
1194
    o_Connection->send_Cmd('s', ADDRESS_FC, TX_Data2, MaxParameter + 2, false);
1190
    o_Connection->send_Cmd('s', ADDRESS_FC, TX_Data2, MaxParameter + 2, true);
Line 1399... Line 1395...
1399
            {
1395
            {
1400
                // Motor-Mixer
1396
                // Motor-Mixer
1401
                case 'N' :
1397
                case 'N' :
1402
                    if (ToolBox::Decode64(RX))
1398
                    if (ToolBox::Decode64(RX))
1403
                    {
1399
                    {
-
 
1400
                        o_Connection->stop_ReSend();
-
 
1401
 
1404
                        if (RX.Decode[0] == VERSION_MIXER)
1402
                        if (RX.Decode[0] == VERSION_MIXER)
1405
                        {
1403
                        {
1406
                            f_MotorMixer->set_MotorConfig(RX);
1404
                            f_MotorMixer->set_MotorConfig(RX);
1407
                        }
1405
                        }
1408
                    }
1406
                    }
1409
                break;
1407
                break;
1410
                // Motor-Mixer Schreib-Bestätigung
1408
                // Motor-Mixer Schreib-Bestätigung
1411
                case 'M' :
1409
                case 'M' :
1412
                    if (ToolBox::Decode64(RX))
1410
                    if (ToolBox::Decode64(RX))
1413
                    {
1411
                    {
-
 
1412
                        o_Connection->stop_ReSend();
-
 
1413
 
1414
                        if (RX.Decode[0] == 1)
1414
                        if (RX.Decode[0] == 1)
1415
                        {
1415
                        {
1416
                            lb_Status->setText(tr("MotorMixer-Daten in FC geschrieben."));
1416
                            lb_Status->setText(tr("MotorMixer-Daten in FC geschrieben."));
1417
                        }
1417
                        }
1418
                    }
1418
                    }
Line 1434... Line 1434...
1434
                break;
1434
                break;
1435
                // Settings lesen
1435
                // Settings lesen
1436
                case 'Q' : // DONE 0.71g
1436
                case 'Q' : // DONE 0.71g
1437
                    if (ToolBox::Decode64(RX))
1437
                    if (ToolBox::Decode64(RX))
1438
                    {
1438
                    {
1439
                        TickerEvent[0] = false;
1439
                        o_Connection->stop_ReSend();
Line 1440... Line 1440...
1440
 
1440
 
1441
                        if (RX.Decode[1] == VERSION_SETTINGS)
1441
                        if (RX.Decode[1] == VERSION_SETTINGS)
1442
                        {
1442
                        {
1443
                            int Settings_ID = RX.Decode[0];
1443
                            int Settings_ID = RX.Decode[0];
1444
                            for (int a = 0; a < MaxParameter; a++)
1444
                            for (int a = 0; a < MaxParameter; a++)
1445
                            {
1445
                            {
1446
                                FCSettings[a] = RX.Decode[a + 2];
1446
                                FCSettings[a] = RX.Decode[a + 2];
1447
                            }
-
 
1448
                            //show_ParameterSet(Settings_ID);
1447
                            }
1449
                            f_Settings->show_FCSettings(Settings_ID, FCSettings);
1448
                            f_Settings->show_FCSettings(Settings_ID, FCSettings);
1450
                            f_Settings->pb_Read->setEnabled(true);
1449
                            f_Settings->pb_Read->setEnabled(true);
1451
                            f_Settings->pb_Write->setEnabled(true);
1450
                            f_Settings->pb_Write->setEnabled(true);
1452
                        }
1451
                        }
Line 1460... Line 1459...
1460
                        }
1459
                        }
1461
                    }
1460
                    }
1462
                break;
1461
                break;
1463
                // Settings geschrieben
1462
                // Settings geschrieben
1464
                case 'S' : // DONE 0.71g
1463
                case 'S' : // DONE 0.71g
1465
                    TickerEvent[0] = false;
1464
                    o_Connection->stop_ReSend();
1466
                break;
1465
                break;
1467
            }
1466
            }
Line 1468... Line 1467...
1468
 
1467
 
1469
        case ADDRESS_NC :
1468
        case ADDRESS_NC :
Line 1484... Line 1483...
1484
            {
1483
            {
1485
                // LCD-Anzeige
1484
                // LCD-Anzeige
1486
                case 'L' : // DONE 0.71g
1485
                case 'L' : // DONE 0.71g
1487
                    if (ToolBox::Decode64(RX))
1486
                    if (ToolBox::Decode64(RX))
1488
                    {
1487
                    {
-
 
1488
                        o_Connection->stop_ReSend();
-
 
1489
 
1489
                        int LCD[150];
1490
                        int LCD[150];
1490
                        memcpy(LCD,RX.Decode, sizeof(RX.Decode));
1491
                        memcpy(LCD,RX.Decode, sizeof(RX.Decode));
Line 1491... Line 1492...
1491
 
1492
 
Line 1492... Line 1493...
1492
                        f_LCD->show_Data(LCD);
1493
                        f_LCD->show_Data(LCD);
1493
 
1494
 
1494
                        LCD_Page     = RX.Decode[0];
-
 
1495
                        LCD_MAX_Page = RX.Decode[1];
-
 
1496
 
1495
                        LCD_Page     = RX.Decode[0];
1497
                        TickerEvent[0] = false;
1496
                        LCD_MAX_Page = RX.Decode[1];
1498
                    }
1497
                    }
1499
                break;
1498
                break;
1500
                // Analoglabels
1499
                // Analoglabels
1501
                case 'A' : // DONE 0.71g
1500
                case 'A' : // DONE 0.71g
-
 
1501
                    if (ToolBox::Decode64(RX))
-
 
1502
                    {
1502
                    if (ToolBox::Decode64(RX))
1503
                        o_Connection->stop_ReSend();
1503
                    {
1504
 
1504
                        int Position = RX.Decode[0];
1505
                        int Position = RX.Decode[0];
1505
                        if (Position != 31)
1506
                        if (Position != 31)
1506
                        {
1507
                        {
Line 1538... Line 1539...
1538
                break;
1539
                break;
1539
                // Version
1540
                // Version
1540
                case 'V' : // DONE 0.71h
1541
                case 'V' : // DONE 0.71h
1541
                    if (ToolBox::Decode64(RX))
1542
                    if (ToolBox::Decode64(RX))
1542
                    {
1543
                    {
1543
                        TickerEvent[0] = false;
1544
                        o_Connection->stop_ReSend();
Line 1544... Line 1545...
1544
 
1545
 
1545
                        Mode.ID            = HardwareID;
1546
                        Mode.ID            = HardwareID;
1546
                        Mode.VERSION_MAJOR = RX.Decode[0];
1547
                        Mode.VERSION_MAJOR = RX.Decode[0];
1547
                        Mode.VERSION_MINOR = RX.Decode[1];
1548
                        Mode.VERSION_MINOR = RX.Decode[1];