Skip to content

Ed.PlayTone(Ed.NOTE_REST, Ed.NOTE_HALF) crashes EdisonOS #11

Description

@PSLLSP

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)        

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions