diff --git a/install.sh b/install.sh index ca33457..cb23760 100644 --- a/install.sh +++ b/install.sh @@ -9,7 +9,7 @@ sudo pip install adafruit-pca9685 sudo apt install vsftpd sudo apt install vlc sudo modprobe bcm2835-v4l2 -if [[hash pip3]];then +if hash pip3; then pip install pygame exit 0 fi diff --git a/lib/gyro.py b/lib/gyro.py index 33d1d51..9e6eaac 100644 --- a/lib/gyro.py +++ b/lib/gyro.py @@ -26,8 +26,7 @@ def read_word_2c(reg): val = read_word(reg) if val >= 0x8000: return -((65535 - val) + 1) - else: - return val + return val def dist(a, b):