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

corrupted size vs. prev_size error #32

Open
mistic100 opened this issue Jul 2, 2022 · 0 comments
Open

corrupted size vs. prev_size error #32

mistic100 opened this issue Jul 2, 2022 · 0 comments

Comments

@mistic100
Copy link

mistic100 commented Jul 2, 2022

My setup

  • Raspberry Pi Zero W
  • Adafruit HAT (clone)
  • 64x32 1/16 RGB matrix
  • Raspbian Lite 11
  • Node 16.15

The code

import { Font, GpioMapping, LedMatrix } from 'rpi-led-matrix';
import process from 'process';

const matrix = new LedMatrix(
    {
        ...LedMatrix.defaultMatrixOptions(),
        rows: 32,
        cols: 64,
        hardwareMapping: GpioMapping.AdafruitHat,
    },
    {
        ...LedMatrix.defaultRuntimeOptions(),
    }
);

process.on('SIGINT', () => { 
    matrix.clear().sync();
});

const font = new Font('5x7', `${process.cwd()}/node_modules/rpi-led-matrix/fonts/5x7.bdf`);

matrix.afterSync((matrix, dt, t) => {
    setTimeout(() => matrix.sync());
});

matrix
    .clear()
    .brightness(100)
    .fgColor(0x00adff)
    .drawRect(0, 0, 63, 31)
    .font(font)
    .fgColor(0xff0000)
    .drawText('Hello', 1, 1)
    .drawText('World', 1, 8)
    .sync();

Behavior

The display is initially correct then after 10 seconds the program stops with

corrupted size vs. prev_size
Aborted

Note : I have no problems with the examples of hzeller/rpi-rgb-led-matrix

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

1 participant