adafruit / pxt-crickit

pxt package for crickit platform - beta
MIT License
8 stars 4 forks source link

Calling setPixelOff() causes errors #12

Closed nbogie closed 5 years ago

nbogie commented 5 years ago

Adding a call to setPixelOff() will prevent the code from running.

Here's a simple example: https://makecode.microbit.org/_PwRes9AgwRX2

Looks like a trivial fix - remove "this." : https://github.com/adafruit/pxt-crickit/compare/master...nbogie:bugfix_for_setPixelOff (Sorry, i haven't learned to build and test packages for PXT, yet)

Frustratingly, although makecode - at least /beta - reports 3 errors in pixel.ts, it doesn't present what those errors are, as far as I can see.

Versions: crickit v0.0.31, makecode 1.2.16

pelikhan commented 5 years ago

Look under built/output.txt for reliable error info

error: pxt_modules/crickit/pixel.ts(47,9): error TS9208: 'this' used outside of a method
error: pxt_modules/crickit/pixel.ts(47,9): error TS9201: unsupported type: any 0x1
error: pxt_modules/crickit/pixel.ts(47,9): error TS9201: unsupported type: any 0x1
pelikhan commented 5 years ago

Fix pushed. Thanks!

nbogie commented 5 years ago

Nice! (Tested ok). Thanks for the heads up about built/output.txt !