Missing updatestats (#351)

* aligning screeninit with pxt32

* remove shim

* missing shim

* missing shim
This commit is contained in:
Peli de Halleux 2018-02-26 21:25:04 -08:00 committed by GitHub
parent fa5ba504c5
commit d4b3ebc2e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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
}
}