Mercurial > public > ostc4
comparison Discovery/Src/base.c @ 621:6826731ff2be
Use roll and pitch agles in 0-360 format:
The roll and pitch values are provided as pos/neg angle values which causes problems in the vector calculation for the motion detection => changed the implementation to store the calibration data with a 180? offset. Also shift value by 180? before they are used for vector calculations.
| author | Ideenmodellierer |
|---|---|
| date | Wed, 03 Feb 2021 21:44:22 +0100 |
| parents | 556df4a8f418 |
| children | ba83a8ef9bad |
comparison
equal
deleted
inserted
replaced
| 620:bf574fb3efa0 | 621:6826731ff2be |
|---|---|
| 749 else /* return to t7 view */ | 749 else /* return to t7 view */ |
| 750 { | 750 { |
| 751 pSettings->design = 7; | 751 pSettings->design = 7; |
| 752 if(pSettings->MotionDetection == MOTION_DETECT_SECTOR) | 752 if(pSettings->MotionDetection == MOTION_DETECT_SECTOR) |
| 753 { | 753 { |
| 754 DefinePitchSectors(pSettings->viewPitch,CUSTOMER_DEFINED_VIEWS); | 754 DefinePitchSectors((float)(pSettings->viewPitch - 180.0),CUSTOMER_DEFINED_VIEWS); |
| 755 MapCVToSector(); | 755 MapCVToSector(); |
| 756 } | 756 } |
| 757 } | 757 } |
| 758 } | 758 } |
| 759 else | 759 else |
| 765 if (pSettings->extraDisplay == EXTRADISPLAY_BIGFONT) | 765 if (pSettings->extraDisplay == EXTRADISPLAY_BIGFONT) |
| 766 { | 766 { |
| 767 pSettings->design = 3; | 767 pSettings->design = 3; |
| 768 if(pSettings->MotionDetection == MOTION_DETECT_SECTOR) | 768 if(pSettings->MotionDetection == MOTION_DETECT_SECTOR) |
| 769 { | 769 { |
| 770 DefinePitchSectors(pSettings->viewPitch,CUSTOMER_DEFINED_VIEWS); | 770 DefinePitchSectors((float)(pSettings->viewPitch - 180.0),CUSTOMER_DEFINED_VIEWS); |
| 771 MapCVToSector(); | 771 MapCVToSector(); |
| 772 } | 772 } |
| 773 } | 773 } |
| 774 else if (pSettings->extraDisplay == EXTRADISPLAY_DECOGAME) | 774 else if (pSettings->extraDisplay == EXTRADISPLAY_DECOGAME) |
| 775 pSettings->design = 4; | 775 pSettings->design = 4; |
