PyComms
PyComms copied to clipboard
python smbus (I2C) communication wrapper
Dear, in [mpu6050.py] - setWaitForExternalSensorEnabled The parameter name `value` don't match with the call to : `self.i2c.writeBit(self.MPU6050_RA_I2C_MST_CTRL, self.MPU6050_WAIT_FOR_ES_BIT, enabled)`
Dear, in [mpu6050.py] - setTempFIFOEnabled The number of parameters don't match with the prototype of `write8(reg, value)`; `???: self.i2c.write8(self.MPU6050_RA_FIFO_EN, self.MPU6050_TEMP_FIFO_EN_BIT, enabled)`
Dear, in [mpu6050.py] - setDHPFMode typo on the parameter name "bandwidth" `def setDHPFMode(self, bandwidth):`
Dear, in [mpu6050.py] - setFreefallDetectionDuration you are not writing the duration value : `self.i2c.write8(self.MPU6050_RA_FF_DUR, duration)`
Dear, in [pycomms.py] : readBytes you are missing to take in account "+ i" index when you read the regs : `output.append(self.readU8(reg + i))`
``` File "models/PyComms/mpu6050.py", line 1540, in dmpGetYawPitchRoll 'roll' : atan(g['y'] / sqrt(g['x'] * g['x'] + g['z'] * g['z']))} ZeroDivisionError: float division by zero ```