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() {
DMESG("init screen");
if (mappedFrameBuffer)

View File

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

View File

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

View File

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