diff options
author | Raspberry Pi <raspberrypi@umn.edu> | 2019-12-02 20:27:29 -0600 |
---|---|---|
committer | Raspberry Pi <raspberrypi@umn.edu> | 2019-12-02 20:27:29 -0600 |
commit | 0fe6f542246dd150b4793df18253ed6d4a443264 (patch) | |
tree | 254849abf6bb3be93bb67380d519363fbd957546 /System/initialize_system.py | |
parent | Minor tweaks to PI.py to get working seamlessly with web server - tested and ... (diff) | |
download | ee4511w-0fe6f542246dd150b4793df18253ed6d4a443264.tar ee4511w-0fe6f542246dd150b4793df18253ed6d4a443264.tar.gz ee4511w-0fe6f542246dd150b4793df18253ed6d4a443264.tar.bz2 ee4511w-0fe6f542246dd150b4793df18253ed6d4a443264.tar.lz ee4511w-0fe6f542246dd150b4793df18253ed6d4a443264.tar.xz ee4511w-0fe6f542246dd150b4793df18253ed6d4a443264.tar.zst ee4511w-0fe6f542246dd150b4793df18253ed6d4a443264.zip |
Update test files to do GPIO cleanup on completion (ex: encoders don't work if GPIO.cleanup is not performed). Add system destructor and add GPIO.cleanup to that too. Everything appears to be working still.
Diffstat (limited to '')
-rwxr-xr-x | System/initialize_system.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/System/initialize_system.py b/System/initialize_system.py index 4eb287a..6df880f 100755 --- a/System/initialize_system.py +++ b/System/initialize_system.py @@ -1,7 +1,9 @@ # This file should be run on system startup. It will initialize the linear position to the center so that all tests originate from a proper position.
# The center is found by using the hardware limit switches
from system import System
+import RPi.GPIO as GPIO
# Main program
sys = System()
sys.initialize()
+GPIO.cleanup()
|