Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reference to undefined variable "Host" in "examples/piu/sound" #558

Closed
stc1988 opened this issue Feb 6, 2021 · 4 comments
Closed

Reference to undefined variable "Host" in "examples/piu/sound" #558

stc1988 opened this issue Feb 6, 2021 · 4 comments
Labels
fixed - please verify Issue has been fixed. Please verify and close.

Comments

@stc1988
Copy link
Contributor

stc1988 commented Feb 6, 2021

Build environment: Windows
Target device: M5stack,Desktop simulator

Description
I got a reference error when "examples/piu/sound" application launch.

Steps to Reproduce

  1. Launch "examples/piu/sound" application.
  2. See error.
    examples\piu\sound\main.js (79) # Break: SoundAppBehavior.prototype.onDisplaying: get Host: undefined variable!

if (undefined !== Host?.Button?.C && undefined !== Host?.Button?.E && undefined !== Host?.Button?.F) { // Kaluga buttons

if (undefined !== Host?.Touchpad?.B && undefined !== Host?.Touchpad?.E && undefined !== Host?.Touchpad?.F ) { // Kaluga touchpad

You should check if the variable "Host" is defined.

@andycarle
Copy link
Member

Thank you for the report! I'll get a fix for that into our next push.

@andycarle
Copy link
Member

I've committed fixes for this one and something similar in examples\drivers\neopixel\main.js. Those fixes will be available in our next open source push.

Thank you again for the report.

 - Andy

@andycarle andycarle added the fixed - please verify Issue has been fixed. Please verify and close. label Feb 13, 2021
@andycarle
Copy link
Member

This fix is live. @stc1988 please verify on your build when you get a chance. Thanks!

@stc1988
Copy link
Contributor Author

stc1988 commented Feb 13, 2021

I saw this issue fixed.
Thanks.

@stc1988 stc1988 closed this as completed Feb 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed - please verify Issue has been fixed. Please verify and close.
Projects
None yet
Development

No branches or pull requests

2 participants