diff --git a/examples/torture.c b/examples/torture.c index 59e67ba..42ebeea 100644 --- a/examples/torture.c +++ b/examples/torture.c @@ -28,10 +28,10 @@ #include #define MONOME_OSC "osc.udp://127.0.0.1:8080/monome" -#define MONOME_SERIAL "/dev/ttyUSB0" +#define MONOME_SERIAL "/dev/ttyACM0" #define WIDTH 16 -#define HEIGHT 16 +#define HEIGHT 8 void random_chill() { struct timespec rem, req; @@ -47,7 +47,7 @@ int main(int argc, char **argv) { unsigned int w, h, y, s; uint16_t buf; - if( !(monome = monome_open(MONOME_OSC, "8000")) ) { + if( !(monome = monome_open(MONOME_SERIAL, "8000")) ) { fprintf(stderr, "couldn't open monome\n"); exit(EXIT_FAILURE); } diff --git a/src/platform/posix.c b/src/platform/posix.c index d610bef..f1ba899 100644 --- a/src/platform/posix.c +++ b/src/platform/posix.c @@ -99,7 +99,7 @@ int monome_platform_open(monome_t *monome, const monome_devmap_t *m, struct termios nt, ot; int fd; - if( (fd = open(dev, O_RDWR | O_NOCTTY | O_NONBLOCK)) < 0 ) { + if( (fd = open(dev, O_RDWR | O_NOCTTY)) < 0 ) { perror("libmonome: could not open monome device"); return 1; } @@ -131,7 +131,7 @@ int monome_platform_open(monome_t *monome, const monome_devmap_t *m, nt.c_oflag &= ~(OCRNL | ONLCR | ONLRET | ONOCR | OFILL | OPOST); - nt.c_cc[VMIN] = 1; + nt.c_cc[VMIN] = 0; nt.c_cc[VTIME] = 0; if( tcsetattr(fd, TCSANOW, &nt) < 0 )