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.PlayTone(Ed.NOTE_REST, Ed.NOTE_HALF) crashes EdisonOS #11

Open PSLLSP opened 5 years ago

PSLLSP commented 5 years ago

Ed.PlayTone(Ed.NOTE_REST, Ed.NOTE_HALF) crashes Edison robot so badly that it has to be rebooted with power on switch:

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

Ed.EdisonVersion = Ed.V2

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

Ed.PlayTone(Ed.NOTE_C_7, Ed.NOTE_HALF)
while Ed.ReadMusicEnd() == Ed.MUSIC_NOT_FINISHED: pass

Ed.PlayTone(Ed.NOTE_REST, Ed.NOTE_HALF) # BUG, troublemaker is here, key parameter is Ed.NOTE_REST

Ed.TimeWait(1, Ed.TIME_SECONDS)        

while True:
    Ed.LeftLed(Ed.ON)
    Ed.TimeWait(200, Ed.TIME_MILLISECONDS)        
    Ed.LeftLed(Ed.OFF)
    Ed.TimeWait(200, Ed.TIME_MILLISECONDS)        
BenMicrobr commented 5 years ago

this repository is not the place to report bugs and issues. We do not continuously monitor this repository.

Please send this bug directly to us, via our contact form: https://meetedison.com/edison-robot-support/contact-us/