This commit is contained in:
Peli de Halleux 2018-02-27 11:48:54 -08:00
commit fcba14aae1
4 changed files with 16 additions and 9 deletions

View File

@ -63,6 +63,11 @@ void updateScreen(Image img) {
} }
} }
//%
void updateStats(String str) {
}
void screen_init() { void screen_init() {
DMESG("init screen"); DMESG("init screen");
if (mappedFrameBuffer) if (mappedFrameBuffer)

View File

@ -5,25 +5,21 @@
//% groups=["0.,","1#*"] //% groups=["0.,","1#*"]
function img(lits: any, ...args: any[]): Image { return null } function img(lits: any, ...args: any[]): Image { return null }
let screen = image.create(DAL.LCD_WIDTH, DAL.LCD_HEIGHT) let screen = image.create(DAL.LCD_WIDTH, DAL.LCD_HEIGHT)
namespace _screen_internal { namespace _screen_internal {
//% shim=pxt::updateScreen //% shim=pxt::updateScreen
function updateScreen(img: Image): void {} function updateScreen(img: Image): void {}
//% shim=pxt::updateStats
function updateStats(msg: string): void {}
control.addFrameHandler(200, () => { control.setupScreenRefresh(() => updateScreen(screen))
updateScreen(screen)
})
updateScreen(screen)
export function _stats(msg: string) { export function _stats(msg: string) {
// show the msg somewhere - it contains frame rate etc updateStats(msg)
} }
} }
namespace brick { namespace brick {
export const LINE_HEIGHT = 12; export const LINE_HEIGHT = 12;

View File

@ -45,7 +45,7 @@
"webfonts-generator": "^0.4.0" "webfonts-generator": "^0.4.0"
}, },
"dependencies": { "dependencies": {
"pxt-common-packages": "0.20.4", "pxt-common-packages": "0.20.5",
"pxt-core": "3.4.9" "pxt-core": "3.4.9"
}, },
"scripts": { "scripts": {

View File

@ -98,3 +98,9 @@ namespace pxsim.image {
return image.ofBuffer(res) return image.ofBuffer(res)
} }
} }
namespace pxsim.pxtcore {
export function updateStats(str: string) {
// TODO
}
}