Arduino icon indicating copy to clipboard operation
Arduino copied to clipboard

Improve ArduCAM_Touch read() and constructor safety

Open Chris0xdeadbeef opened this issue 3 months ago • 0 comments

Description

Use uint8_t for loop index in read() and add if (prec > 0) to prevent division by zero.

Initialize prec via constructor initializer list (: prec(10)) for a safe default.

Minor refactor: replace i++ with ++i.

Benefits: safer read(), cleaner code, and better C++ practices, no API changes.

Chris0xdeadbeef avatar Sep 25 '25 19:09 Chris0xdeadbeef