Skip to content

Conversation

@philrittenhouse
Copy link

This change relates to issue #21. I saw a similar issue where it was necessary to increase the CAMERADELAY value from 10 to 32 in order to successfully read data from the cameras.

Following taf2's suggestion, this pull request adds a parameter to the readPicture() function to allow overriding the default CAMERADELAY value. By default the code will work as before using the CAMERADELAY value of 10. I have also added an error message to help users identify when increasing the delay time may be required.

I haven't been able to find a root cause for why increasing the delay time is sometimes necessary but it has helped in my setup and may help others.

I have tested the changes with my setup (ESP32 and two VC0706 cameras).

Best regards,
Phil


if (!runCommand(VC0706_READ_FBUF, args, sizeof(args), 5, false))
{
Serial.println("VC0706: Read fbuf failed - delay time too small?");
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the error condition that the code hits when the delay time is too small, so let the user know what the possible cause is.

boolean TVoff(void);
boolean takePicture(void);
uint8_t *readPicture(uint8_t n);
uint8_t *readPicture(uint8_t n, uint32_t delay_time = CAMERADELAY);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use CAMERADELAY as the default so that everything works normally if no delay_time value is given.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant