Skip to content

Commit

Permalink
Fix:
Browse files Browse the repository at this point in the history
Missing argument in i2cdetect command
Reversed ReSpeaker 4/6 mic
  • Loading branch information
builderjer committed Jun 4, 2024
1 parent ec3777a commit b8729eb
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ovos_i2c_detection/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b8729eb

Please sign in to comment.