implemented motor speeds.
This commit is contained in:
parent
d837134db5
commit
d713a5e2e9
2 changed files with 7 additions and 3 deletions
|
@ -169,6 +169,7 @@ class PizzaHAL:
|
|||
def set_movement(hal: PizzaHAL,
|
||||
scroll: Scrolls,
|
||||
steps: int,
|
||||
speed: int,
|
||||
**kwargs):
|
||||
"""
|
||||
Move the motor controlling the vertical scroll a given distance.
|
||||
|
@ -177,7 +178,8 @@ def set_movement(hal: PizzaHAL,
|
|||
scroll = int(scroll.value)
|
||||
hal.send_cmd(SerialCommands.SET_MOVEMENT,
|
||||
scroll.to_bytes(1, 'little', signed=False),
|
||||
steps.to_bytes(2, 'little', signed=True))
|
||||
steps.to_bytes(2, 'little', signed=True),
|
||||
speed.to_bytes(1, 'little', signed=False))
|
||||
|
||||
|
||||
def rewind(hal: PizzaHAL, **kwargs):
|
||||
|
|
|
@ -66,9 +66,11 @@ class Activity(Enum):
|
|||
'filename': ''}
|
||||
TAKE_PHOTO = {'filename': ''}
|
||||
ADVANCE_UP = {'steps': 100,
|
||||
'scroll': Scrolls.VERTICAL}
|
||||
'scroll': Scrolls.VERTICAL,
|
||||
'speed': 4}
|
||||
ADVANCE_LEFT = {'steps': 200,
|
||||
'scroll': Scrolls.HORIZONTAL}
|
||||
'scroll': Scrolls.HORIZONTAL,
|
||||
'speed': 4}
|
||||
LIGHT_FRONT = {'r': 0,
|
||||
'g': 0,
|
||||
'b': 0,
|
||||
|
|
Loading…
Reference in a new issue