Skip to content

Commit

Permalink
fix i2c
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusandra committed Jan 20, 2024
1 parent b0824c0 commit 125a618
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/app/tasks/deploy_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def install_if_necessary(package: str, raise_on_error = True) -> int:

if drivers.get("i2c"):
exec_command(frame, ssh, 'grep -q "^dtparam=i2c_vc=on$" /boot/config.txt || echo "dtparam=i2c_vc=on" | sudo tee -a /boot/config.txt')
exec_command(frame, ssh, 'command -v raspi-config > /dev/null && sudo raspi-config nonint get_i2c | grep -q "1" && { sudo raspi-config nonint do_i2c 0; echo "I2C is now enabled"; }')
exec_command(frame, ssh, 'command -v raspi-config > /dev/null && sudo raspi-config nonint get_i2c | grep -q "1" && { sudo raspi-config nonint do_i2c 0; echo "I2C is now enabled"; } || echo "I2C is already enabled"')

if drivers.get("spi"):
exec_command(frame, ssh, 'sudo raspi-config nonint do_spi 0')
Expand Down

0 comments on commit 125a618

Please sign in to comment.