Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect commit makes PiDog examples unusable by turning on I2C debug #1

Open
PaulBouchier opened this issue Mar 15, 2024 · 0 comments

Comments

@PaulBouchier
Copy link

On 3/13 Lovmong committed a change to pidog/sh3001.py in the pidog repo. In this change he set the debug_level for the SH3001 to debug. This has the effect of putting I2C into debug mode which makes all example programs unusable, because the Pidog class instantiates self.imu as an instance of Sh3001, which puts I2C into debug mode. See the gitk image below for the line in error.

Please fix this urgently because the Pidog repo now breaks pidog because the PiDog() class is unusable.

image

Here's what the example programs emit continuously owing to this bug

robot_hat init … done
imu_sh3001 init … 2024-03-14 18:09:59,070 [DEBUG] Set logging level to [debug]
2024-03-14 18:09:59,095 [DEBUG] Conneceted i2c device: [‘0x14’, ‘0x36’, ‘0x74’]
2024-03-14 18:09:59,097 [DEBUG] _read_i2c_block_data: [0x0F] [‘0x61’]
2024-03-14 18:09:59,097 [DEBUG] _write_i2c_block_data: [0x36] [‘0x73’]
2024-03-14 18:09:59,147 [DEBUG] _write_i2c_block_data: [0x36] [‘0x02’]
2024-03-14 18:09:59,148 [DEBUG] _write_i2c_block_data: [0x36] [‘0xC1’]
2024-03-14 18:09:59,149 [DEBUG] _write_i2c_block_data: [0x36] [‘0xC2’]
2024-03-14 18:09:59,149 [DEBUG] _write_i2c_block_data: [0x36] [‘0x00’]
2024-03-14 18:09:59,150 [DEBUG] _write_i2c_block_data: [0x36] [‘0x18’]
2024-03-14 18:09:59,150 [DEBUG] _write_i2c_block_data: [0x36] [‘0x00’]
2024-03-14 18:09:59,161 [DEBUG] _read_i2c_block_data: [0x22] [‘0x01’]
2024-03-14 18:09:59,162 [DEBUG] _write_i2c_block_data: [0x22] [‘0x01’]
2024-03-14 18:09:59,162 [DEBUG] _write_i2c_block_data: [0x23] [‘0x01’]
2024-03-14 18:09:59,163 [DEBUG] _write_i2c_block_data: [0x25] [‘0x05’]
2024-03-14 18:09:59,164 [DEBUG] _read_i2c_block_data: [0x25] [‘0x05’]
2024-03-14 18:09:59,164 [DEBUG] _read_i2c_block_data: [0x26] [‘0x20’]
2024-03-14 18:09:59,165 [DEBUG] _write_i2c_block_data: [0x26] [‘0x20’]
2024-03-14 18:09:59,166 [DEBUG] _read_i2c_block_data: [0x28] [‘0x01’]
2024-03-14 18:09:59,166 [DEBUG] _write_i2c_block_data: [0x28] [‘0x01’]
2024-03-14 18:09:59,166 [DEBUG] _write_i2c_block_data: [0x29] [‘0x01’]
2024-03-14 18:09:59,167 [DEBUG] _write_i2c_block_data: [0x8F] [‘0x06’]
2024-03-14 18:09:59,167 [DEBUG] _write_i2c_block_data: [0x9F] [‘0x06’]
2024-03-14 18:09:59,168 [DEBUG] _write_i2c_block_data: [0xAF] [‘0x06’]
2024-03-14 18:09:59,169 [DEBUG] _read_i2c_block_data: [0x2B] [‘0x01’]
2024-03-14 18:09:59,169 [DEBUG] _write_i2c_block_data: [0x2B] [‘0x01’]
2024-03-14 18:09:59,170 [DEBUG] _read_i2c_block_data: [0x20] [‘0xB8’]
2024-03-14 18:09:59,170 [DEBUG] _write_i2c_block_data: [0x20] [‘0xB8’]
2024-03-14 18:09:59,171 [DEBUG] _read_i2c_block_data: [0x20] [‘0xB8’]
done
rgb_strip init … done
dual_touch init … done
sound_direction init … done
sound_effect init … done
2024-03-14 18:10:00,666 [DEBUG] _read_i2c_block_data: [0x00] [‘0xC0’, ‘0x9C’, ‘0x0B’, ‘0xFC’, ‘0xA4’, ‘0xFF’, ‘0xBD’, ‘0xFF’, ‘0x19’, ‘0xFF’, ‘0x23’, ‘0x00’]
ultrasonic init … done
2024-03-14 18:10:00,770 [DEBUG] _read_i2c_block_data: [0x00] [‘0xD6’, ‘0x9C’, ‘0xF0’, ‘0xFB’, ‘0xC7’, ‘0xFF’, ‘0xB6’, ‘0xFF’, ‘0x14’, ‘0xFF’, ‘0x22’, ‘0x00’]
2024-03-14 18:10:00,874 [DEBUG] _read_i2c_block_data: [0x00] [‘0x9A’, ‘0x9C’, ‘0xE1’, ‘0xFB’, ‘0xFB’, ‘0xFF’, ‘0xB9’, ‘0xFF’, ‘0x16’, ‘0xFF’, ‘0x23’, ‘0x00’]
2024-03-14 18:10:00,977 [DEBUG] _read_i2c_block_data: [0x00] [‘0xF1’, ‘0x9C’, ‘0xC1’, ‘0xFB’, ‘0xB7’, ‘0xFF’, ‘0xB7’, ‘0xFF’, ‘0x19’, ‘0xFF’, ‘0x21’, ‘0x00’]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant