adafruit / Adafruit-VC0706-Serial-Camera-Library

Library for VC0706-based Serial JPEG Cameras
http://www.adafruit.com/products/397
136 stars 110 forks source link

Fix getVersion() #31

Closed philrittenhouse closed 4 months ago

philrittenhouse commented 1 year ago

This pull request addresses the issues in my ticket #https://github.com/adafruit/Adafruit-VC0706-Serial-Camera-Library/issues/32 with changes to the reset() and getVersion() functions.

The change to reset() consumes the "basic configuration information" that is returned by the camera so that it does not get confused as the response to subsequent commands (typically getVersion()).

The change to getVersion() fixes the arg value for GEN_VERSION command, which should be 0x00 not 0x01. Also, the returned string needs to skip over the standard response header in order to return the version string.