Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some letters are displaying incorrectly on TRIK Controller #285

Open
khodand opened this issue May 17, 2019 · 1 comment
Open

Some letters are displaying incorrectly on TRIK Controller #285

khodand opened this issue May 17, 2019 · 1 comment

Comments

@khodand
Copy link
Member

khodand commented May 17, 2019

Баг появляется только на роботе. При запуске trikGui под виндой все отображалось корректно.
Например при выполнении такого скрипта:

var __interpretation_started_timestamp__;
var pi = 3.1415926535897931;
var SYMBOL_WIDTH = 10;
var SYMBOL_HEIGHT = 20;
var SCREEN_WIDTH = 240;
var SCREEN_HEIGHT = 279;


var main = function()
{
	__interpretation_started_timestamp__ = Date.now();
	
	var map = {a: "a", b: "b", c: "c", d: "d", e: "e", f: "f", g: "g", h: "h", i: "i", j: "j", k: "k", l: "l",
		m: "m", n: "n", o: "o",	p: "p", q: "q", r: "r", s: "s", t: "t", u: "u", v: "v", w: "w", x: "x", y: "y", z: "z",
		K: "ackd", V: "opeva", W: "word", X: "poxl", Ke: "acdk", Ve: "opeav", We: "wordw", Xe: "pox"};
// все буквы алфавита
// слова с "проблемными" буквами в середине
// слова с "проблемными" буквами на конце

	while (true) {
		var checkStr = "kvwx";
		for (var i = 0; i < 4; i++) {
			brick.display().addLabel(checkStr.charAt(i), 1 + 2 * SYMBOL_WIDTH * i, 1);
			//brick.display().addLabel("k", 1 + , 1);
		}
		var numberOfLines = 1;
		var counter = 0;
		var wordStartX = 1 + (SCREEN_WIDTH / 4) * counter;
		for (var key in map) {
			wordStartX = 1 + (SCREEN_WIDTH / 4) * counter;
			brick.display().addLabel(key + ": " + map[key], wordStartX, SYMBOL_HEIGHT * numberOfLines);
			numberOfLines++;
			if (numberOfLines > (SCREEN_HEIGHT - SYMBOL_HEIGHT) / SYMBOL_HEIGHT) {
				counter++;
				numberOfLines = 1;
			}
		}
		brick.display().redraw();
		script.wait(200);
	}
	return;
}

Мы получим такую картинку на роботе:
image
При запуске из сборки на пк:
image

@khodand khodand changed the title some letters are displaying incorrectly Some letters are displaying incorrectly on TRIK Controller May 17, 2019
@iakov
Copy link
Member

iakov commented May 29, 2019

Надо будет посмотреть на прошивке new_age, там всё иначе и Qt5.12. И на десктопе собрать с Qt5.8, вдруг воспроизведётся. На 5.12 на десктопе баг не воспроизводится.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants