update du couvre-feu
This commit is contained in:
parent
5029f59dd0
commit
7cc708c0fd
@ -26,3 +26,13 @@ défini par la teamlaser. Hélas, le soft de Sam n'étant pas très stable, ce l
|
|||||||
n'a pas été vraiment testé sur le système réel.
|
n'a pas été vraiment testé sur le système réel.
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
<tth> vos lasers, la déviation elle se fait à quelle fréquence maxi ?
|
||||||
|
<sammmm> plop
|
||||||
|
<sammmm> voila une reponse si j'ai bien compris la question.
|
||||||
|
<sammmm> Le plus rapide de nos lasers peut tracer 30 000 pts /sec avec un angle max de 8°
|
||||||
|
<sammmm> Apres si tu traces que 2 points plus proches que 8° le nombre d'oscillations va etre plus elevé evidement puisqu'il faudra moins de tps pour aller au pts suivant puisqu'il est plus pres.
|
||||||
|
<sammmm> en resumé la frequence maxi est inversement proportionnelle a la deviation.
|
||||||
|
<sammmm> plus tu devies plus ca va etre long a tracer donc plus la frequence baisse.
|
||||||
|
```
|
||||||
|
|
||||||
|
@ -121,7 +121,10 @@ if (verbosity) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
foo = blast_init(remote_host, remote_port, scenenumber, lasernumber);
|
foo = blast_init(remote_host, remote_port, scenenumber, lasernumber);
|
||||||
|
if (foo) {
|
||||||
|
fprintf(stderr, "blast init error : %d\n", foo);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
st = lo_server_thread_new(local_port, error);
|
st = lo_server_thread_new(local_port, error);
|
||||||
lo_server_thread_add_method(st, "/joystick/xy", "ii", xy_handler, NULL);
|
lo_server_thread_add_method(st, "/joystick/xy", "ii", xy_handler, NULL);
|
||||||
|
@ -19,12 +19,17 @@ static char big_buffer[BUFF_SIZE+2];
|
|||||||
static int curpos;
|
static int curpos;
|
||||||
static int la_scene, le_laser;
|
static int la_scene, le_laser;
|
||||||
static lo_address lo_addr;
|
static lo_address lo_addr;
|
||||||
|
static int x_scale, y_scale;
|
||||||
|
|
||||||
extern int verbosity;
|
extern int verbosity;
|
||||||
|
|
||||||
/* ------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------- */
|
||||||
int blast_init(char *host, char *port, int scene, int laser)
|
int blast_init(char *host, char *port, int scene, int laser)
|
||||||
{
|
{
|
||||||
|
#if DEBUG_LEVEL
|
||||||
|
fprintf(stderr, ">>> %s ( '%s:%p' %d %d )\n", __func__, host, port,
|
||||||
|
scene, laser);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* prepare OSC transmission */
|
/* prepare OSC transmission */
|
||||||
lo_addr = lo_address_new(host, port);
|
lo_addr = lo_address_new(host, port);
|
||||||
@ -33,11 +38,26 @@ if (verbosity) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
la_scene = scene, le_laser = laser;
|
la_scene = scene, le_laser = laser;
|
||||||
|
x_scale = y_scale = 700;
|
||||||
|
|
||||||
/* manage our internals memories */
|
/* manage our internals memories */
|
||||||
big_buffer[0] = '\0'; /* clear buffer */
|
big_buffer[0] = '\0'; /* clear buffer */
|
||||||
curpos = 0; /* index in buffer */
|
curpos = 0; /* index in buffer */
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
/* ------------------------------------------------------------------- */
|
||||||
|
int blast_setscale(int width, int height)
|
||||||
|
{
|
||||||
|
#if DEBUG_LEVEL
|
||||||
|
fprintf(stderr, ">>> %s ( %d %d )\n", __func__, width, height);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* no validity check ? */
|
||||||
|
|
||||||
|
x_scale = width;
|
||||||
|
y_scale = height;
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
/* ------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------- */
|
||||||
@ -61,8 +81,7 @@ int foo, sz;
|
|||||||
|
|
||||||
sz = sprintf(buff, "(%.2f, %.2f, %ld),", x, y, col);
|
sz = sprintf(buff, "(%.2f, %.2f, %ld),", x, y, col);
|
||||||
|
|
||||||
if (verbosity > 1)
|
if (verbosity > 1) fprintf(stderr, "%s --> %s\n", __func__, buff);
|
||||||
fprintf(stderr, "%s --> %s\n", __func__, buff);
|
|
||||||
|
|
||||||
/* check free space in bigbuffer */
|
/* check free space in bigbuffer */
|
||||||
if ( (curpos+sz) > BUFF_SIZE ) {
|
if ( (curpos+sz) > BUFF_SIZE ) {
|
||||||
@ -83,8 +102,7 @@ char buffer[100];
|
|||||||
/* we have to kill the last ',' in the big buff before send */
|
/* we have to kill the last ',' in the big buff before send */
|
||||||
big_buffer[curpos-1] = ']'; big_buffer[curpos] = '\0';
|
big_buffer[curpos-1] = ']'; big_buffer[curpos] = '\0';
|
||||||
|
|
||||||
if (verbosity)
|
if (verbosity) fprintf(stderr, "BLAST %s\n", big_buffer);
|
||||||
fprintf(stderr, "BLAST %s\n", big_buffer);
|
|
||||||
|
|
||||||
sprintf(buffer, "/pl/%d/%d", la_scene, le_laser);
|
sprintf(buffer, "/pl/%d/%d", la_scene, le_laser);
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
int blast_init(char *host, char *port, int scene, int laser);
|
int blast_init(char *host, char *port, int scene, int laser);
|
||||||
int blast_rewind(void);
|
int blast_rewind(void);
|
||||||
|
int blast_setscale(int width, int height);
|
||||||
|
|
||||||
int blast_addpoint(float fx, float fy, long col);
|
int blast_addpoint(float fx, float fy, long col);
|
||||||
int blast_flush(int notused);
|
int blast_flush(int notused);
|
||||||
|
Loading…
Reference in New Issue
Block a user