Skip to content
Merged
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
1 change: 1 addition & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
python-ev3dev2 (2.0.0~beta3) stable; urgency=medium

* brickpi(3) raise exception if LargeMotor not used for a motor
* MoveJoyStick should use SpeedPercent
* renamed GyroSensor rate_and_angle to angle_and_rate

Expand Down
3 changes: 3 additions & 0 deletions ev3dev2/motor.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,9 @@ class Motor(Device):

def __init__(self, address=None, name_pattern=SYSTEM_DEVICE_NAME_CONVENTION, name_exact=False, **kwargs):

if platform in ('brickpi', 'brickpi3') and not isinstance(self, LargeMotor):
raise Exception("{} is unaware of different motor types, use LargeMotor instead".format(platform))

if address is not None:
kwargs['address'] = address
super(Motor, self).__init__(self.SYSTEM_CLASS_NAME, name_pattern, name_exact, **kwargs)
Expand Down