-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
This is a simple demo that Ed.ReadMusicEnd() returns some invalid value.
#-------------Setup----------------
import Ed
Ed.EdisonVersion = Ed.V2
Ed.DistanceUnits = Ed.CM
Ed.Tempo = Ed.TEMPO_MEDIUM
#--------Your code below-----------
led = False
Ed.PlayBeep()
while True:
while Ed.ReadMusicEnd() == Ed.MUSIC_NOT_FINISHED:
pass
led = not led
if led:
Ed.LeftLed(Ed.ON)
Ed.RightLed(Ed.OFF)
else:
Ed.LeftLed(Ed.OFF)
Ed.RightLed(Ed.ON)
Ed.TimeWait(50, Ed.TIME_MILLISECONDS)
This program stays in endless loop after the first turn. It waits for status Ed.MUSIC_NOT_FINISHED but it never receives it.
It passes first loop because Ed.PlayBeep() sets the status. But what happens to music status after that? Why it is set to Ed.MUSIC_NOT_FINISHED ??
Is it bug in ReadMusicEnd() or in robot firmware?
Metadata
Metadata
Assignees
Labels
No labels