Rev 441 | Rev 449 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 441 | Rev 442 | ||
---|---|---|---|
Line 208... | Line 208... | ||
208 | 208 | ||
209 | // QTimer-Instanzen |
209 | // QTimer-Instanzen |
210 | //FIXME: Move Ticker to libMK/QTCommunication.cpp |
210 | //FIXME: Move Ticker to libMK/QTCommunication.cpp |
Line 211... | Line -... | ||
211 | //Ticker = new QTimer(this); |
- | |
212 | - | ||
213 | // Verbindungsobject |
- | |
214 | //o_Connection = new cConnection(); |
211 | //Ticker = new QTimer(this); |
215 | 212 | ||
Line 216... | Line 213... | ||
216 | // Logger |
213 | // Logger |
217 | logger = new Logger(Settings, data); |
214 | logger = new Logger(Settings, data); |
Line 443... | Line 440... | ||
443 | list = Tmp.split("<coordinates>"); |
440 | list = Tmp.split("<coordinates>"); |
444 | list = list[1].split(","); |
441 | list = list[1].split(","); |
Line 445... | Line 442... | ||
445 | 442 | ||
446 | le_TarLong->setText( QString::number( list[0].toDouble() ) ); |
443 | le_TarLong->setText( QString::number( list[0].toDouble() ) ); |
447 | le_TarLat->setText( QString::number( list[1].toDouble() ) ); |
444 | le_TarLat->setText( QString::number( list[1].toDouble() ) ); |
448 | //le_TarLong->setText(ToolBox::get_Float((List[0].toDouble() * 10000000), 7)); |
445 | //le_TarLong->setText(ToolBox::get_Float((List[0] * 10000000), 7)); |
449 | //le_TarLat->setText(ToolBox::get_Float((List[1].toDouble() * 10000000), 7)); |
446 | //le_TarLat->setText(ToolBox::get_Float((List[1] * 10000000), 7)); |
450 | } |
447 | } |
Line 451... | Line 448... | ||
451 | } |
448 | } |
452 | 449 | ||
Line 532... | Line 529... | ||
532 | } |
529 | } |
Line 533... | Line 530... | ||
533 | 530 | ||
534 | // Hardware Auswahl und umschalten |
531 | // Hardware Auswahl und umschalten |
535 | void MKTool::slot_rb_Hardware() |
532 | void MKTool::slot_rb_Hardware() |
536 | { |
533 | { |
537 | if ((rb_SelNC->isChecked() == false) && (data->mode.ID != ADDRESS_NC)) |
534 | if ((rb_SelNC->isChecked() == false) && (data->mode.id != ADDRESS_NC)) |
538 | { |
535 | { |
539 | lb_Status->setText(tr("Schalte um auf NaviCtrl.")); |
536 | lb_Status->setText(tr("Schalte um auf NaviCtrl.")); |
540 | handler->switch_navictrl(); |
537 | handler->switch_navictrl(); |
541 | //FIXME: remove wait? |
538 | //FIXME: remove wait? |
Line 563... | Line 560... | ||
563 | 560 | ||
564 | // qDebug("Select RB Hardware"); |
561 | // qDebug("Select RB Hardware"); |
565 | handler->get_version(); |
562 | handler->get_version(); |
Line -... | Line 563... | ||
- | 563 | } |
|
566 | } |
564 | |
567 | 565 | //FIXME: Put this somewhere in libMK/QTCommunication.cpp |
|
568 | // Ticker-Event |
566 | // Ticker-Event |
569 | /////////////// |
567 | /////////////// |
570 | void MKTool::slot_Ticker() |
- | |
- | 568 | /*void MKTool::slot_Ticker() |
|
571 | { |
569 | { |
572 | //FIXME: Put this somewhere in libMK/QTCommunication.cpp |
570 | |
573 | /* |
571 | |
574 | if (TickerDiv) |
572 | if (TickerDiv) |
575 | TickerDiv = false; |
573 | TickerDiv = false; |
Line 625... | Line 623... | ||
625 | } |
623 | } |
Line 626... | Line 624... | ||
626 | 624 | ||
627 | } |
625 | } |
628 | } |
626 | } |
629 | } |
- | |
630 | */ |
627 | } |
- | 628 | } |
|
Line 631... | Line 629... | ||
631 | } |
629 | */ |
632 | 630 | ||
633 | // Zum QMK-Datenserver verbinden |
631 | // connect to QMK dataserver |
634 | void MKTool::slot_QMKS_Connect() |
632 | void MKTool::slot_QMKS_Connect() |
635 | { |
633 | { |
636 | if (ac_QMKServer->isChecked()) |
634 | if (ac_QMKServer->isChecked()) |
Line 724... | Line 722... | ||
724 | //FIXME: Move Ticker to libMK/QTCommunication.cpp |
722 | //FIXME: Move Ticker to libMK/QTCommunication.cpp |
725 | // Ticker->setInterval(2000); |
723 | // Ticker->setInterval(2000); |
726 | // TickerEvent[4] = false; |
724 | // TickerEvent[4] = false; |
727 | } |
725 | } |
Line 728... | Line 726... | ||
728 | 726 | ||
729 | void MKTool::slot_Motortest(sMotor p_Motor) |
727 | void MKTool::slot_Motortest(sMotorData p_Motor) |
730 | { |
728 | { |
731 | handler->motor_test(p_Motor); |
729 | handler->motor_test(p_Motor); |
Line 732... | Line 730... | ||
732 | } |
730 | } |
Line 835... | Line 833... | ||
835 | set_Analog Old_Analog1; |
833 | set_Analog Old_Analog1; |
Line 836... | Line 834... | ||
836 | 834 | ||
Line 837... | Line 835... | ||
837 | Old_Analog1 = Settings->Analog1; |
835 | Old_Analog1 = Settings->Analog1; |
838 | 836 | ||
Line 839... | Line 837... | ||
839 | dlg_Config *f_Config = new dlg_Config(this); |
837 | dlg_Config *f_Config = new dlg_Config(this); |
840 | f_Config->set_Settings(Settings, data->mode.ID); |
838 | f_Config->set_Settings(Settings, data->mode.id); |
841 | 839 | ||
842 | if (f_Config->exec()==QDialog::Accepted) |
840 | if (f_Config->exec()==QDialog::Accepted) |
Line 843... | Line 841... | ||
843 | { |
841 | { |
844 | Settings = f_Config->get_Settings(); |
842 | Settings = f_Config->get_Settings(); |
845 | Settings->write_Settings_Analog(data->mode.ID); |
843 | Settings->write_Settings_Analog(data->mode.id); |
846 | 844 | ||
Line 1313... | Line 1311... | ||
1313 | //fill labels with analog values from data |
1311 | //fill labels with analog values from data |
1314 | for (int i = 0; i < 32; i++) { |
1312 | for (int i = 0; i < 32; i++) { |
1315 | le_Analog[i]->setText(QString("%1").arg(data->analogData[i])); |
1313 | le_Analog[i]->setText(QString("%1").arg(data->analogData[i])); |
1316 | } |
1314 | } |
Line 1317... | Line 1315... | ||
1317 | 1315 | ||
1318 | if ((data->mode.ID == ADDRESS_FC) && (FCSettings[P_GYRO_ACC_FAKTOR] > 0)) |
1316 | if ((data->mode.id == ADDRESS_FC) && (FCSettings[P_GYRO_ACC_FAKTOR] > 0)) |
1319 | { |
1317 | { |
1320 | //set battery |
1318 | //set battery |
1321 | //TODO: save battery, compas and link quality directly in data (data->battery) |
1319 | //TODO: save battery, compas and link quality directly in data (data->battery) |
1322 | bar_UBAT->setValue(data->analogData[9]); |
1320 | bar_UBAT->setValue(data->analogData[9]); |