Compare commits
No commits in common. "3301315367c95dc4d496cdde657f55d6a09435c1" and "dea4232d8eb0923b86f6e51b2c9a5ccec74e1e0b" have entirely different histories.
3301315367
...
dea4232d8e
@ -65,7 +65,7 @@ int foo, opt;
|
||||
|
||||
fprintf(stderr, "GabyLaser - compiled %s %s\n", __DATE__, __TIME__);
|
||||
|
||||
while ((opt = getopt(argc, argv, "hp:v")) != -1) {
|
||||
while ((opt = getopt(argc, argv, "hp:vE:C:")) != -1) {
|
||||
switch (opt) {
|
||||
case 'h': if (help(0)) exit(1); break;
|
||||
case 'p': local_port = optarg; break;
|
||||
@ -90,6 +90,7 @@ if (foo < 0) {
|
||||
/*
|
||||
* infinite loop is infinite
|
||||
*/
|
||||
|
||||
for (;;) {
|
||||
if (verbosity)
|
||||
fprintf(stderr, "t = %ld\n", time(NULL));
|
||||
|
@ -44,13 +44,9 @@ return -1;
|
||||
int button_handler(const char *path, const char *types, lo_arg ** argv,
|
||||
int argc, void *data, void *user_data)
|
||||
{
|
||||
int foo;
|
||||
|
||||
fprintf(stderr, ">>> %s ( '%s' '%s' )\n", __func__, path, types);
|
||||
|
||||
foo = send_button(argv[0]->i, argv[1]->i);
|
||||
|
||||
|
||||
return -1;
|
||||
}
|
||||
/* ---------------------------------------------------------------- */
|
||||
|
@ -97,30 +97,3 @@ return 0;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------- */
|
||||
/*
|
||||
* comment gerer le up/down des boutons ?
|
||||
*/
|
||||
|
||||
int send_button(int number, int state)
|
||||
{
|
||||
char message[100];
|
||||
|
||||
if (fdtx < 0) {
|
||||
fprintf(stderr, "%s: fdtx not initialized !\n", __func__);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (number<0 || number>16) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
sprintf(message, "T%01x%1x", number, state);
|
||||
fprintf(stderr, "%s ----> '%s'\n", __func__, message);
|
||||
foo = write(fdtx, message, 3);
|
||||
if (3 != foo) {
|
||||
perror("write ?");
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/* ---------------------------------------------------------------- */
|
||||
|
@ -9,5 +9,3 @@
|
||||
int init_transmit(char *fname, int k);
|
||||
int send_position(char xy, int value);
|
||||
|
||||
int send_button(int number, int state);
|
||||
|
||||
|
@ -1,10 +0,0 @@
|
||||
# trucs en ChucK
|
||||
|
||||
## dessiner.ck
|
||||
|
||||
## pouet.ck
|
||||
|
||||
## midi2osc.ck
|
||||
|
||||
## zwouik.ck
|
||||
|
@ -1,10 +0,0 @@
|
||||
/*
|
||||
* recevoir des notes on/off par le MIDI
|
||||
* et envoyer des boutons de joy par OSC
|
||||
*
|
||||
* nouveau Rural Art System 2021 - TerreBlanque
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user