Bdanilko / EdPy

A compiler for a subset of python2 to be used on the Microbric Edison robot
GNU General Public License v2.0
18 stars 12 forks source link

Ed.ReadMusicEnd() returns invalid value #4

Open PSLLSP opened 5 years ago

PSLLSP commented 5 years ago

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?

BenMicrobr commented 5 years ago

Hi I'm Ben from Meet Edison

I've added this to our backlog of bugs.

Additionally, this repository is not the best place to report bugs and issues. We do not continuously monitor this repository. For future bugs and issues, please send them directly to us, via our contact form: https://meetedison.com/edison-robot-support/contact-us/