Rev 227 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 227 | Rev 234 | ||
---|---|---|---|
Line 24... | Line 24... | ||
24 | 24 | ||
25 | wdg_Settings::wdg_Settings(QWidget *parent) : QWidget(parent) |
25 | wdg_Settings::wdg_Settings(QWidget *parent) : QWidget(parent) |
26 | { |
26 | { |
Line -... | Line 27... | ||
- | 27 | setupUi(this); |
|
- | 28 | ||
- | 29 | #ifndef _BETA_ |
|
- | 30 | cb_5_8->setVisible(false); |
|
- | 31 | cb_8_3->setVisible(false); |
|
- | 32 | cb_12_9->setVisible(false); |
|
- | 33 | cb_12_10->setVisible(false); |
|
- | 34 | cb_12_11->setVisible(false); |
|
- | 35 | sb_13_5->setVisible(false); |
|
- | 36 | ||
27 | setupUi(this); |
37 | #endif |
28 | 38 | ||
Line 29... | Line 39... | ||
29 | connect(pb_Load, SIGNAL(clicked()), this, SLOT(slot_LoadParameter())); |
39 | connect(pb_Load, SIGNAL(clicked()), this, SLOT(slot_LoadParameter())); |
30 | connect(pb_Save, SIGNAL(clicked()), this, SLOT(slot_SaveParameter())); |
40 | connect(pb_Save, SIGNAL(clicked()), this, SLOT(slot_SaveParameter())); |
Line 344... | Line 354... | ||
344 | Setting.endGroup(); |
354 | Setting.endGroup(); |
Line 345... | Line 355... | ||
345 | 355 | ||
346 | Setting.beginGroup("Gyro"); |
356 | Setting.beginGroup("Gyro"); |
347 | ParameterSet[Set][P_GYRO_P] = Setting.value("P", 80).toInt(); |
357 | ParameterSet[Set][P_GYRO_P] = Setting.value("P", 80).toInt(); |
- | 358 | ParameterSet[Set][P_GYRO_I] = Setting.value("I", 120).toInt(); |
|
348 | ParameterSet[Set][P_GYRO_I] = Setting.value("I", 120).toInt(); |
359 | ParameterSet[Set][P_GYRO_D] = Setting.value("D", 0).toInt(); |
349 | ParameterSet[Set][P_DYNAMIC_STAB] = Setting.value("DynamicStability", 75).toInt(); |
360 | ParameterSet[Set][P_DYNAMIC_STAB] = Setting.value("DynamicStability", 75).toInt(); |
350 | ParameterSet[Set][P_GYRO_ACC_FAKTOR] = Setting.value("ACC_Gyro-Factor", 30).toInt(); |
361 | ParameterSet[Set][P_GYRO_ACC_FAKTOR] = Setting.value("ACC_Gyro-Factor", 30).toInt(); |
351 | ParameterSet[Set][P_GYRO_ACC_ABGL] = Setting.value("ACC_Gyro-Compensation", 32).toInt(); |
362 | ParameterSet[Set][P_GYRO_ACC_ABGL] = Setting.value("ACC_Gyro-Compensation", 32).toInt(); |
352 | ParameterSet[Set][P_DRIFT_KOMP] = Setting.value("DriftCompensation", 4).toInt(); |
363 | ParameterSet[Set][P_DRIFT_KOMP] = Setting.value("DriftCompensation", 4).toInt(); |
Line 370... | Line 381... | ||
370 | ParameterSet[Set][P_NOTGAS] = Setting.value("NotGas", 35).toInt(); |
381 | ParameterSet[Set][P_NOTGAS] = Setting.value("NotGas", 35).toInt(); |
371 | ParameterSet[Set][P_NOTGASZEIT] = Setting.value("NotGasTime", 30).toInt(); |
382 | ParameterSet[Set][P_NOTGASZEIT] = Setting.value("NotGasTime", 30).toInt(); |
372 | Setting.endGroup(); |
383 | Setting.endGroup(); |
Line 373... | Line 384... | ||
373 | 384 | ||
374 | Setting.beginGroup("Coupling"); |
385 | Setting.beginGroup("Coupling"); |
- | 386 | ParameterSet[Set][P_ACHS_KOPPLUNG1] = Setting.value("YawPosFeedback", 90).toInt(); |
|
375 | ParameterSet[Set][P_ACHS_KOPPLUNG] = Setting.value("YawPosFeedback", 90).toInt(); |
387 | ParameterSet[Set][P_ACHS_KOPPLUNG2] = Setting.value("NickRollFeedback", 90).toInt(); |
376 | ParameterSet[Set][P_ACHS_GKOPPLUNG] = Setting.value("YawNegFeedback", 5).toInt(); |
388 | ParameterSet[Set][P_ACHS_GKOPPLUNG] = Setting.value("YawCorrection", 5).toInt(); |
Line 377... | Line 389... | ||
377 | Setting.endGroup(); |
389 | Setting.endGroup(); |
378 | 390 | ||
379 | Setting.beginGroup("Loop"); |
391 | Setting.beginGroup("Loop"); |
Line 407... | Line 419... | ||
407 | ParameterSet[Set][P_NAV_GPS_MODE] = Setting.value("GPS_ModeControl", 253).toInt(); |
419 | ParameterSet[Set][P_NAV_GPS_MODE] = Setting.value("GPS_ModeControl", 253).toInt(); |
408 | ParameterSet[Set][P_NAV_GPS_GAIN] = Setting.value("GPS_Gain", 100).toInt(); |
420 | ParameterSet[Set][P_NAV_GPS_GAIN] = Setting.value("GPS_Gain", 100).toInt(); |
409 | ParameterSet[Set][P_NAV_GPS_P] = Setting.value("GPS_P", 90).toInt(); |
421 | ParameterSet[Set][P_NAV_GPS_P] = Setting.value("GPS_P", 90).toInt(); |
410 | ParameterSet[Set][P_NAV_GPS_I] = Setting.value("GPS_I", 90).toInt(); |
422 | ParameterSet[Set][P_NAV_GPS_I] = Setting.value("GPS_I", 90).toInt(); |
411 | ParameterSet[Set][P_NAV_GPS_D] = Setting.value("GPS_D", 90).toInt(); |
423 | ParameterSet[Set][P_NAV_GPS_D] = Setting.value("GPS_D", 90).toInt(); |
- | 424 | ParameterSet[Set][P_NAV_GPS_P_LIMIT] = Setting.value("GPS_P_Limit", 75).toInt(); |
|
- | 425 | ParameterSet[Set][P_NAV_GPS_I_LIMIT] = Setting.value("GPS_I_Limit", 75).toInt(); |
|
- | 426 | ParameterSet[Set][P_NAV_GPS_D_LIMIT] = Setting.value("GPS_D_Limit", 75).toInt(); |
|
412 | ParameterSet[Set][P_NAV_GPS_ACC] = Setting.value("GPS_Acc", 0).toInt(); |
427 | ParameterSet[Set][P_NAV_GPS_ACC] = Setting.value("GPS_Acc", 0).toInt(); |
413 | ParameterSet[Set][P_NAV_GPS_MIN] = Setting.value("GPS_MinSat", 6).toInt(); |
428 | ParameterSet[Set][P_NAV_GPS_MIN] = Setting.value("GPS_MinSat", 6).toInt(); |
414 | ParameterSet[Set][P_NAV_STICK_THRE] = Setting.value("GPS_StickThreshold", 8).toInt(); |
429 | ParameterSet[Set][P_NAV_STICK_THRE] = Setting.value("GPS_StickThreshold", 8).toInt(); |
415 | ParameterSet[Set][P_NAV_WIND_CORR] = Setting.value("GPS_WindCorrection", 90).toInt(); |
430 | ParameterSet[Set][P_NAV_WIND_CORR] = Setting.value("GPS_WindCorrection", 90).toInt(); |
416 | ParameterSet[Set][P_NAV_SPEED_COMP] = Setting.value("GPS_SpeedCompensation", 30).toInt(); |
431 | ParameterSet[Set][P_NAV_SPEED_COMP] = Setting.value("GPS_SpeedCompensation", 30).toInt(); |
417 | ParameterSet[Set][P_NAV_RADIUS] = Setting.value("GPS_MaxRadius", 100).toInt(); |
432 | ParameterSet[Set][P_NAV_RADIUS] = Setting.value("GPS_MaxRadius", 100).toInt(); |
418 | ParameterSet[Set][P_NAV_ANGLE_LIMIT] = Setting.value("GPS_AngleLimit", 60).toInt(); |
433 | ParameterSet[Set][P_NAV_ANGLE_LIMIT] = Setting.value("GPS_AngleLimit", 60).toInt(); |
- | 434 | ParameterSet[Set][P_NAV_PH_LOGINTIME] = Setting.value("GPS_PH_Login_Time", 4).toInt(); |
|
419 | Setting.endGroup(); |
435 | Setting.endGroup(); |
Line 420... | Line 436... | ||
420 | 436 | ||
421 | show_FCSettings(Set, ParameterSet[Set]); |
437 | show_FCSettings(Set, ParameterSet[Set]); |
422 | } |
438 | } |
Line 497... | Line 513... | ||
497 | ParameterSet[Set][P_HOEHE_GAIN] = sb_4_6->value(); |
513 | ParameterSet[Set][P_HOEHE_GAIN] = sb_4_6->value(); |
Line 498... | Line 514... | ||
498 | 514 | ||
499 | // Seite 5 |
515 | // Seite 5 |
500 | ParameterSet[Set][P_GYRO_P] = get_Value(cb_5_1); |
516 | ParameterSet[Set][P_GYRO_P] = get_Value(cb_5_1); |
- | 517 | ParameterSet[Set][P_GYRO_I] = get_Value(cb_5_2); |
|
501 | ParameterSet[Set][P_GYRO_I] = get_Value(cb_5_2); |
518 | ParameterSet[Set][P_GYRO_D] = get_Value(cb_5_8); |
502 | ParameterSet[Set][P_DYNAMIC_STAB] = get_Value(cb_5_3); |
519 | ParameterSet[Set][P_DYNAMIC_STAB] = get_Value(cb_5_3); |
503 | ParameterSet[Set][P_GYRO_ACC_FAKTOR] = sb_5_4->value(); |
520 | ParameterSet[Set][P_GYRO_ACC_FAKTOR] = sb_5_4->value(); |
504 | ParameterSet[Set][P_GYRO_ACC_ABGL] = sb_5_5->value(); |
521 | ParameterSet[Set][P_GYRO_ACC_ABGL] = sb_5_5->value(); |
505 | ParameterSet[Set][P_FAKTOR_I] = get_Value(cb_5_6); |
522 | ParameterSet[Set][P_FAKTOR_I] = get_Value(cb_5_6); |
Line 520... | Line 537... | ||
520 | ParameterSet[Set][P_UNTERSPANNUNG] = sb_7_4->value(); |
537 | ParameterSet[Set][P_UNTERSPANNUNG] = sb_7_4->value(); |
521 | ParameterSet[Set][P_NOTGASZEIT] = sb_7_5->value(); |
538 | ParameterSet[Set][P_NOTGASZEIT] = sb_7_5->value(); |
522 | ParameterSet[Set][P_NOTGAS] = sb_7_6->value(); |
539 | ParameterSet[Set][P_NOTGAS] = sb_7_6->value(); |
Line 523... | Line 540... | ||
523 | 540 | ||
524 | // Seite 8 |
541 | // Seite 8 |
- | 542 | ParameterSet[Set][P_ACHS_KOPPLUNG1] = get_Value(cb_8_1); |
|
525 | ParameterSet[Set][P_ACHS_KOPPLUNG] = get_Value(cb_8_1); |
543 | ParameterSet[Set][P_ACHS_KOPPLUNG2] = get_Value(cb_8_2); |
Line 526... | Line 544... | ||
526 | ParameterSet[Set][P_ACHS_GKOPPLUNG] = get_Value(cb_8_2); |
544 | ParameterSet[Set][P_ACHS_GKOPPLUNG] = get_Value(cb_8_3); |
527 | 545 | ||
528 | // Seite 9 |
546 | // Seite 9 |
529 | ParameterSet[Set][P_LOOP_CONFIG] = 0; |
547 | ParameterSet[Set][P_LOOP_CONFIG] = 0; |
Line 567... | Line 585... | ||
567 | ParameterSet[Set][P_NAV_GPS_MIN] = sb_12_4->value(); |
585 | ParameterSet[Set][P_NAV_GPS_MIN] = sb_12_4->value(); |
568 | ParameterSet[Set][P_NAV_GPS_P] = get_Value(cb_12_5); |
586 | ParameterSet[Set][P_NAV_GPS_P] = get_Value(cb_12_5); |
569 | ParameterSet[Set][P_NAV_GPS_I] = get_Value(cb_12_6); |
587 | ParameterSet[Set][P_NAV_GPS_I] = get_Value(cb_12_6); |
570 | ParameterSet[Set][P_NAV_GPS_D] = get_Value(cb_12_7); |
588 | ParameterSet[Set][P_NAV_GPS_D] = get_Value(cb_12_7); |
571 | ParameterSet[Set][P_NAV_GPS_ACC] = get_Value(cb_12_8); |
589 | ParameterSet[Set][P_NAV_GPS_ACC] = get_Value(cb_12_8); |
- | 590 | ParameterSet[Set][P_NAV_GPS_P_LIMIT] = get_Value(cb_12_9); |
|
- | 591 | ParameterSet[Set][P_NAV_GPS_I_LIMIT] = get_Value(cb_12_10); |
|
- | 592 | ParameterSet[Set][P_NAV_GPS_D_LIMIT] = get_Value(cb_12_11); |
|
Line 572... | Line 593... | ||
572 | 593 | ||
573 | //Seite 13 |
594 | //Seite 13 |
574 | ParameterSet[Set][P_NAV_WIND_CORR] = get_Value(cb_13_1); |
595 | ParameterSet[Set][P_NAV_WIND_CORR] = get_Value(cb_13_1); |
575 | ParameterSet[Set][P_NAV_SPEED_COMP] = get_Value(cb_13_2); |
596 | ParameterSet[Set][P_NAV_SPEED_COMP] = get_Value(cb_13_2); |
576 | ParameterSet[Set][P_NAV_RADIUS] = get_Value(cb_13_3); |
597 | ParameterSet[Set][P_NAV_RADIUS] = get_Value(cb_13_3); |
- | 598 | ParameterSet[Set][P_NAV_ANGLE_LIMIT] = get_Value(cb_13_4); |
|
577 | ParameterSet[Set][P_NAV_ANGLE_LIMIT] = get_Value(cb_13_4); |
599 | ParameterSet[Set][P_NAV_PH_LOGINTIME] = sb_13_5->value(); |
Line 578... | Line 600... | ||
578 | } |
600 | } |
579 | 601 | ||
580 | void wdg_Settings::slot_SaveParameter() // DONE 0.71g |
602 | void wdg_Settings::slot_SaveParameter() // DONE 0.71g |
Line 652... | Line 674... | ||
652 | Setting.setValue("NotGas", ParameterSet[Set][P_NOTGAS]); |
674 | Setting.setValue("NotGas", ParameterSet[Set][P_NOTGAS]); |
653 | Setting.setValue("NotGasTime", ParameterSet[Set][P_NOTGASZEIT]); |
675 | Setting.setValue("NotGasTime", ParameterSet[Set][P_NOTGASZEIT]); |
654 | Setting.endGroup(); |
676 | Setting.endGroup(); |
Line 655... | Line 677... | ||
655 | 677 | ||
656 | Setting.beginGroup("Coupling"); |
678 | Setting.beginGroup("Coupling"); |
657 | Setting.setValue("YawPosFeedback", ParameterSet[Set][P_ACHS_KOPPLUNG]); |
679 | Setting.setValue("YawPosFeedback", ParameterSet[Set][P_ACHS_KOPPLUNG1]); |
658 | Setting.setValue("YawNegFeedback", ParameterSet[Set][P_ACHS_GKOPPLUNG]); |
680 | Setting.setValue("YawNegFeedback", ParameterSet[Set][P_ACHS_GKOPPLUNG]); |
Line 659... | Line 681... | ||
659 | Setting.endGroup(); |
681 | Setting.endGroup(); |
660 | 682 | ||
Line 797... | Line 819... | ||
797 | } |
819 | } |
798 | // Seite 5 |
820 | // Seite 5 |
799 | { |
821 | { |
800 | cb_5_1 = setCombo(cb_5_1, Set, FCSettings[P_GYRO_P]); |
822 | cb_5_1 = setCombo(cb_5_1, Set, FCSettings[P_GYRO_P]); |
801 | cb_5_2 = setCombo(cb_5_2, Set, FCSettings[P_GYRO_I]); |
823 | cb_5_2 = setCombo(cb_5_2, Set, FCSettings[P_GYRO_I]); |
- | 824 | cb_5_8 = setCombo(cb_5_8, Set, FCSettings[P_GYRO_D]); |
|
802 | cb_5_3 = setCombo(cb_5_3, Set, FCSettings[P_DYNAMIC_STAB]); |
825 | cb_5_3 = setCombo(cb_5_3, Set, FCSettings[P_DYNAMIC_STAB]); |
803 | sb_5_4->setValue(FCSettings[P_GYRO_ACC_FAKTOR]); |
826 | sb_5_4->setValue(FCSettings[P_GYRO_ACC_FAKTOR]); |
804 | sb_5_5->setValue(FCSettings[P_GYRO_ACC_ABGL]); |
827 | sb_5_5->setValue(FCSettings[P_GYRO_ACC_ABGL]); |
805 | cb_5_6 = setCombo(cb_5_6, Set, FCSettings[P_FAKTOR_I]); |
828 | cb_5_6 = setCombo(cb_5_6, Set, FCSettings[P_FAKTOR_I]); |
806 | sb_5_7->setValue(FCSettings[P_DRIFT_KOMP]); |
829 | sb_5_7->setValue(FCSettings[P_DRIFT_KOMP]); |
Line 823... | Line 846... | ||
823 | sb_7_5->setValue(FCSettings[P_NOTGASZEIT]); |
846 | sb_7_5->setValue(FCSettings[P_NOTGASZEIT]); |
824 | sb_7_6->setValue(FCSettings[P_NOTGAS]); |
847 | sb_7_6->setValue(FCSettings[P_NOTGAS]); |
825 | } |
848 | } |
826 | // Seite 8 |
849 | // Seite 8 |
827 | { |
850 | { |
828 | cb_8_1 = setCombo(cb_8_1, Set, FCSettings[P_ACHS_KOPPLUNG]); |
851 | cb_8_1 = setCombo(cb_8_1, Set, FCSettings[P_ACHS_KOPPLUNG1]); |
- | 852 | cb_8_2 = setCombo(cb_8_2, Set, FCSettings[P_ACHS_KOPPLUNG2]); |
|
829 | cb_8_2 = setCombo(cb_8_2, Set, FCSettings[P_ACHS_GKOPPLUNG]); |
853 | cb_8_3 = setCombo(cb_8_3, Set, FCSettings[P_ACHS_GKOPPLUNG]); |
830 | } |
854 | } |
831 | // Seite 9 |
855 | // Seite 9 |
832 | { |
856 | { |
833 | if (FCSettings[P_LOOP_CONFIG] & 0x01) |
857 | if (FCSettings[P_LOOP_CONFIG] & 0x01) |
834 | { |
858 | { |
Line 900... | Line 924... | ||
900 | sb_12_4->setValue(FCSettings[P_NAV_GPS_MIN]); |
924 | sb_12_4->setValue(FCSettings[P_NAV_GPS_MIN]); |
901 | cb_12_5 = setCombo(cb_12_5, Set, FCSettings[P_NAV_GPS_P]); |
925 | cb_12_5 = setCombo(cb_12_5, Set, FCSettings[P_NAV_GPS_P]); |
902 | cb_12_6 = setCombo(cb_12_6, Set, FCSettings[P_NAV_GPS_I]); |
926 | cb_12_6 = setCombo(cb_12_6, Set, FCSettings[P_NAV_GPS_I]); |
903 | cb_12_7 = setCombo(cb_12_7, Set, FCSettings[P_NAV_GPS_D]); |
927 | cb_12_7 = setCombo(cb_12_7, Set, FCSettings[P_NAV_GPS_D]); |
904 | cb_12_8 = setCombo(cb_12_8, Set, FCSettings[P_NAV_GPS_ACC]); |
928 | cb_12_8 = setCombo(cb_12_8, Set, FCSettings[P_NAV_GPS_ACC]); |
- | 929 | cb_12_9 = setCombo(cb_12_9, Set, FCSettings[P_NAV_GPS_P_LIMIT]); |
|
- | 930 | cb_12_10 = setCombo(cb_12_10, Set, FCSettings[P_NAV_GPS_I_LIMIT]); |
|
- | 931 | cb_12_11 = setCombo(cb_12_11, Set, FCSettings[P_NAV_GPS_D_LIMIT]); |
|
905 | } |
932 | } |
906 | // Seite 13 |
933 | // Seite 13 |
907 | { |
934 | { |
908 | cb_13_1 = setCombo(cb_13_1, Set, FCSettings[P_NAV_WIND_CORR]); |
935 | cb_13_1 = setCombo(cb_13_1, Set, FCSettings[P_NAV_WIND_CORR]); |
909 | cb_13_2 = setCombo(cb_13_2, Set, FCSettings[P_NAV_SPEED_COMP]); |
936 | cb_13_2 = setCombo(cb_13_2, Set, FCSettings[P_NAV_SPEED_COMP]); |
910 | cb_13_3 = setCombo(cb_13_3, Set, FCSettings[P_NAV_RADIUS]); |
937 | cb_13_3 = setCombo(cb_13_3, Set, FCSettings[P_NAV_RADIUS]); |
911 | cb_13_4 = setCombo(cb_13_4, Set, FCSettings[P_NAV_ANGLE_LIMIT]); |
938 | cb_13_4 = setCombo(cb_13_4, Set, FCSettings[P_NAV_ANGLE_LIMIT]); |
- | 939 | sb_13_5->setValue(FCSettings[P_NAV_PH_LOGINTIME]); |
|
912 | } |
940 | } |
913 | } |
941 | } |
Line 914... | Line 942... | ||
914 | 942 | ||
915 | wdg_Settings::~wdg_Settings() |
943 | wdg_Settings::~wdg_Settings() |