diff options
author | sebastian.sjoholm <sebastian.sjoholm@gmail.com> | 2013-01-03 17:13:01 +0000 |
---|---|---|
committer | sebastian.sjoholm <sebastian.sjoholm@gmail.com> | 2013-01-03 17:13:01 +0000 |
commit | 2ed9b6e06d389ef3781dcc8a15ed59ad29b4687e (patch) | |
tree | a9dc978e9465603f4ff98656cb0a90eabbac19b9 | |
parent | 65b6b9d1631eb16f7cc8e847863e512a9bebcddc (diff) | |
download | drcontrol-2ed9b6e06d389ef3781dcc8a15ed59ad29b4687e.zip drcontrol-2ed9b6e06d389ef3781dcc8a15ed59ad29b4687e.tar.gz |
Fixed bug when comparing that relay is between 1 and 8
-rwxr-xr-x | drcontrol.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drcontrol.py b/drcontrol.py index 63c10ab..ba8a1e6 100755 --- a/drcontrol.py +++ b/drcontrol.py @@ -144,9 +144,9 @@ def set_relay(): try: with BitBangDevice(cmdarg.device) as bb: - + # Action towards specific relay - if cmdarg.relay >= 1 and cmdarg.relay <= 8: + if int(cmdarg.relay) >= 1 and int(cmdarg.relay) <= 8: # Turn relay ON if cmdarg.command == "on": |