Moved position print statement, changed button print.

This commit is contained in:
Kattni Rembor 2018-06-13 13:49:56 -04:00
parent d35b262384
commit 934117e618

View file

@ -21,15 +21,15 @@ while True:
if position_change > 0:
for _ in range(position_change):
cc.send(ConsumerControlCode.VOLUME_INCREMENT)
print(current_position)
print(current_position)
elif position_change < 0:
for _ in range(-position_change):
cc.send(ConsumerControlCode.VOLUME_DECREMENT)
print(current_position)
print(current_position)
last_position = current_position
if not button.value and button_state is None:
button_state = "pressed"
if button.value and button_state == "pressed":
print("button")
print("Button pressed.")
cc.send(ConsumerControlCode.PLAY_PAUSE)
button_state = None