more debug msg

This commit is contained in:
tth 2021-07-23 23:30:52 +02:00
parent 6a1fc34031
commit 95046aa71d

View File

@ -46,6 +46,8 @@ printf(stderr, "%s : %s %s %d\n", __func__, path, types, argc);
if (verbosity) { if (verbosity) {
sprintf(ligne, "%s %s %s %d\n", __func__, path, types, argc); sprintf(ligne, "%s %s %s %d\n", __func__, path, types, argc);
mvaddstr(2, 2, ligne); mvaddstr(2, 2, ligne);
sprintf(ligne, "button : %6d %6d", argv[0]->i, argv[1]->i);
mvaddstr(3, 2, ligne);
refresh(); refresh();
} }
@ -54,6 +56,8 @@ if (-1 == erase_button) return 0;
if ( (argv[0]->i == erase_button) && if ( (argv[0]->i == erase_button) &&
(argv[1]->i == 0) ) { (argv[1]->i == 0) ) {
must_erase = 1; must_erase = 1;
mvaddstr(3, 2, "KILL ! KILL !");
refresh();
} }
return 0; return 0;
@ -116,7 +120,7 @@ if (verbosity) {
} }
/* erase the old spot */ /* erase the old spot */
if (old_l) mvaddch(old_l, old_c, current_char); if (old_l || old_c) mvaddch(old_l, old_c, current_char);
standout(); standout();
mvaddch(cur_l, cur_c, '#'); mvaddch(cur_l, cur_c, '#');
@ -169,9 +173,9 @@ fprintf(stderr, "erase %d\n", erase_button);
st = lo_server_thread_new(local_port, error); st = lo_server_thread_new(local_port, error);
foo = initcurses(); foo = initcurses();
sprintf(ligne, ":%s ", local_port); sprintf(ligne, ":%s e=%d ", local_port, erase_button);
foo = draw_main_screen(ligne, 0); foo = draw_main_screen(ligne, 0);
if (verbosity) fprintf(stderr, "dms %d\n", foo); // if (verbosity) fprintf(stderr, "dms %d\n", foo);
lo_server_thread_add_method(st, "/joystick/xy", "ii", xy_handler, NULL); lo_server_thread_add_method(st, "/joystick/xy", "ii", xy_handler, NULL);
lo_server_thread_add_method(st, "/joystick/b", "ii", button_handler, NULL); lo_server_thread_add_method(st, "/joystick/b", "ii", button_handler, NULL);