* Many changes for the newest firmware 3.3.5
added comments and debug lines
added new autogain function (fw 3.3.5+)
changed variables for consistency
ended configuration mode on error
fixed improper JSON response messages
changed timings for new firmware
consolidated post configuration processsing
* code size reduction
updated size extimates
* reworked to reduce code and memory usage
---------
Co-authored-by: Anthony Sepa <protectivedad@gmail.com>
* SML: CRC for binary SML parsing
* switch algos
* improve errormessage on buffer overflow
* move crc variable to their own struct
* Use Flag bit to disable CRC, auto-detect algorithm,
data in own struct
debug log
* configure and enable/disable via special option "=soC,bufsz,mode", mode 16 autodetect.
* fix 15 vs 0xF
* remove benchmark code
* fix typo in comment
* Byteflip for CRC
A regression was added in commit 01154e949, which prepends
clutter to the status0 JSON status message.
Example:
```
$ curl 'http://webcam/cm?cmnd=Status0' -u admin:password ; echo
{s}Webcam Frame rate{m}0 FPS{e}{"Status":{"Module":0,"DeviceName":"...
```
The response is not properly formatted JSON and breaks client software.
The problem occurs because a new case statement was added for the
purpose of injecting webcam stats into the JSON status message, but
a break statement is missing and execution falls through to the
following case, which prepends garbage to the output buffer.
With this one-line fix in place, the output is properly formatted:
```
$ curl 'http://tahoe-front-door-cam/cm?cmnd=Status0' -u admin:password ; echo
{"Status":{"Module":0,"DeviceName":"
```
Note that the prior case for FUNC_EVERY_SECOND is also missing a break
statement. That looks wrong to me but it's unrelated to fixing this
issue and I'm inclined to punt that concern to others who are more
familiar with this code.