if (ir->valid) {
/* Give it some slack for missing one or two... */
- if (time_since_last_ir <= 3) {
+ if (time_since_last_ir <= 5) {
struct line_segment *n = malloc(sizeof(*n));
/* Wiimote coordinates are backwards for us. */
- n->start.x = MAX_X - last_ir.pos[0];
+ n->start.x = last_ir.pos[0];
n->start.y = MAX_Y - last_ir.pos[1];
- n->end.x = MAX_X - ir->pos[0];
+ n->end.x = ir->pos[0];
n->end.y = MAX_Y - ir->pos[1];
n->ignore = false;
timeradd(&now, &line_life, &n->expires);