Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python examples rework #27

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
python: RCInput: add Navio+ support
Add Navio+ entry and auto choice shield
  • Loading branch information
Igor Anokhin committed Jan 10, 2018
commit 5a7a23ab188a966340ad7bc8d21f5b89cb4219b4
16 changes: 10 additions & 6 deletions Python/RCInput.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import sys, time
import time

import navio.rcinput
import navio.util
import navio.Common.util

navio.util.check_apm()

rcin = navio.rcinput.RCInput()
if navio.Common.util.get_navio_version() == "NAVIO2":
import navio.Navio2.RCInput as RCInput
else:
import navio.Navio.RCInput as RCInput

navio.Common.util.check_apm()

rcin = RCInput()
while (True):
period = rcin.read(2)
print period
time.sleep(1)