From b8729eba1514a93fd467bbb6993d19e8e1a2fd27 Mon Sep 17 00:00:00 2001 From: builderjer Date: Tue, 4 Jun 2024 06:16:37 -0600 Subject: [PATCH] Fix: Missing argument in i2cdetect command Reversed ReSpeaker 4/6 mic --- ovos_i2c_detection/__init__.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ovos_i2c_detection/__init__.py b/ovos_i2c_detection/__init__.py index 0fc0de0..a3415cf 100644 --- a/ovos_i2c_detection/__init__.py +++ b/ovos_i2c_detection/__init__.py @@ -2,7 +2,7 @@ def is_texas_tas5806(): - cmd = 'i2cdetect -y -a 0x2f 0x2f | egrep "(2f|UU)" | awk \'{print $2}\'' + cmd = 'i2cdetect -y -a 1 0x2f 0x2f | egrep "(2f|UU)" | awk \'{print $2}\'' out = subprocess.check_output(cmd, shell=True).strip() if out == b"2f" or out == b"UU": return True @@ -31,24 +31,24 @@ def is_wm8960(): return False -def is_respeaker_4mic(): - cmd = 'i2cdetect -y -a 0x35 0x35 | egrep "(35|UU)" | awk \'{print $2}\'' +def is_respeaker_4mic: + cmd = 'i2cdetect -y -a 1 0x3b 0x3b | egrep "(3b|UU)" | awk \'{print $2}\'' out = subprocess.check_output(cmd, shell=True).strip() - if out == b"35" or out == b"UU": + if out == b"3b" or out == b"UU": return True return False -def is_respeaker_6mic(): - cmd = 'i2cdetect -y -a 0x3b 0x3b | egrep "(3b|UU)" | awk \'{print $2}\'' +def is_respeaker_6mic()(): + cmd = 'i2cdetect -y -a 1 0x35 0x35 | egrep "(35|UU)" | awk \'{print $2}\'' out = subprocess.check_output(cmd, shell=True).strip() - if out == b"3b" or out == b"UU": + if out == b"35" or out == b"UU": return True return False def is_adafruit_amp(): - cmd = 'i2cdetect -y -a 0x4b 0x4b | egrep "(4b|UU)" | awk \'{print $2}\'' + cmd = 'i2cdetect -y -a 1 0x4b 0x4b | egrep "(4b|UU)" | awk \'{print $2}\'' out = subprocess.check_output(cmd, shell=True).strip() if out == b"4b" or out == b"UU": return True