Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion ev3dev/auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,17 @@ def current_platform():
return 'ev3'
elif machine == 'armv6l':
return 'brickpi'
elif machine == 'armv7l':

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you only attach BrickPi to RPi 1 and PiStorms to RPi 2? What about RPi 3 (armv8...)? Also, Beaglebone is armv7l, so it will be incorrectly detected as pistorms.

See ev3dev/ev3dev#412

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True :( Looks like I need to wait for ev3dev/ev3dev#523 and then revisit auto.py

return 'pistorms'
else:
return 'unsupported'

if current_platform() == 'brickpi':
platform = current_platform()

if platform == 'brickpi':
from .brickpi import *
elif platform == 'pistorms':
from .pistorms import *
else:
# Import ev3 by default, so that it is covered by documentation.
from .ev3 import *
16 changes: 16 additions & 0 deletions ev3dev/pistorms.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

"""
An assortment of classes modeling specific features of the PiStorms.
"""

from .core import *

OUTPUT_A = 'pistorms:BBM1'
OUTPUT_B = 'pistorms:BBM2'
OUTPUT_C = 'pistorms:BAM2'
OUTPUT_D = 'pistorms:BAM1'

INPUT_1 = 'pistorms:BBS1'
INPUT_2 = 'pistorms:BBS2'
INPUT_3 = 'pistorms:BAS2'
INPUT_4 = 'pistorms:BAS1'