Rev 770 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 770 | Rev 776 | ||
---|---|---|---|
Line 623... | Line 623... | ||
623 | Reading_IntegralGyroRoll = 0; |
623 | Reading_IntegralGyroRoll = 0; |
624 | Reading_IntegralGyroPitch2 = IntegralPitch; |
624 | Reading_IntegralGyroPitch2 = IntegralPitch; |
625 | Reading_IntegralGyroRoll2 = IntegralRoll; |
625 | Reading_IntegralGyroRoll2 = IntegralRoll; |
626 | SumPitch = 0; |
626 | SumPitch = 0; |
627 | SumRoll = 0; |
627 | SumRoll = 0; |
- | 628 | if(ParamSet.GlobalConfig & CFG_GPS_ACTIVE) |
|
- | 629 | { |
|
628 | GPS_SetHomePosition(); |
630 | GPS_SetHomePosition(); |
- | 631 | } |
|
629 | } |
632 | } |
630 | } |
633 | } |
631 | else delay_startmotors = 0; // reset delay timer if sticks are not in this position |
634 | else delay_startmotors = 0; // reset delay timer if sticks are not in this position |
632 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
635 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
633 | // and yaw stick is leftmost --> stop motors |
636 | // and yaw stick is leftmost --> stop motors |
Line 637... | Line 640... | ||
637 | if(++delay_stopmotors > 200) // not immediately (wait 200 loops = 200 * 2ms = 0.4 s) |
640 | if(++delay_stopmotors > 200) // not immediately (wait 200 loops = 200 * 2ms = 0.4 s) |
638 | { |
641 | { |
639 | delay_stopmotors = 200; // do not repeat if once executed |
642 | delay_stopmotors = 200; // do not repeat if once executed |
640 | Model_Is_Flying = 0; |
643 | Model_Is_Flying = 0; |
641 | MotorsOn = 0; |
644 | MotorsOn = 0; |
- | 645 | if(ParamSet.GlobalConfig & CFG_GPS_ACTIVE) |
|
- | 646 | { |
|
642 | GPS_ClearHomePosition(); |
647 | GPS_ClearHomePosition(); |
- | 648 | } |
|
643 | } |
649 | } |
644 | } |
650 | } |
645 | else delay_stopmotors = 0; // reset delay timer if sticks are not in this position |
651 | else delay_stopmotors = 0; // reset delay timer if sticks are not in this position |
646 | } |
652 | } |
647 | // remapping of paameters only if the signal rc-sigbnal conditions are good |
653 | // remapping of paameters only if the signal rc-sigbnal conditions are good |