adafruit / adafruit/Adafruit-VC0706-Serial-Camera-Library
GetVersion() command is incorrect
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 139
- Forks
- 108
- PR merge metrics
- No merged PRs in 30d
Description
I noticed when using this library, that when starting up, the getVersion() command (after begin) actually returns the power up string, not the version number.
Looking into it, I found a couple of bugs.
Begin() actually does a reset, but does not flush the serial buffer -that's why getVersion() after begin() returns the power on text.
GetVersion() itself is broken, you just get "v" and some hex from it (which probably means something). The solution for getVersion is to change the arg 0x01 to 0x00 (this is the correct value), and the return (char *) camerabuf should be camerabuf+5. I'm actually not sure what 0x01 in getVersion does (documentation says it should be 0x00).
This gives the correct version string.
You can then use this to find what baud rate the camera is running at. If you don't use begin() you can set the camera to whatever baud rate you want.
As to the begin/reset issue -don't use begin, just use the underlying serial commands (swser.begun(baud)), swser.flush() etc.) that's all begin does anyway. Use cam.reset() if you want a reset - no need to hide one in begin.
Oh, no header guards either.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the implementations of begin(), GetVersion(), and the serial commands referenced as swser.begun(), swser.flush(), and cam.reset(). Confirm that GetVersion() returns the version string and that startup/reset handling no longer leaves stale power-on text; also inspect the headers for the reported missing guards.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- arduino, cpp
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100