Monitoring du Phytotron
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

funcs.c 493B

1234567891011121314151617181920212223242526
  1. #include <stdio.h>
  2. #include "serial.h"
  3. extern int verbosity;
  4. /* ---------------------------------------------------------------- */
  5. int parseXvalue(char *line, char cflag)
  6. {
  7. int value, foo;
  8. int vrd[4];
  9. value=0;
  10. foo = sscanf(data+1, "%d %d %d %d", vrd, vrd+1, vrd+2, vrd+3);
  11. fprintf(stderr, "sscanf -> %d\n", foo);
  12. if (4 != foo) {
  13. return -666;
  14. }
  15. for (foo=0; foo<4; foo++) {
  16. value += vrd[foo];
  17. }
  18. return value;
  19. }
  20. /* ---------------------------------------------------------------- */