pipe led.plotbargraph through console.log (#1557)

This commit is contained in:
Peli de Halleux 2018-10-29 22:09:28 -07:00 committed by GitHub
parent 966e7a44c8
commit 7783efc9bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@ namespace console {
//%
export function addListener(listener: (text: string) => void) {
if (!listener) return;
if (!listener)
if (!listeners)
listeners = [];
listeners.push(listener);
}

View File

@ -20,7 +20,7 @@
//% parts="ledmatrix"
export function plotBarGraph(value: number, high: number): void {
const now = input.runningTime();
serial.writeLine(value.toString());
console.logValue("", value);
value = Math.abs(value);
// auto-scale "high" is not provided