A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/nasa-jpl/osr-rover-code/commit/d6077672c5b4ef6be4ce0f24d5340c6006173b4f below:

Merge pull request #201 from igillespie/fixes-to-contribute · nasa-jpl/osr-rover-code@d607767 · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+15

-6

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+15

-6

lines changed Original file line number Diff line number Diff line change

@@ -19,13 +19,22 @@

19 19

roboclaw1 = Roboclaw("/dev/serial1", 115200)

20 20

connected0 = roboclaw0.Open() == 1

21 21

connected1 = roboclaw1.Open() == 1

22 +

one_connected = False

22 23

if connected0:

23 24

print("Connected to /dev/serial0.")

24 -

print(roboclaw0.ReadVersion(address))

25 -

print(roboclaw0.ReadEncM1(address))

26 -

elif connected1:

25 +

print(f"Address: {address}")

26 +

print("ReadVersion:", roboclaw0.ReadVersion(address))

27 +

print("ReadEncM1:", roboclaw0.ReadEncM1(address))

28 +

battery = roboclaw0.ReadMainBatteryVoltage(address)

29 +

print(f"Address {address} - ReadMainBatteryVoltage: {battery}")

30 +

one_connected = True

31 +

if connected1:

27 32

print("Connected to /dev/serial1.")

28 -

print(roboclaw1.ReadVersion(address))

29 -

print(roboclaw1.ReadEncM1(address))

30 -

else:

33 +

print(f"Address: {address}")

34 +

print("ReadVersion:", roboclaw1.ReadVersion(address))

35 +

print("ReadEncM1:", roboclaw1.ReadEncM1(address))

36 +

battery = roboclaw1.ReadMainBatteryVoltage(address)

37 +

print(f"Address {address} - ReadMainBatteryVoltage: {battery}")

38 +

one_connected = True

39 +

if not one_connected:

31 40

print("Could not open comport /dev/serial0 or /dev/serial1, make sure it has the correct permissions and is available")

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4