06-04-2022 08:21 PM - edited 06-04-2022 09:28 PM
I've been using Bosch Sensortec APIs for many years and the coding style has always bothered me. In particular, the convolved if/else statements. This style of programming is not just ugly but is also more error prone (check out this article).
Is there anyone who would argue that the following change is not an improvement?
Before
After
And this is one of the least offensive examples.
06-05-2022 02:03 PM
Hi sebmadgwick,
Thank for your suggestion.
The sensor API is a reference code that you can modify based on.