grosse flemme aujouird'hui
This commit is contained in:
parent
a73be232cd
commit
349e0ca2b0
@ -1,7 +1,7 @@
|
||||
#
|
||||
# dd2 monitoring
|
||||
#
|
||||
# buil the core functions, use with care
|
||||
# build the core functions, use with care
|
||||
#
|
||||
|
||||
|
||||
|
@ -9,12 +9,14 @@ typedef struct {
|
||||
int valid;
|
||||
|
||||
char *input_device;
|
||||
int input_speed;
|
||||
|
||||
|
||||
} Configuration;
|
||||
|
||||
/* ---------------------------------------------------------------- */
|
||||
|
||||
int set_default_config(Configuration *cfg);
|
||||
int parse_config(char *fname, int flags);
|
||||
int show_config(char *title);
|
||||
|
||||
|
@ -1,10 +1,12 @@
|
||||
#
|
||||
#
|
||||
# experimental config file
|
||||
#
|
||||
|
||||
# --------------------------------------------------
|
||||
# serial input from the control cpu
|
||||
|
||||
input_device s /dev/ttyACM0
|
||||
input_speed s 9600
|
||||
|
||||
|
||||
|
||||
input_speed i 9600
|
||||
|
||||
# --------------------------------------------------
|
||||
# --------------------------------------------------
|
||||
|
@ -3,6 +3,7 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "config.h"
|
||||
@ -74,6 +75,15 @@ while (fgets(line, SZ_STRINGS, fp))
|
||||
config.input_device = strdup(strtok(NULL, " \t"));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (CMP("input_speed")) {
|
||||
config.input_speed = atoi(strtok(NULL, " \t"));
|
||||
#if DEBUG_LEVEL
|
||||
fprintf(stderr, "input speed = %d\n", config.input_speed);
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
@ -90,6 +100,7 @@ if (verbosity) {
|
||||
|
||||
printf("valid : %d\n", config.valid);
|
||||
printf("input device : %s\n", config.input_device);
|
||||
printf("input speed : %d\n", config.input_speed);
|
||||
|
||||
puts("");
|
||||
return 0;
|
||||
|
@ -331,8 +331,8 @@ En fait, tout reste à faire. Mais ça peut être un beau projet
|
||||
aux implications et usages multiples.
|
||||
|
||||
Un couteau suisse de la capture du monde réel, un point pivot
|
||||
de nos diverses interprétations du
|
||||
monde\footnote{non, la terre n'est pas plate} et des interactions
|
||||
de nos diverses interprétations de
|
||||
l'univers\footnote{non, la terre n'est pas plate} et des interactions
|
||||
étranges entre des paramètres sans relation clairement definie.
|
||||
|
||||
% -------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user