mirror of
https://github.com/Hopiu/rpi-rgb-led-matrix.git
synced 2026-03-16 22:10:27 +00:00
o Output resulting size after pixel mapping.
o Always print reason for exit. Print it after Matrix has been shut down, so that we print after the last refresh-rate output has been done, thus we end with a clean newline at end of our output. (otherwise, the command-line editing afterwards is a little challenging as bash has trouble when the prompt does not start at zero)
This commit is contained in:
parent
b008c315ff
commit
58ca02982e
1 changed files with 4 additions and 1 deletions
|
|
@ -1160,6 +1160,8 @@ int main(int argc, char *argv[]) {
|
|||
matrix->ApplyStaticTransformer(RotateTransformer(rotation));
|
||||
}
|
||||
|
||||
printf("Size: %dx%d\n", matrix->width(), matrix->height());
|
||||
|
||||
Canvas *canvas = matrix;
|
||||
|
||||
// The ThreadedCanvasManipulator objects are filling
|
||||
|
|
@ -1245,12 +1247,13 @@ int main(int argc, char *argv[]) {
|
|||
while (!interrupt_received) {
|
||||
sleep(1); // Time doesn't really matter. The syscall will be interrupted.
|
||||
}
|
||||
fprintf(stderr, "\nReceived interrupt. Stopping.\n");
|
||||
}
|
||||
|
||||
// Stop image generating thread. The delete triggers
|
||||
delete image_gen;
|
||||
delete canvas;
|
||||
|
||||
printf("\%s. Exiting.\n",
|
||||
interrupt_received ? "Received CTRL-C" : "Timeout reached");
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue