Update i2smic.py to a more futureproof design
This commit is contained in:
parent
b5c25be3bf
commit
d7d1417be5
1 changed files with 2 additions and 1 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import platform
|
||||
import os
|
||||
|
||||
try:
|
||||
from adafruit_shell import Shell
|
||||
|
|
@ -56,7 +57,7 @@ Installing...""")
|
|||
)
|
||||
|
||||
# Enable I2S overlay
|
||||
if shell.get_raspbian_version() == "bookworm":
|
||||
if os.path.exists("/boot/firmware/config.txt"):
|
||||
shell.run_command("sed -i -e 's/#dtparam=i2s/dtparam=i2s/g' /boot/firmware/config.txt")
|
||||
else:
|
||||
shell.run_command("sed -i -e 's/#dtparam=i2s/dtparam=i2s/g' /boot/config.txt")
|
||||
|
|
|
|||
Loading…
Reference in a new issue