Rev 481 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 481 | Rev 525 | ||
---|---|---|---|
Line 77... | Line 77... | ||
77 | tab_Main->insertTab ( 2, f_Settings, ac_View2->icon(), tr("FC-Settings")); |
77 | tab_Main->insertTab ( 2, f_Settings, ac_View2->icon(), tr("FC-Settings")); |
78 | tab_Main->widget(2)->setObjectName("Tab_2"); |
78 | tab_Main->widget(2)->setObjectName("Tab_2"); |
Line 79... | Line 79... | ||
79 | 79 | ||
80 | // Zusätzliche Widgets in die Toolbar. |
80 | // Zusätzliche Widgets in die Toolbar. |
- | 81 | tb_TTY->addWidget(lb_Port); |
|
81 | tb_TTY->addWidget(lb_Port); |
82 | tb_TTY->addWidget(cb_Port); |
Line 82... | Line 83... | ||
82 | tb_TTY->addWidget(le_Port); |
83 | // tb_TTY->addWidget(le_Port); |
83 | 84 | ||
84 | tb_Hardware->addWidget(rb_SelFC); |
85 | tb_Hardware->addWidget(rb_SelFC); |
Line 140... | Line 141... | ||
140 | ac_View3->setChecked(Settings->GUI.TabViews[3]); |
141 | ac_View3->setChecked(Settings->GUI.TabViews[3]); |
141 | ac_View4->setChecked(Settings->GUI.TabViews[4]); |
142 | ac_View4->setChecked(Settings->GUI.TabViews[4]); |
142 | ac_View5->setChecked(Settings->GUI.TabViews[5]); |
143 | ac_View5->setChecked(Settings->GUI.TabViews[5]); |
143 | ac_View6->setChecked(Settings->GUI.TabViews[6]); |
144 | ac_View6->setChecked(Settings->GUI.TabViews[6]); |
Line 144... | Line 145... | ||
144 | 145 | ||
- | 146 | // le_Port->setText(Settings->TTY.Port); |
|
- | 147 | ||
- | 148 | for(int z = 0; z < Settings->TTY.MaxPorts; z++) |
|
- | 149 | { |
|
- | 150 | cb_Port->addItem(Settings->TTY.Ports[z]); |
|
- | 151 | } |
|
- | 152 | ||
Line 145... | Line 153... | ||
145 | le_Port->setText(Settings->TTY.Port); |
153 | cb_Port->setCurrentIndex(Settings->TTY.PortID); |
146 | 154 | ||
147 | cb_ShowMSG->setChecked(Settings->GUI.Term_Info); |
155 | cb_ShowMSG->setChecked(Settings->GUI.Term_Info); |
148 | cb_ShowData->setChecked(Settings->GUI.Term_Data); |
156 | cb_ShowData->setChecked(Settings->GUI.Term_Data); |
Line 228... | Line 236... | ||
228 | } |
236 | } |
229 | } |
237 | } |
Line 230... | Line 238... | ||
230 | 238 | ||
231 | void MKTool::init_Connections() |
239 | void MKTool::init_Connections() |
232 | { |
240 | { |
233 | connect(Dec, SIGNAL(clicked()), this, SLOT(slot_Test())); |
- | |
234 | - | ||
235 | // Waypoints übergeben |
- | |
236 | connect(f_Map, SIGNAL(set_Target(sWayPoint)), this , SLOT(slot_MAP_SetTarget(sWayPoint))); |
- | |
Line 237... | Line 241... | ||
237 | connect(f_Map, SIGNAL(set_WayPoints(QList<sWayPoint>)), this , SLOT(slot_MAP_SetWayPoints(QList<sWayPoint>))); |
241 | // connect(Dec, SIGNAL(clicked()), this, SLOT(slot_Test())); |
238 | 242 | ||
239 | // Daten Senden / Empfangen |
243 | // Daten Senden / Empfangen |
Line 537... | Line 541... | ||
537 | { |
541 | { |
538 | if (TickerDiv) |
542 | if (TickerDiv) |
539 | TickerDiv = false; |
543 | TickerDiv = false; |
540 | else |
544 | else |
541 | TickerDiv = true; |
545 | TickerDiv = true; |
542 | /* |
- | |
543 | if (cb_ClipBoard->isChecked()) |
- | |
544 | { |
- | |
545 | QString s_OLD = te_KML->toPlainText(); |
- | |
546 | te_KML->clear(); |
- | |
547 | te_KML->paste(); |
- | |
548 | if (s_OLD != te_KML->toPlainText()) |
- | |
549 | { |
- | |
550 | parse_TargetKML(); |
- | |
551 | } |
- | |
552 | } |
- | |
553 | */ |
- | |
554 | for (int a = 0; a < MaxTickerEvents; a++) |
546 | for (int a = 0; a < MaxTickerEvents; a++) |
555 | { |
547 | { |
556 | if (TickerEvent[a] == true) |
548 | if (TickerEvent[a] == true) |
557 | { |
549 | { |
558 | switch(a) |
550 | switch(a) |
Line 568... | Line 560... | ||
568 | case 2 : |
560 | case 2 : |
569 | if (f_LCD->cb_LCD->isChecked()) |
561 | if (f_LCD->cb_LCD->isChecked()) |
570 | { |
562 | { |
571 | if (!f_LCD->isVisible()) |
563 | if (!f_LCD->isVisible()) |
572 | { |
564 | { |
573 | Ticker->setInterval(2000); |
565 | Ticker->setInterval(TICKER); |
574 | TickerEvent[2] = false; |
566 | TickerEvent[2] = false; |
575 | } |
567 | } |
576 | TX_Data[0] = LCD_Page; |
568 | TX_Data[0] = LCD_Page; |
577 | TX_Data[1] = 0; |
569 | TX_Data[1] = 0; |
578 | o_Connection->send_Cmd('l', ADDRESS_ALL, TX_Data, 1, true); |
570 | o_Connection->send_Cmd('l', ADDRESS_ALL, TX_Data, 1, true); |
Line 699... | Line 691... | ||
699 | Motor.Speed[z] = 0; |
691 | Motor.Speed[z] = 0; |
700 | } |
692 | } |
Line 701... | Line 693... | ||
701 | 693 | ||
Line 702... | Line 694... | ||
702 | slot_Motortest(Motor); |
694 | slot_Motortest(Motor); |
703 | 695 | ||
704 | Ticker->setInterval(2000); |
696 | Ticker->setInterval(TICKER); |
Line 705... | Line 697... | ||
705 | TickerEvent[4] = false; |
697 | TickerEvent[4] = false; |
706 | } |
698 | } |
Line 752... | Line 744... | ||
752 | // Map-Fenster anzeigen |
744 | // Map-Fenster anzeigen |
753 | void MKTool::slot_ac_Map() |
745 | void MKTool::slot_ac_Map() |
754 | { |
746 | { |
755 | if (!f_Map->isVisible()) |
747 | if (!f_Map->isVisible()) |
756 | { |
748 | { |
- | 749 | ||
- | 750 | // Waypoints übergeben |
|
- | 751 | connect(f_Map, SIGNAL(set_Target(sWayPoint)), this , SLOT(slot_MAP_SetTarget(sWayPoint))); |
|
- | 752 | connect(f_Map, SIGNAL(set_WayPoints(QList<sWayPoint>)), this , SLOT(slot_MAP_SetWayPoints(QList<sWayPoint>))); |
|
- | 753 | ||
757 | f_Map->show(); |
754 | f_Map->show(); |
758 | } |
755 | } |
759 | } |
756 | } |
Line 760... | Line 757... | ||
760 | 757 | ||
Line 877... | Line 874... | ||
877 | 874 | ||
878 | void MKTool::slot_ac_Preferences() |
875 | void MKTool::slot_ac_Preferences() |
879 | { |
876 | { |
Line 880... | Line 877... | ||
880 | dlg_Preferences *f_Preferences = new dlg_Preferences(this); |
877 | dlg_Preferences *f_Preferences = new dlg_Preferences(this); |
- | 878 | ||
- | 879 | // Settings->TTY.Port = le_Port->text(); |
|
881 | 880 | Settings->TTY.Port = cb_Port->itemText(cb_Port->currentIndex()); |
|
Line 882... | Line 881... | ||
882 | Settings->TTY.Port = le_Port->text(); |
881 | |
883 | f_Preferences->set_Settings(Settings); |
882 | f_Preferences->set_Settings(Settings); |
884 | 883 | ||
885 | if (f_Preferences->exec()==QDialog::Accepted) |
884 | if (f_Preferences->exec()==QDialog::Accepted) |
886 | { |
885 | { |
887 | Settings = f_Preferences->get_Settings(); |
886 | Settings = f_Preferences->get_Settings(); |
888 | Settings->write_Settings(); |
887 | Settings->write_Settings(); |
889 | le_Port->setText(Settings->TTY.Port); |
888 | cb_Port->addItem(Settings->TTY.Port); |
Line 890... | Line 889... | ||
890 | config_Plot(); |
889 | config_Plot(); |
Line 1132... | Line 1131... | ||
1132 | Hardware = "BL-Ctrl"; |
1131 | Hardware = "BL-Ctrl"; |
1133 | } |
1132 | } |
Line 1134... | Line 1133... | ||
1134 | 1133 | ||
1135 | QString Message = trUtf8("Firmeware-Datei \n\n"); |
1134 | QString Message = trUtf8("Firmeware-Datei \n\n"); |
1136 | Message = Message + le_HexFile->text() + "\n\n"; |
1135 | Message = Message + le_HexFile->text() + "\n\n"; |
Line 1137... | Line 1136... | ||
1137 | Message = Message + trUtf8("an ") + Hardware + trUtf8(" mit AVRDUDE - Seriel & Bootloader über ") + le_Port->text() + trUtf8(" übertragen?\n"); |
1136 | Message = Message + trUtf8("an ") + Hardware + trUtf8(" mit AVRDUDE - Seriel & Bootloader über ") + cb_Port->currentText() + trUtf8(" übertragen?\n"); |
1138 | 1137 | ||
1139 | if (le_HexFile->text() == "") |
1138 | if (le_HexFile->text() == "") |
1140 | { |
1139 | { |
Line 1152... | Line 1151... | ||
1152 | { |
1151 | { |
1153 | slot_OpenPort(); |
1152 | slot_OpenPort(); |
1154 | } |
1153 | } |
Line 1155... | Line 1154... | ||
1155 | 1154 | ||
1156 | Argumente << "-P"; |
1155 | Argumente << "-P"; |
1157 | Argumente << le_Port->text(); |
1156 | Argumente << cb_Port->currentText(); |
1158 | Argumente << "-p"; |
1157 | Argumente << "-p"; |
1159 | Argumente << Device; |
1158 | Argumente << Device; |
1160 | Argumente << "-c"; |
1159 | Argumente << "-c"; |
1161 | Argumente << "butterfly"; |
1160 | Argumente << "butterfly"; |
Line 1213... | Line 1212... | ||
1213 | Ticker->setInterval(500); |
1212 | Ticker->setInterval(500); |
1214 | TickerEvent[1] = true; |
1213 | TickerEvent[1] = true; |
1215 | } |
1214 | } |
1216 | else |
1215 | else |
1217 | { |
1216 | { |
1218 | Ticker->setInterval(2000); |
1217 | Ticker->setInterval(TICKER); |
1219 | TickerEvent[1] = false; |
1218 | TickerEvent[1] = false; |
1220 | } |
1219 | } |
1221 | } |
1220 | } |
1222 | } |
1221 | } |
Line 1287... | Line 1286... | ||
1287 | Settings->GUI.Term_Send = cb_ShowSend->isChecked(); |
1286 | Settings->GUI.Term_Send = cb_ShowSend->isChecked(); |
1288 | Settings->GUI.isMax = isMaximized(); |
1287 | Settings->GUI.isMax = isMaximized(); |
1289 | Settings->GUI.Size = size(); |
1288 | Settings->GUI.Size = size(); |
1290 | Settings->GUI.Point = pos(); |
1289 | Settings->GUI.Point = pos(); |
Line 1291... | Line 1290... | ||
1291 | 1290 | ||
- | 1291 | // Settings->TTY.Port = le_Port->text(); |
|
- | 1292 | Settings->TTY.Port = cb_Port->currentText(); |
|
- | 1293 | Settings->TTY.MaxPorts = cb_Port->count(); |
|
- | 1294 | Settings->TTY.PortID = cb_Port->currentIndex(); |
|
- | 1295 | ||
- | 1296 | for (int z = 0; z < cb_Port->count(); z++) |
|
- | 1297 | { |
|
- | 1298 | if (z < 10) |
|
- | 1299 | { |
|
- | 1300 | Settings->TTY.Ports[z] = cb_Port->itemText(z); |
|
- | 1301 | } |
|
1292 | Settings->TTY.Port = le_Port->text(); |
1302 | } |
Line 1293... | Line 1303... | ||
1293 | } |
1303 | } |
1294 | 1304 | ||
1295 | void MKTool::show_DebugData() |
1305 | void MKTool::show_DebugData() |
Line 1309... | Line 1319... | ||
1309 | 1319 | ||
1310 | if ((tab_Main->currentWidget()->objectName() == QString("Tab_1"))) |
1320 | if ((tab_Main->currentWidget()->objectName() == QString("Tab_1"))) |
1311 | update_Plot(); |
1321 | update_Plot(); |
Line -... | Line 1322... | ||
- | 1322 | } |
|
- | 1323 | ||
1312 | } |
1324 | if (tab_Main->currentWidget()->objectName() == QString("Tab_0")) |
1313 | 1325 | { |
|
1314 | le_A_0->setText(QString("%1").arg(AnalogData[0])); |
1326 | le_A_0->setText(QString("%1").arg(AnalogData[0])); |
1315 | le_A_1->setText(QString("%1").arg(AnalogData[1])); |
1327 | le_A_1->setText(QString("%1").arg(AnalogData[1])); |
1316 | le_A_2->setText(QString("%1").arg(AnalogData[2])); |
1328 | le_A_2->setText(QString("%1").arg(AnalogData[2])); |
1317 | le_A_3->setText(QString("%1").arg(AnalogData[3])); |
1329 | le_A_3->setText(QString("%1").arg(AnalogData[3])); |
1318 | le_A_4->setText(QString("%1").arg(AnalogData[4])); |
1330 | le_A_4->setText(QString("%1").arg(AnalogData[4])); |
1319 | le_A_5->setText(QString("%1").arg(AnalogData[5])); |
1331 | le_A_5->setText(QString("%1").arg(AnalogData[5])); |
1320 | le_A_6->setText(QString("%1").arg(AnalogData[6])); |
1332 | le_A_6->setText(QString("%1").arg(AnalogData[6])); |
1321 | le_A_7->setText(QString("%1").arg(AnalogData[7])); |
1333 | le_A_7->setText(QString("%1").arg(AnalogData[7])); |
1322 | le_A_8->setText(QString("%1").arg(AnalogData[8])); |
1334 | le_A_8->setText(QString("%1").arg(AnalogData[8])); |
1323 | le_A_9->setText(QString("%1").arg(AnalogData[9])); |
1335 | le_A_9->setText(QString("%1").arg(AnalogData[9])); |
1324 | le_A_10->setText(QString("%1").arg(AnalogData[10])); |
1336 | le_A_10->setText(QString("%1").arg(AnalogData[10])); |
1325 | le_A_11->setText(QString("%1").arg(AnalogData[11])); |
1337 | le_A_11->setText(QString("%1").arg(AnalogData[11])); |
1326 | le_A_12->setText(QString("%1").arg(AnalogData[12])); |
1338 | le_A_12->setText(QString("%1").arg(AnalogData[12])); |
1327 | le_A_13->setText(QString("%1").arg(AnalogData[13])); |
1339 | le_A_13->setText(QString("%1").arg(AnalogData[13])); |
1328 | le_A_14->setText(QString("%1").arg(AnalogData[14])); |
1340 | le_A_14->setText(QString("%1").arg(AnalogData[14])); |
1329 | le_A_15->setText(QString("%1").arg(AnalogData[15])); |
1341 | le_A_15->setText(QString("%1").arg(AnalogData[15])); |
1330 | le_A_16->setText(QString("%1").arg(AnalogData[16])); |
1342 | le_A_16->setText(QString("%1").arg(AnalogData[16])); |
1331 | le_A_17->setText(QString("%1").arg(AnalogData[17])); |
1343 | le_A_17->setText(QString("%1").arg(AnalogData[17])); |
1332 | le_A_18->setText(QString("%1").arg(AnalogData[18])); |
1344 | le_A_18->setText(QString("%1").arg(AnalogData[18])); |
1333 | le_A_19->setText(QString("%1").arg(AnalogData[19])); |
1345 | le_A_19->setText(QString("%1").arg(AnalogData[19])); |
1334 | le_A_20->setText(QString("%1").arg(AnalogData[20])); |
1346 | le_A_20->setText(QString("%1").arg(AnalogData[20])); |
1335 | le_A_21->setText(QString("%1").arg(AnalogData[21])); |
1347 | le_A_21->setText(QString("%1").arg(AnalogData[21])); |
1336 | le_A_22->setText(QString("%1").arg(AnalogData[22])); |
1348 | le_A_22->setText(QString("%1").arg(AnalogData[22])); |
1337 | le_A_23->setText(QString("%1").arg(AnalogData[23])); |
1349 | le_A_23->setText(QString("%1").arg(AnalogData[23])); |
1338 | le_A_24->setText(QString("%1").arg(AnalogData[24])); |
1350 | le_A_24->setText(QString("%1").arg(AnalogData[24])); |
1339 | le_A_25->setText(QString("%1").arg(AnalogData[25])); |
1351 | le_A_25->setText(QString("%1").arg(AnalogData[25])); |
1340 | le_A_26->setText(QString("%1").arg(AnalogData[26])); |
1352 | le_A_26->setText(QString("%1").arg(AnalogData[26])); |
1341 | le_A_27->setText(QString("%1").arg(AnalogData[27])); |
1353 | le_A_27->setText(QString("%1").arg(AnalogData[27])); |
1342 | le_A_28->setText(QString("%1").arg(AnalogData[28])); |
1354 | le_A_28->setText(QString("%1").arg(AnalogData[28])); |
1343 | le_A_29->setText(QString("%1").arg(AnalogData[29])); |
1355 | le_A_29->setText(QString("%1").arg(AnalogData[29])); |
- | 1356 | le_A_30->setText(QString("%1").arg(AnalogData[30])); |
|
Line 1344... | Line 1357... | ||
1344 | le_A_30->setText(QString("%1").arg(AnalogData[30])); |
1357 | le_A_31->setText(QString("%1").arg(AnalogData[31])); |
1345 | le_A_31->setText(QString("%1").arg(AnalogData[31])); |
1358 | } |
1346 | 1359 | ||
1347 | if ((Mode.ID == ADDRESS_FC) && (FCSettings[P_GYRO_ACC_FAKTOR] > 0)) |
1360 | if ((Mode.ID == ADDRESS_FC) && (FCSettings[P_GYRO_ACC_FAKTOR] > 0) && (tab_Main->currentWidget()->objectName() == QString("Tab_4"))) |
Line 1348... | Line 1361... | ||
1348 | { |
1361 | { |
Line 1367... | Line 1380... | ||
1367 | 1380 | ||
1368 | void MKTool::new_NaviData(sRxData RX) |
1381 | void MKTool::new_NaviData(sRxData RX) |
1369 | { |
1382 | { |
Line 1370... | Line 1383... | ||
1370 | // qDebug("Navi-Data"); |
1383 | // qDebug("Navi-Data"); |
1371 | 1384 | ||
- | 1385 | if (tab_Main->currentWidget()->objectName() == QString("Tab_4")) |
|
- | 1386 | { |
|
1372 | switch(RX.Decode[N_NC_FLAGS]) |
1387 | switch(RX.Decode[N_NC_FLAGS]) |
1373 | { |
1388 | { |
1374 | case 0x01 : lb_Mode->setText(tr("Free")); break; |
1389 | case 0x01 : lb_Mode->setText(tr("Free")); break; |
1375 | case 0x02 : lb_Mode->setText(tr("Position Hold")); break; |
1390 | case 0x02 : lb_Mode->setText(tr("Position Hold")); break; |
1376 | case 0x04 : lb_Mode->setText(tr("Coming Home")); break; |
1391 | case 0x04 : lb_Mode->setText(tr("Coming Home")); break; |
1377 | case 0x08 : lb_Mode->setText(tr("Range Limit")); break; |
1392 | case 0x08 : lb_Mode->setText(tr("Range Limit")); break; |
1378 | case 0x10 : lb_Mode->setText(tr("Serial Error")); break; |
1393 | case 0x10 : lb_Mode->setText(tr("Serial Error")); break; |
1379 | case 0x20 : lb_Mode->setText(tr("Target reached")); break; |
1394 | case 0x20 : lb_Mode->setText(tr("Target reached")); break; |
Line 1380... | Line -... | ||
1380 | case 0x40 : lb_Mode->setText(tr("Manual Control")); break; |
- | |
1381 | } |
1395 | case 0x40 : lb_Mode->setText(tr("Manual Control")); break; |
1382 | 1396 | } |
|
1383 | Navi.Current.Longitude = ToolBox::Data2Long(RX.Decode, N_CUR_LONGITUDE, true); |
1397 | |
1384 | Navi.Current.Latitude = ToolBox::Data2Long(RX.Decode, N_CUR_LATITUDE, true); |
- | |
1385 | Navi.Current.Altitude = ToolBox::Data2Long(RX.Decode, N_CUR_ALTITUDE, true); |
1398 | le_CDistance->setText(QString("%1 cm").arg(ToolBox::Data2Int(RX.Decode, N_HOME_DISTANCE))); |
Line 1386... | Line 1399... | ||
1386 | Navi.Target.Longitude = ToolBox::Data2Long(RX.Decode, N_TAR_LONGITUDE, true); |
1399 | le_CWPA->setText(QString("%1").arg(RX.Decode[N_WP_INDEX])); |
1387 | Navi.Target.Latitude = ToolBox::Data2Long(RX.Decode, N_TAR_LATITUDE, true); |
- | |
1388 | Navi.Target.Altitude = ToolBox::Data2Long(RX.Decode, N_TAR_ALTITUDE, true); |
- | |
1389 | - | ||
Line 1390... | Line 1400... | ||
1390 | le_CDistance->setText(QString("%1 cm").arg(ToolBox::Data2Int(RX.Decode, N_HOME_DISTANCE))); |
1400 | le_CWPT->setText(QString("%1").arg(RX.Decode[N_WP_NUMBER])); |
Line 1391... | Line 1401... | ||
1391 | le_CWPA->setText(QString("%1").arg(RX.Decode[N_WP_INDEX])); |
1401 | le_CSats->setText(QString("%1").arg(RX.Decode[N_SATS_IN_USER])); |
Line 1392... | Line 1402... | ||
1392 | le_CWPT->setText(QString("%1").arg(RX.Decode[N_WP_NUMBER])); |
1402 | |
Line 1393... | Line 1403... | ||
1393 | le_CSats->setText(QString("%1").arg(RX.Decode[N_SATS_IN_USER])); |
1403 | qwt_Rate->setValue(double(ToolBox::Data2Int(RX.Decode, N_VARIOMETER, true))); |
- | 1404 | ||
- | 1405 | le_CTime->setText(QString("%1 sec.").arg(ToolBox::Data2Int(RX.Decode, N_FLYING_TIME))); |
|
- | 1406 | ||
- | 1407 | bar_UBAT->setValue(RX.Decode[N_UBAT]); |
|
- | 1408 | ||
Line 1394... | Line 1409... | ||
1394 | 1409 | double Speed = double((ToolBox::Data2Int(RX.Decode, N_GROUND_SPEED)) / 10.0); |
|
1395 | qwt_Rate->setValue(double(ToolBox::Data2Int(RX.Decode, N_VARIOMETER, true))); |
1410 | |
1396 | 1411 | if ((Speed > 4.5) && SpeedMeter->property("END") == 5) |
|
1397 | le_CTime->setText(QString("%1 sec.").arg(ToolBox::Data2Int(RX.Decode, N_FLYING_TIME))); |
1412 | { |
1398 | 1413 | SpeedMeter->setRange(0.0, 10.0); |
|
1399 | bar_UBAT->setValue(RX.Decode[N_UBAT]); |
1414 | SpeedMeter->setScale(1, 2, 1); |
Line 1400... | Line -... | ||
1400 | - | ||
1401 | double Speed = double((ToolBox::Data2Int(RX.Decode, N_GROUND_SPEED)) / 10.0); |
- | |
1402 | - | ||
1403 | if ((Speed > 4.5) && SpeedMeter->property("END") == 5) |
1415 | SpeedMeter->setProperty("END", 10); |
1404 | { |
- | |
1405 | SpeedMeter->setRange(0.0, 10.0); |
- | |
Line 1406... | Line 1416... | ||
1406 | SpeedMeter->setScale(1, 2, 1); |
1416 | } |
Line 1407... | Line 1417... | ||
1407 | SpeedMeter->setProperty("END", 10); |
1417 | |
Line -... | Line 1418... | ||
- | 1418 | if ((Speed > 9) && SpeedMeter->property("END") == 10) |
|
1408 | } |
1419 | { |
Line -... | Line 1420... | ||
- | 1420 | SpeedMeter->setRange(0.0, 20.0); |
|
1409 | 1421 | SpeedMeter->setScale(1, 2, 2); |
|
- | 1422 | SpeedMeter->setProperty("END", 20); |
|
- | 1423 | } |
|
1410 | if ((Speed > 9) && SpeedMeter->property("END") == 10) |
1424 | |
Line 1411... | Line 1425... | ||
1411 | { |
1425 | SpeedMeter->setValue(Speed); |
1412 | SpeedMeter->setRange(0.0, 20.0); |
1426 | |
- | 1427 | Compass->setValue(ToolBox::Data2Int(RX.Decode, N_COMAPSS_HEADING)); //(68) |
|
Line -... | Line 1428... | ||
- | 1428 | ||
- | 1429 | bar_RX->setValue(RX.Decode[N_RC_QUALITY]); |
|
1413 | SpeedMeter->setScale(1, 2, 2); |
1430 | |
- | 1431 | int Nick = RX.Decode[N_ANGLE_NICK]; |
|
1414 | SpeedMeter->setProperty("END", 20); |
1432 | int Roll = RX.Decode[N_ANGLE_ROLL]; |
- | 1433 | ||
Line 1415... | Line -... | ||
1415 | } |
- | |
1416 | - | ||
Line 1417... | Line 1434... | ||
1417 | SpeedMeter->setValue(Speed); |
1434 | if (Roll > 128) |
Line 1418... | Line 1435... | ||
1418 | 1435 | Roll = Roll - 255; |
|
1419 | Compass->setValue(ToolBox::Data2Int(RX.Decode, N_COMAPSS_HEADING)); //(68) |
1436 | |
Line 1757... | Line 1774... | ||
1757 | } |
1774 | } |
1758 | } |
1775 | } |
1759 | break; |
1776 | break; |
1760 | case 3 : |
1777 | case 3 : |
1761 | { |
1778 | { |
1762 | if (cb_ShowSend->isChecked()) |
1779 | if ((cb_ShowSend->isChecked()) && ((tab_Main->currentWidget()->objectName() == QString("Tab_3")) || (cb_ShowAlways->isChecked()))) |
1763 | { |
1780 | { |
1764 | te_RX->moveCursor(QTextCursor::End, QTextCursor::MoveAnchor); |
1781 | te_RX->moveCursor(QTextCursor::End, QTextCursor::MoveAnchor); |
1765 | te_RX->insertHtml("<span style='color:#8b0000;'>" + Text + "<br /></span>"); |
1782 | te_RX->insertHtml("<span style='color:#8b0000;'>" + Text + "<br /></span>"); |
1766 | } |
1783 | } |
1767 | } |
1784 | } |
Line 1796... | Line 1813... | ||
1796 | } |
1813 | } |
Line 1797... | Line 1814... | ||
1797 | 1814 | ||
Line 1798... | Line 1815... | ||
1798 | o_Connection->Close(); |
1815 | o_Connection->Close(); |
1799 | 1816 | ||
Line 1800... | Line 1817... | ||
1800 | ac_ConnectTTY->setText(tr("Kopter Verbinden")); |
1817 | ac_ConnectTTY->setText(tr("Kopter Verbinden")); |
1801 | le_Port->setEnabled(true); |
1818 | cb_Port->setEnabled(true); |
1802 | 1819 | ||
1803 | Ticker->stop(); |
1820 | Ticker->stop(); |
1804 | } |
1821 | } |
1805 | else |
1822 | else |
1806 | { |
1823 | { |
1807 | int i_Type; |
1824 | int i_Type; |
1808 | if (le_Port->text().contains(QString("IP:"))) |
1825 | if (cb_Port->currentText().contains(QString("IP:"))) |
1809 | { |
1826 | { |
1810 | i_Type = C_IP; |
1827 | i_Type = C_IP; |
1811 | } |
1828 | } |
1812 | else |
1829 | else |
Line 1813... | Line 1830... | ||
1813 | { |
1830 | { |
1814 | i_Type = C_TTY; |
1831 | i_Type = C_TTY; |
1815 | } |
1832 | } |
1816 | 1833 | ||
Line 1817... | Line 1834... | ||
1817 | if (o_Connection->Open(i_Type, le_Port->text())) |
1834 | if (o_Connection->Open(i_Type, cb_Port->currentText())) |
Line 1818... | Line 1835... | ||
1818 | { |
1835 | { |
1819 | ac_ConnectTTY->setText(tr("Kopter Trennen")); |
1836 | ac_ConnectTTY->setText(tr("Kopter Trennen")); |
1820 | le_Port->setEnabled(false); |
1837 | cb_Port->setEnabled(false); |
1821 | 1838 | ||
Line 1822... | Line 1839... | ||
1822 | o_Connection->send_Cmd('v', ADDRESS_ALL, TX_Data, 0, true); |
1839 | o_Connection->send_Cmd('v', ADDRESS_ALL, TX_Data, 0, true); |