Open thealch3m1st opened 6 years ago
I believe it is a mistake. Although the code works, the memory is never allocated for r
. It may point to anywhere and risk crashing the program.
Since I don't have MPU6050 at hand, I can't test if it works well afterwards. Maybe you can correct it and open a pull request :)
Sorry for the late reply. Thanks for explaining. When I tried it it seemed to have been working fine. I will probably submit a PR soon :)
In mpu6050.cpp, line 70 you declare
uint8_t r[0];
and then you read 2 bytes into it.I don't really understand what's happening here. Could you please explain what's going on?
I would like to know: Why did you do that? Where is the memory for r? What are the consequences/limitations of doing this? Any additional information you think is relevant :)
Thanks