Support latest PXT with GC (#1798)
* Enable gc and basic compilation fixes * Add missing GC stuff * Set microbit-dal version * Disable jacdac in servo * UTF fixes * TS build fixes * Auto-generated files update * We only seem to have that much * Fix for new new compiler * Account for uninitialized scheduler * Intialize memory allocator * bump references * updated package * Set image tag, requires https://github.com/Microsoft/pxt/pull/5262 * updated project summaries * Fixing block tests
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
#include "pxt.h"
|
||||
|
||||
PXT_VTABLE_BEGIN(RefMImage, 0, 0)
|
||||
PXT_VTABLE_END
|
||||
PXT_VTABLE(RefMImage)
|
||||
|
||||
RefMImage::RefMImage(ImageData *d) : PXT_VTABLE_INIT(RefMImage), img(d) {
|
||||
img->incr();
|
||||
@ -22,6 +21,12 @@ void RefMImage::makeWritable() {
|
||||
}
|
||||
}
|
||||
|
||||
void RefMImage::scan(RefMImage *t) {}
|
||||
|
||||
unsigned RefMImage::gcsize(RefMImage *t) {
|
||||
return (sizeof(*t) + 3) >> 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creation, manipulation and display of LED images.
|
||||
*/
|
||||
@ -64,8 +69,8 @@ void plotImage(Image i, int xOffset = 0) {
|
||||
* @param xOffset column index to start displaying the image
|
||||
*/
|
||||
//% help=images/show-image weight=80 blockNamespace=images
|
||||
//% blockId=device_show_image_offset block="show image %sprite(myImage)|at offset %offset" blockGap=8
|
||||
//% parts="ledmatrix" async
|
||||
//% blockId=device_show_image_offset block="show image %sprite(myImage)|at offset %offset"
|
||||
//% blockGap=8 parts="ledmatrix" async
|
||||
void showImage(Image sprite, int xOffset, int interval = 400) {
|
||||
uBit.display.print(MicroBitImage(sprite->img), -xOffset, 0, 0, interval);
|
||||
}
|
||||
|
Reference in New Issue
Block a user