working on serial protocol

This commit is contained in:
2019-01-28 14:42:33 +01:00
parent 054d0f574c
commit 15c6cbd8ae
5 changed files with 25 additions and 7 deletions

View File

@@ -37,7 +37,7 @@ for (count=0; count<iters; count++) {
//
if (foo >= 0) {
temps = time(NULL);
values2temps(datas);
values2temperature(datas);
printf("%ld %f %f %f %f\n", temps,
datas[0], datas[1], datas[2], datas[3]);
fflush(stdout);
@@ -75,6 +75,11 @@ while ((opt = getopt(argc, argv, "d:n:v")) != -1) {
}
if (verbosity) {
fprintf(stderr, "Testing Serial Software - compiled " \
__DATE__ " " __TIME__ "\n");
}
serial_in = prepare_UART(device, speed);
if (serial_in < 0) {
fprintf(stderr, "%s : open device : error %d on %s\n",