Moved position print statement, changed button print.
This commit is contained in:
parent
d35b262384
commit
934117e618
1 changed files with 3 additions and 3 deletions
|
|
@ -21,15 +21,15 @@ while True:
|
||||||
if position_change > 0:
|
if position_change > 0:
|
||||||
for _ in range(position_change):
|
for _ in range(position_change):
|
||||||
cc.send(ConsumerControlCode.VOLUME_INCREMENT)
|
cc.send(ConsumerControlCode.VOLUME_INCREMENT)
|
||||||
print(current_position)
|
print(current_position)
|
||||||
elif position_change < 0:
|
elif position_change < 0:
|
||||||
for _ in range(-position_change):
|
for _ in range(-position_change):
|
||||||
cc.send(ConsumerControlCode.VOLUME_DECREMENT)
|
cc.send(ConsumerControlCode.VOLUME_DECREMENT)
|
||||||
print(current_position)
|
print(current_position)
|
||||||
last_position = current_position
|
last_position = current_position
|
||||||
if not button.value and button_state is None:
|
if not button.value and button_state is None:
|
||||||
button_state = "pressed"
|
button_state = "pressed"
|
||||||
if button.value and button_state == "pressed":
|
if button.value and button_state == "pressed":
|
||||||
print("button")
|
print("Button pressed.")
|
||||||
cc.send(ConsumerControlCode.PLAY_PAUSE)
|
cc.send(ConsumerControlCode.PLAY_PAUSE)
|
||||||
button_state = None
|
button_state = None
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue