Skip to content

Commit e9ec2c4

Browse files
author
Igor Anokhin
committed
python: RCInput: add Navio+ support
Add Navio+ entry and auto choice shield
1 parent 371b74e commit e9ec2c4

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

Python/RCInput.py

+10-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
import sys, time
1+
import time
22

3-
import navio.rcinput
4-
import navio.util
3+
import navio.Common.util
54

6-
navio.util.check_apm()
7-
8-
rcin = navio.rcinput.RCInput()
5+
if navio.Common.util.get_navio_version() == "NAVIO2":
6+
import navio.Navio2.RCInput as RCInput
7+
else:
8+
import navio.Navio.RCInput as RCInput
99

10+
navio.Common.util.check_apm()
11+
12+
rcin = RCInput()
1013
while (True):
1114
period = rcin.read(2)
1215
print period
1316
time.sleep(1)
17+

0 commit comments

Comments
 (0)