aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJulian Picht <julian.picht@gmail.com>2016-12-27 00:27:15 +0100
committerJulian Picht <julian.picht@gmail.com>2016-12-27 01:11:10 +0100
commit1c0f4c0ed344512153dd48941409f68bd751045a (patch)
tree92138098ad028c4626ae3fcdc3023cacf6278f84 /tools
parent5a1236b603b6882be2ae3af11936d135bf31b7bd (diff)
downloadlibsurvive-1c0f4c0ed344512153dd48941409f68bd751045a.tar.gz
libsurvive-1c0f4c0ed344512153dd48941409f68bd751045a.tar.bz2
disambiguator tool output update
Diffstat (limited to 'tools')
-rw-r--r--tools/disambiguate/disambiguate.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/tools/disambiguate/disambiguate.c b/tools/disambiguate/disambiguate.c
index 938a72f..6e468dd 100644
--- a/tools/disambiguate/disambiguate.c
+++ b/tools/disambiguate/disambiguate.c
@@ -36,22 +36,18 @@ int main() {
lastl = time;
if (strcmp(controller, "HMD") != 0) continue;
+ char cc = (length - 2750) / 500;
switch (disambiguator_step(&d, time, length)) {
default:
case P_UNKNOWN:
//printf("UNKN %s %2d %d %d\n", controller, sensor, time - last, length);
continue;
case P_MASTER:
+ printf("MASTR %s %2d %10d %5d %c%d %10d\n", controller, sensor, time, length, (cc & 0x1) ? 'k' : 'j', (cc >> 1) & 0x3, time-last);
+ last = time;
+ continue;
case P_SLAVE:
- {
- char cc = (length - 2750) / 500;
- if (cc & 0x4) {
- printf("SKIP %s %2d %10d %5d %c%d %10d\n", controller, sensor, time, length, (cc & 0x1) ? 'k' : 'j', (cc >> 1) & 0x3, time-last);
- } else {
- printf("SYNC %s %2d %10d %5d %c%d %10d\n", controller, sensor, time, length, (cc & 0x1) ? 'k' : 'j', (cc >> 1) & 0x3, time-last);
- last = time;
- }
- }
+ printf("SLAVE %s %2d %10d %5d %c%d %10d\n", controller, sensor, time, length, (cc & 0x1) ? 'k' : 'j', (cc >> 1) & 0x3, time-last);
continue;
case P_SWEEP:
printf("SWEEP %s %2d %10d %5d\n", controller, sensor, time - last, length);
@@ -60,4 +56,3 @@ int main() {
}
fclose(f);
}
-