Add data validity check and retries in CST816S driver#811
Conversation
|
I just installed this PR. I don't seem to be getting the warning anymore. I have restarted my watch multiple times and haven't gotten it once, so it seems to be fixed so far. |
|
I've just done 10+ test cycles with this PR - reboot watch, play a full game of twos, return to menu, reboot, repeat. |
|
Thanks for the test @kieranc ! I'm wondering if the presence of the SWD debugger could make the i²c communication less reliable? EDIT : I've just tested one devkit without SWD connection : no crash anymore 0_o |
It looks that way but I can't figure out the how/why.. refs: |
I noticed that I couldn't get 100% reliable readings from the CST816S (touch controller) (see #763 (comment)). I added a few checks in
Cst816S::GetTouchInfoto ensure it only returns is data are valid. I also added a retry functionality for the Check ID procedure. It'll hopefully reduce the number of false positive when checking the device IDs.This PR might fix #763, but I think we still have other issues with I²C (see #763 (comment)).
Anyway, it would be nice if some people could test that PR and ensure it does not show the warning about an incompatible touch controller. @Arsen6331 @geekbozu @kieranc I would be really interested to know if this PR fixes that issue.