SJSURoboticsTeam / urc-central-2021

Track progress and information for the URC 2021 competition
MIT License
1 stars 0 forks source link

Manually mock mpu6050 #222

Closed naterpotatoers closed 2 years ago

naterpotatoers commented 2 years ago

Until we figure out why its not working lets just create a mocked mpu6050 manually so that way we can continue using the mpu as arguments for the various things used in arm

acarrou commented 2 years ago

I got the MPU to work using the 0x34 address instead of 0x68. After talking a little with Khalil, he suggested the problem could be that the boards I was using were know-offs due to the chip shortage. The code works when changing the expected device address in the MPU class to 0x34.

kammce commented 2 years ago

Oh, also, you can just mock the sjsu::Accelerometer class and just use that. You don't need the MPU class mocked directly. Just its interface. All accelerometers basically act the same so you don't need to mock MPU specifically.

acarrou commented 2 years ago

Oh, also, you can just mock the sjsu::Accelerometer class and just use that. You don't need the MPU class mocked directly. Just its interface. All accelerometers basically act the same so you don't need to mock MPU specifically.

Ahh okay, I'll mock that up with @ryerlic thank you for mentioning that.