diff --git a/ovos_PHAL/detection.py b/ovos_PHAL/detection.py index b38ebf3..ae1f473 100644 --- a/ovos_PHAL/detection.py +++ b/ovos_PHAL/detection.py @@ -18,23 +18,23 @@ def is_respeaker_2mic(): def is_respeaker_4mic(): - cmd = 'i2cdetect -y -a 0x35 0x35 | egrep "(35|UU)" | awk \'{print $2}\'' + 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}\'' + 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(): - 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 @@ -42,8 +42,16 @@ def is_adafruit(): 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 return False + +def is_aiy_voicebonnet(): +# def is_aiy_voicebonnet_mic(): + cmd = 'i2cdetect -y -a 1 0x52 0x52 | egrep "(52|UU)" | awk \'{print $2}\'' + out = subprocess.check_output(cmd, shell=True).strip() + if out == b"52" or out == b"UU": + return True + return False