weixin_39777875 2020-11-21 22:07
浏览 0

Prevent multiple hardware disconnect alerts

Expected Behavior

One alert is shown when hardware peripheral disconnects.

Actual Behavior

In some cases, two, redundant alerts display.

Cases to Consider:

  • Preventing the VM from requesting the alert twice- it should only be when the socket closes
  • Preventing the alert from getting sent if we were not already connected
  • What about if you connect, disconnect, connect, disconnect. Okay to see two alerts? Lets ask Carl and Kathy

该提问来源于开源项目:LLK/scratch-vm

  • 写回答

3条回答 默认 最新

  • weixin_39777875 2020-11-21 22:07
    关注

    I believe the issue is seeing would be resolved when these are resolved and merged in:

    • https://github.com/LLK/scratch-link/issues/87: WeDo 2.0 can "go away" without causing any error
    • https://github.com/LLK/scratch-vm/pull/1654: Differentiate peripheral errors: request vs. disconnect

    Right now, two alerts are showing because of the issue resolved by PR #1654. However, the alert should happen much earlier, when the WeDo2 disconnects, and that would be resolved by #87. So, I am going to leave this issue open, but not work on it until those issues are addressed.

    评论

报告相同问题?