Skip to content
Snippets Groups Projects
Commit f504c872 authored by ftomi's avatar ftomi
Browse files

Exit on input

parent 3355813b
Branches
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@
#include <unistd.h>
#include <stdio.h>
#include <string>
#include <poll.h>
int main()
{
......@@ -19,17 +19,18 @@ int main()
printf("Going idle\n");
while (1)
{
struct pollfd mypoll = {STDIN_FILENO, POLLIN | POLLPRI};
ola_run_once();
if (matrixserver.receive())
{
spisender.updateFrame(matrixserver.getFrame());
}
if (poll(&mypoll, 1, 0))
{
break;
}
}
char k;
scanf("%c", &k);
printf("Ending\n");
ola_deinit();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment