microsoft / pxt-adafruit

Microsoft MakeCode editor for Adafruit Circuit Playground Express
https://makecode.adafruit.com
Other
81 stars 77 forks source link

"crickit run motor" causes "PANIC! 108" #950

Closed darzu closed 5 years ago

darzu commented 5 years ago

Describe the bug Using "cricket run motor" block causes the editor to error out with Code 108.

To Reproduce

  1. Open: https://makecode.com/_3rF5Yz6oh6Ka
  2. Notice the panic

Expected behavior Don't panic.

Screenshots image

Desktop (please complete the following information):

pelikhan commented 5 years ago

Adafruit designed the library so that it fails hard if the i2c handshake fails. We should probably make it fail silently.

Get Outlook for iOShttps://aka.ms/o0ukef


From: Daryl Zuniga notifications@github.com Sent: Wednesday, March 6, 2019 3:28:32 PM To: Microsoft/pxt-adafruit Cc: Subscribed Subject: [Microsoft/pxt-adafruit] "crickit run motor" causes "PANIC! 108" (#950)

Describe the bug Using "cricket run motor" block causes the editor to error out with Code 108.

To Reproduce

  1. Open: https://makecode.com/_3rF5Yz6oh6Kahttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmakecode.com%2F_3rF5Yz6oh6Ka&data=02%7C01%7Cjhalleux%40microsoft.com%7C7754cf14b2f44aa2c71908d6a28b72d4%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636875117148120399&sdata=PWWDorlmqXqYiT4yRJrUbKwY6awM7%2FNCdaSeXeuloUE%3D&reserved=0
  2. Notice the panic

Expected behavior Don't panic.

Screenshots [image]https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F6453828%2F53921201-dcb66800-406f-11e9-8bc9-a373f7e6668e.png&data=02%7C01%7Cjhalleux%40microsoft.com%7C7754cf14b2f44aa2c71908d6a28b72d4%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636875117148120399&sdata=gRO8TSqRRU1UbWB6W0oI3k1CzYt7GoJsbe0lOZUmnB0%3D&reserved=0

Desktop (please complete the following information):

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Fpxt-adafruit%2Fissues%2F950&data=02%7C01%7Cjhalleux%40microsoft.com%7C7754cf14b2f44aa2c71908d6a28b72d4%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636875117148120399&sdata=596nNGLGsbuQ45BGfzbSzJsN4De%2FMD4LoInnEJt%2BMiI%3D&reserved=0, or mute the threadhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAD-4Kbzf8hXZi_-Z2Gf8-xoAs_V68V9Wks5vUE8ggaJpZM4biCBO&data=02%7C01%7Cjhalleux%40microsoft.com%7C7754cf14b2f44aa2c71908d6a28b72d4%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636875117148120399&sdata=wHtwIIeyOC5vP%2B98lbqItCkEbxUfCo3C11CKAgn%2Fmis%3D&reserved=0.

darzu commented 5 years ago

Does that mean no cricket programs work in the simulator?

pelikhan commented 5 years ago

Correct no simulator support for now. We don’t have a shield story really. Not crashing would be much better.

Get Outlook for iOShttps://aka.ms/o0ukef


From: Daryl Zuniga notifications@github.com Sent: Wednesday, March 6, 2019 3:42:21 PM To: Microsoft/pxt-adafruit Cc: Peli de Halleux; Comment Subject: Re: [Microsoft/pxt-adafruit] "crickit run motor" causes "PANIC! 108" (#950)

Does that mean no cricket programs work in the simulator?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Fpxt-adafruit%2Fissues%2F950%23issuecomment-470322338&data=02%7C01%7Cjhalleux%40microsoft.com%7Cdd404df3a1374f46375f08d6a28d6111%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636875125434516576&sdata=uVYmYwbJz7oSgovu0q01zKA%2BwI1M%2B%2FR4UicrpkDbtFA%3D&reserved=0, or mute the threadhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAD-4KSzdf1NDJl5fEWHwK8Z20pOfLXHaks5vUFJdgaJpZM4biCBO&data=02%7C01%7Cjhalleux%40microsoft.com%7Cdd404df3a1374f46375f08d6a28d6111%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636875125434516576&sdata=DGzxFPyqTS2XO%2FQwrJOniRkugabfw9ayznQ59%2FvktAM%3D&reserved=0.

darzu commented 5 years ago

Some sort of "sorry, this code can't run in the simulator" error might be nice. But shouldn't we be able to run the rest of the code (e.g. if there are some neopixel animations) regardless?

pelikhan commented 5 years ago

IMO we should silently ignore the failure. Or maybe blink the D13 LED.

pelikhan commented 5 years ago

This issue belongs to the https://github.com/Adafruit/pxt-crickit repo.