Rev 337 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 337 | Rev 481 | ||
---|---|---|---|
Line 277... | Line 277... | ||
277 | } |
277 | } |
278 | } |
278 | } |
Line 279... | Line 279... | ||
279 | 279 | ||
280 | void wdg_Settings::slot_LoadParameter() // DONE 0.71g |
280 | void wdg_Settings::slot_LoadParameter() // DONE 0.71g |
281 | { |
281 | { |
Line 282... | Line 282... | ||
282 | QString Filename = QFileDialog::getOpenFileName(this, "Mikrokopter Parameter laden", Config->DIR.Parameter + "", "Mikrokopter Parameter(*.mkp);;Alle Dateien (*)"); |
282 | QString Filename = QFileDialog::getOpenFileName(this, "Mikrokopter Parameter laden", Config->DIR.Parameter + "/", "Mikrokopter Parameter(*.mkp);;Alle Dateien (*)"); |
283 | 283 | ||
284 | if (!Filename.isEmpty()) |
284 | if (!Filename.isEmpty()) |
285 | { |
285 | { |
Line 343... | Line 343... | ||
343 | Setting.endGroup(); |
343 | Setting.endGroup(); |
Line 344... | Line 344... | ||
344 | 344 | ||
345 | Setting.beginGroup("Camera"); |
345 | Setting.beginGroup("Camera"); |
346 | ParameterSet[Set][P_SERVO_NICK_CONT] = Setting.value("ServoNickControl", 100).toInt(); |
346 | ParameterSet[Set][P_SERVO_NICK_CONT] = Setting.value("ServoNickControl", 100).toInt(); |
347 | ParameterSet[Set][P_SERVO_NICK_COMP] = Setting.value("ServoNickCompensation", 40).toInt(); |
- | |
348 | ParameterSet[Set][P_SERVO_NICK_COMPI] = Setting.value("ServoNickInvert", 0).toInt(); |
347 | ParameterSet[Set][P_SERVO_NICK_COMP] = Setting.value("ServoNickCompensation", 40).toInt(); |
349 | ParameterSet[Set][P_SERVO_NICK_MIN] = Setting.value("ServoNickMin", 50).toInt(); |
348 | ParameterSet[Set][P_SERVO_NICK_MIN] = Setting.value("ServoNickMin", 50).toInt(); |
- | 349 | ParameterSet[Set][P_SERVO_NICK_MAX] = Setting.value("ServoNickMax", 150).toInt(); |
|
- | 350 | ||
- | 351 | ParameterSet[Set][P_SERVO_ROLL_CONT] = Setting.value("ServoRollControl", 100).toInt(); |
|
- | 352 | ParameterSet[Set][P_SERVO_ROLL_COMP] = Setting.value("ServoRollCompensation", 40).toInt(); |
|
- | 353 | ParameterSet[Set][P_SERVO_ROLL_MIN] = Setting.value("ServoRollMin", 50).toInt(); |
|
- | 354 | ParameterSet[Set][P_SERVO_ROLL_MAX] = Setting.value("ServoRollMax", 150).toInt(); |
|
- | 355 | ||
- | 356 | ParameterSet[Set][P_SERVO_COMPI] = Setting.value("ServoInvert", 0).toInt(); |
|
350 | ParameterSet[Set][P_SERVO_NICK_MAX] = Setting.value("ServoNickMax", 150).toInt(); |
357 | |
351 | ParameterSet[Set][P_SERVO_NICK_REFR] = Setting.value("ServoNickRefreshRate", 5).toInt(); |
358 | ParameterSet[Set][P_SERVO_REFR] = Setting.value("ServoNickRefreshRate", 5).toInt(); |
Line 352... | Line 359... | ||
352 | Setting.endGroup(); |
359 | Setting.endGroup(); |
353 | 360 | ||
354 | Setting.beginGroup("Others"); |
361 | Setting.beginGroup("Others"); |
Line 503... | Line 510... | ||
503 | // Seite 6 |
510 | // Seite 6 |
504 | ParameterSet[Set][P_SERVO_NICK_CONT] = get_Value(cb_6_1); |
511 | ParameterSet[Set][P_SERVO_NICK_CONT] = get_Value(cb_6_1); |
505 | ParameterSet[Set][P_SERVO_NICK_COMP] = sb_6_2->value(); |
512 | ParameterSet[Set][P_SERVO_NICK_COMP] = sb_6_2->value(); |
506 | ParameterSet[Set][P_SERVO_NICK_MIN] = sb_6_3->value(); |
513 | ParameterSet[Set][P_SERVO_NICK_MIN] = sb_6_3->value(); |
507 | ParameterSet[Set][P_SERVO_NICK_MAX] = sb_6_4->value(); |
514 | ParameterSet[Set][P_SERVO_NICK_MAX] = sb_6_4->value(); |
- | 515 | // ParameterSet[Set][P_SERVO_NICK_COMPI] = cb_6_6->isChecked(); |
|
- | 516 | ||
- | 517 | ParameterSet[Set][P_SERVO_ROLL_CONT] = get_Value(cb_6_7); |
|
508 | ParameterSet[Set][P_SERVO_NICK_REFR] = sb_6_5->value(); |
518 | ParameterSet[Set][P_SERVO_ROLL_COMP] = sb_6_8->value(); |
- | 519 | ParameterSet[Set][P_SERVO_ROLL_MIN] = sb_6_10->value(); |
|
509 | ParameterSet[Set][P_SERVO_NICK_COMPI] = cb_6_6->isChecked(); |
520 | ParameterSet[Set][P_SERVO_ROLL_MAX] = sb_6_11->value(); |
- | 521 | ||
- | 522 | ParameterSet[Set][P_SERVO_REFR] = sb_6_5->value(); |
|
- | 523 | ||
- | 524 | if (cb_6_6->isChecked()) |
|
- | 525 | ParameterSet[Set][P_SERVO_COMPI] = ParameterSet[Set][P_SERVO_COMPI] | 0x01; |
|
- | 526 | if (cb_6_9->isChecked()) |
|
- | 527 | ParameterSet[Set][P_SERVO_COMPI] = ParameterSet[Set][P_SERVO_COMPI] | 0x02; |
|
Line 510... | Line 528... | ||
510 | 528 | ||
511 | // Seite 7 |
529 | // Seite 7 |
512 | ParameterSet[Set][P_GAS_MIN] = sb_7_1->value(); |
530 | ParameterSet[Set][P_GAS_MIN] = sb_7_1->value(); |
513 | ParameterSet[Set][P_GAS_MAX] = sb_7_2->value(); |
531 | ParameterSet[Set][P_GAS_MAX] = sb_7_2->value(); |
Line 529... | Line 547... | ||
529 | ParameterSet[Set][P_LOOP_CONFIG] = ParameterSet[Set][P_LOOP_CONFIG] | 0x02; |
547 | ParameterSet[Set][P_LOOP_CONFIG] = ParameterSet[Set][P_LOOP_CONFIG] | 0x02; |
530 | if (tb_9_8->text() == QString("1")) |
548 | if (tb_9_8->text() == QString("1")) |
531 | ParameterSet[Set][P_LOOP_CONFIG] = ParameterSet[Set][P_LOOP_CONFIG] | 0x04; |
549 | ParameterSet[Set][P_LOOP_CONFIG] = ParameterSet[Set][P_LOOP_CONFIG] | 0x04; |
532 | if (tb_9_9->text() == QString("1")) |
550 | if (tb_9_9->text() == QString("1")) |
533 | ParameterSet[Set][P_LOOP_CONFIG] = ParameterSet[Set][P_LOOP_CONFIG] | 0x08; |
551 | ParameterSet[Set][P_LOOP_CONFIG] = ParameterSet[Set][P_LOOP_CONFIG] | 0x08; |
534 | // if (cb_4_7->isChecked()) |
- | |
535 | // ParameterSet[Set][P_LOOP_CONFIG] = ParameterSet[Set][P_LOOP_CONFIG] | 0x10; |
- | |
- | 552 | ||
Line 536... | Line 553... | ||
536 | 553 | ||
537 | ParameterSet[Set][P_LOOP_GAS_LIMIT] = get_Value(cb_9_1); |
554 | ParameterSet[Set][P_LOOP_GAS_LIMIT] = get_Value(cb_9_1); |
538 | ParameterSet[Set][P_LOOP_THRESHOLD] = sb_9_2->value(); |
555 | ParameterSet[Set][P_LOOP_THRESHOLD] = sb_9_2->value(); |
539 | ParameterSet[Set][P_WINKEL_NICK] = sb_9_3->value(); |
556 | ParameterSet[Set][P_WINKEL_NICK] = sb_9_3->value(); |
Line 579... | Line 596... | ||
579 | 596 | ||
580 | void wdg_Settings::slot_SaveParameter() // DONE 0.71g |
597 | void wdg_Settings::slot_SaveParameter() // DONE 0.71g |
581 | { |
598 | { |
Line 582... | Line 599... | ||
582 | int Set = sb_Set->value() + 5; |
599 | int Set = sb_Set->value() + 5; |
Line 583... | Line 600... | ||
583 | 600 | ||
584 | QString Filename = QFileDialog::getSaveFileName(this, "Mikrokopter Parameter speichern", Config->DIR.Parameter + "" + le_SetName->text(), "Mikrokopter Parameter(*.mkp);;Alle Dateien (*)"); |
601 | QString Filename = QFileDialog::getSaveFileName(this, "Mikrokopter Parameter speichern", Config->DIR.Parameter + "/" + le_SetName->text(), "Mikrokopter Parameter(*.mkp);;Alle Dateien (*)"); |
585 | 602 | ||
586 | if (!Filename.isEmpty()) |
603 | if (!Filename.isEmpty()) |
Line 636... | Line 653... | ||
636 | Setting.endGroup(); |
653 | Setting.endGroup(); |
Line 637... | Line 654... | ||
637 | 654 | ||
638 | Setting.beginGroup("Camera"); |
655 | Setting.beginGroup("Camera"); |
639 | Setting.setValue("ServoNickControl", ParameterSet[Set][P_SERVO_NICK_CONT]); |
656 | Setting.setValue("ServoNickControl", ParameterSet[Set][P_SERVO_NICK_CONT]); |
640 | Setting.setValue("ServoNickCompensation", ParameterSet[Set][P_SERVO_NICK_COMP]); |
- | |
641 | Setting.setValue("ServoNickInvert", ParameterSet[Set][P_SERVO_NICK_COMPI]); |
657 | Setting.setValue("ServoNickCompensation", ParameterSet[Set][P_SERVO_NICK_COMP]); |
642 | Setting.setValue("ServoNickMin", ParameterSet[Set][P_SERVO_NICK_MIN]); |
658 | Setting.setValue("ServoNickMin", ParameterSet[Set][P_SERVO_NICK_MIN]); |
- | 659 | Setting.setValue("ServoNickMax", ParameterSet[Set][P_SERVO_NICK_MAX]); |
|
- | 660 | ||
- | 661 | Setting.setValue("ServoRollControl", ParameterSet[Set][P_SERVO_ROLL_CONT]); |
|
- | 662 | Setting.setValue("ServoRollCompensation", ParameterSet[Set][P_SERVO_ROLL_COMP]); |
|
- | 663 | Setting.setValue("ServoRollMin", ParameterSet[Set][P_SERVO_ROLL_MIN]); |
|
- | 664 | Setting.setValue("ServoRollMax", ParameterSet[Set][P_SERVO_ROLL_MAX]); |
|
- | 665 | ||
643 | Setting.setValue("ServoNickMax", ParameterSet[Set][P_SERVO_NICK_MAX]); |
666 | Setting.setValue("ServoInvert", ParameterSet[Set][P_SERVO_COMPI]); |
644 | Setting.setValue("ServoNickRefreshRate", ParameterSet[Set][P_SERVO_NICK_REFR]); |
667 | Setting.setValue("ServoNickRefreshRate", ParameterSet[Set][P_SERVO_REFR]); |
Line 645... | Line 668... | ||
645 | Setting.endGroup(); |
668 | Setting.endGroup(); |
646 | 669 | ||
647 | Setting.beginGroup("Others"); |
670 | Setting.beginGroup("Others"); |
Line 809... | Line 832... | ||
809 | { |
832 | { |
810 | cb_6_1 = setCombo(cb_6_1, Set, FCSettings[P_SERVO_NICK_CONT]); |
833 | cb_6_1 = setCombo(cb_6_1, Set, FCSettings[P_SERVO_NICK_CONT]); |
811 | sb_6_2->setValue(FCSettings[P_SERVO_NICK_COMP]); |
834 | sb_6_2->setValue(FCSettings[P_SERVO_NICK_COMP]); |
812 | sb_6_3->setValue(FCSettings[P_SERVO_NICK_MIN]); |
835 | sb_6_3->setValue(FCSettings[P_SERVO_NICK_MIN]); |
813 | sb_6_4->setValue(FCSettings[P_SERVO_NICK_MAX]); |
836 | sb_6_4->setValue(FCSettings[P_SERVO_NICK_MAX]); |
- | 837 | ||
- | 838 | cb_6_7 = setCombo(cb_6_7, Set, FCSettings[P_SERVO_ROLL_CONT]); |
|
814 | sb_6_5->setValue(FCSettings[P_SERVO_NICK_REFR]); |
839 | sb_6_8->setValue(FCSettings[P_SERVO_ROLL_COMP]); |
- | 840 | sb_6_10->setValue(FCSettings[P_SERVO_ROLL_MIN]); |
|
- | 841 | sb_6_11->setValue(FCSettings[P_SERVO_ROLL_MAX]); |
|
- | 842 | ||
815 | cb_6_6->setChecked(FCSettings[P_SERVO_NICK_COMPI]); |
843 | cb_6_6->setChecked(FCSettings[P_SERVO_COMPI] & 0x01); |
- | 844 | cb_6_9->setChecked(FCSettings[P_SERVO_COMPI] & 0x02); |
|
- | 845 | ||
- | 846 | sb_6_5->setValue(FCSettings[P_SERVO_REFR]); |
|
816 | } |
847 | } |
817 | // Seite 7 |
848 | // Seite 7 |
818 | { |
849 | { |
819 | sb_7_1->setValue(FCSettings[P_GAS_MIN]); |
850 | sb_7_1->setValue(FCSettings[P_GAS_MIN]); |
820 | sb_7_2->setValue(FCSettings[P_GAS_MAX]); |
851 | sb_7_2->setValue(FCSettings[P_GAS_MAX]); |