diff --git a/libs/core/screen.ts b/libs/core/screen.ts index f70dc6e1..7d5894c4 100644 --- a/libs/core/screen.ts +++ b/libs/core/screen.ts @@ -221,10 +221,14 @@ namespace brick { // motors const datas = motors.getAllMotorData(); for(let i = 0; i < datas.length; ++i) { - const x = i * 52; const data = datas[i]; + if (!data.actualSpeed && !data.count) continue; + const x = i * 52; print(`${data.actualSpeed}%`, x, brick.LINE_HEIGHT) print(`${data.count}>`, x, 2 * brick.LINE_HEIGHT) + + console.logValue(`speed.` + "ABCD"[i], data.actualSpeed); + console.logValue(`angle.` + "ABCD"[i], data.count); } // sensors @@ -232,7 +236,10 @@ namespace brick { for(let i =0; i < sis.length; ++i) { const si = sis[i]; const x = (si.port() - 1) * 52; - print(`${si._query()}`, x, 9 * brick.LINE_HEIGHT) + const v = si._query(); + print(`${v}`, x, 9 * brick.LINE_HEIGHT) + + console.logValue(`sensor.` + si.port(), v); } } } \ No newline at end of file