UTHT / pod1-electronics-scripts

UTHT Pod 1 sensor libraries.
MIT License
0 stars 0 forks source link

[BUG] - MPU9250 Bugs #13

Closed JLefebvre55 closed 3 years ago

JLefebvre55 commented 3 years ago

Compilation Error

FIXED: #21

Probably pretty simple.

compilationerror-consolelog

43 Second Issue

Angus:

"After 43 seconds (i did three trials and they're all consistently 43 seconds), the printing ignores the deltas and prints all the time"

c9a1fa4a-95d8-42a0-b69d-1971447ea210 Sensor initialized

0989c6f0-31d6-421c-afda-3a8c92d405a9 Breaks at 43sec since init

Creds to Angus for photos

JLefebvre55 commented 3 years ago

@AngusWu25 All the other classes seem to be operating fine.

I've opened a new branch bugfix-mpu9250 and made some changes to the implementation script at /MPU9250/MPU9250.ino. Can you do me a favour and run it on the hardware and post a screenshot of the results at 43sec?

Either the delta is getting set to zero somewhere, or the debug state is getting set to new (3) by default. Or it's something weirder than that.

angusjhwu commented 3 years ago

Thanks for the update.

Unfortunately I no longer have the hardware, @urmilmodi do you know who has the sensor and are you able to relay this request to the person currently testing?

JLefebvre55 commented 3 years ago

Adapted this issue to include both bugs.

urmilmodi commented 3 years ago

The 43 second issue was caused because the millis() function returns an unsigned long but we stored it as an unsigned int which caused the memory to overflow and cause the issue. This has been resolved in https://github.com/UTHT/electronics-scripts/tree/bugfix/sensor-class-bugs

urmilmodi commented 3 years ago

Assuming this PR https://github.com/UTHT/electronics-scripts/pull/22 is approved we can delete this branch https://github.com/UTHT/electronics-scripts/tree/bugfix-mpu9250