2016-12-20 21:09:01 +00:00
|
|
|
'''
|
|
|
|
Created on Dec 19, 2016
|
2016-12-19 15:38:30 +00:00
|
|
|
|
2016-12-20 21:09:01 +00:00
|
|
|
@author: klaehn
|
|
|
|
'''
|
2016-12-19 15:38:30 +00:00
|
|
|
import sys
|
|
|
|
import time
|
2017-03-30 09:58:55 +00:00
|
|
|
import gate
|
2016-12-19 15:38:30 +00:00
|
|
|
|
2016-12-20 21:09:01 +00:00
|
|
|
def main():
|
2017-03-30 09:58:55 +00:00
|
|
|
gate_state = gate.Gate()
|
2016-12-20 21:09:01 +00:00
|
|
|
try:
|
|
|
|
while True:
|
|
|
|
gate_state.poll()
|
2017-03-30 09:58:55 +00:00
|
|
|
time.sleep(0.1)
|
2016-12-19 15:38:30 +00:00
|
|
|
|
2016-12-20 21:09:01 +00:00
|
|
|
except KeyboardInterrupt:
|
|
|
|
print "key exit"
|
|
|
|
return None
|
2016-12-19 15:38:30 +00:00
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2016-12-20 21:09:01 +00:00
|
|
|
sys.exit(main())
|