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
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;