Make scroll work

This commit is contained in:
Michal Moskal
2017-07-05 19:17:26 +01:00
parent ddc53df7f8
commit 3e9a94d35f
2 changed files with 32 additions and 6 deletions

View File

@ -23,6 +23,18 @@ enum class ScreenFont {
// We only support up to 4 arguments for C++ functions - need to pack them on the TS side
namespace screen {
extern "C" {
void DisplaySetPixel(byte X, byte Y);
void DisplayClrPixel(byte X, byte Y);
void DisplayXorPixel(byte X, byte Y);
}
void pokeScreen() {
DisplayXorPixel(0, 0);
DisplayXorPixel(0, 0);
}
//%
void _drawLine(uint32_t p0, uint32_t p1, Draw mode) {
DMESG("line %x %x %x", p0, p1, mode);
@ -57,6 +69,8 @@ void clear() {
//%
void scroll(int v) {
LcdScroll(v);
pokeScreen(); // missing in ev3-api
//LcdUpdate();
}
/** Set font for drawText() */
@ -64,5 +78,4 @@ void scroll(int v) {
void setFont(ScreenFont font) {
LcdSelectFont((uint8_t)font);
}
}