mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Merge pull request #1303 from kwagyeman/kwabena/fix_crop_init
Cropped not True if framesize is invalid
This commit is contained in:
commit
5f5deb341f
@ -232,6 +232,10 @@ static void dcmi_abort()
|
|||||||
// Returns true if a crop is being applied to the frame buffer.
|
// Returns true if a crop is being applied to the frame buffer.
|
||||||
static bool cropped()
|
static bool cropped()
|
||||||
{
|
{
|
||||||
|
if (sensor.framesize == FRAMESIZE_INVALID) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return MAIN_FB()->x // needs to be zero if not being cropped.
|
return MAIN_FB()->x // needs to be zero if not being cropped.
|
||||||
|| MAIN_FB()->y // needs to be zero if not being cropped.
|
|| MAIN_FB()->y // needs to be zero if not being cropped.
|
||||||
|| (MAIN_FB()->u != resolution[sensor.framesize][0]) // should be equal to the resolution if not cropped.
|
|| (MAIN_FB()->u != resolution[sensor.framesize][0]) // should be equal to the resolution if not cropped.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user