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.PlayTune () cannot play REST, it breaks the tune #10

Open PSLLSP opened 5 years ago

PSLLSP commented 5 years ago

EdWare can play Tunes with "rest notes" and this tune plays nice:" f3R1c3R1a3R1f3"

EdPy has some bug and cannot handle R for Rest in tune string. Rest note is documented in documentation in Ed.TuneString() and Ed.PlayTune() but there is no example of tune string with "REST" note.

https://meetedison.com/content/EdPy-app-documentation-guide.pdf

This is demo, note that tune2 and tune3 is not played as expected:

#-------------Setup----------------
import Ed

Ed.EdisonVersion = Ed.V2

Ed.DistanceUnits = Ed.CM
Ed.Tempo = Ed.TEMPO_MEDIUM
#--------Your code below-----------

Ed.TimeWait(1, Ed.TIME_SECONDS)        

tune1 = Ed.TuneString(9, "f4c4a4f4z")         # OK
tune2 = Ed.TuneString(15, "f4R6c4R6a4R6f4z")  # BUG is here, only the first note is played
tune3 = Ed.TuneString(13, "f4c4R6a4R6f4z")    # BUG is here, only first two notes are played

Ed.LeftLed(Ed.ON)
Ed.RightLed(Ed.OFF)
Ed.PlayTune(tune1)
while Ed.ReadMusicEnd() == Ed.MUSIC_NOT_FINISHED: pass
Ed.TimeWait(1, Ed.TIME_SECONDS)        

Ed.LeftLed(Ed.OFF)
Ed.RightLed(Ed.ON)
Ed.PlayTune(tune2)
while Ed.ReadMusicEnd() == Ed.MUSIC_NOT_FINISHED: pass
Ed.TimeWait(1, Ed.TIME_SECONDS)   

Ed.LeftLed(Ed.ON)
Ed.RightLed(Ed.ON)
Ed.PlayTune(tune3)
while Ed.ReadMusicEnd() == Ed.MUSIC_NOT_FINISHED: pass
Ed.TimeWait(1, Ed.TIME_SECONDS)
BenMicrobr commented 5 years ago

Hi I'm Ben from Meet Edison

This is not a bug in this code, but rather a bug in an old version of Edisons firmware. Please update your Edison here: https://meetedison.com/edison-robot-support/firmware-update/ to fix this issue.

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/

PSLLSP commented 5 years ago

My Edison runs firmware Nov 2018, it is the latest firmware for that robot.

BenMicrobr commented 5 years ago

this repository is not the place to report bugs and issues. please send us an email via our contact form: https://meetedison.com/edison-robot-support/contact-us/

As our next steps here are only relevant to you and your Edison. When sending the email please be sure to include your Edisons Serial Number (found in the battery compartment)

gcalderwood commented 1 year ago

I am having this problem as well. Is there any known solution @op