aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorcnlohr <lohr85@gmail.com>2016-12-20 22:44:10 -0500
committercnlohr <lohr85@gmail.com>2016-12-20 22:44:10 -0500
commit093802f9cc7ebaa0bfe8d862766e7e08026576f0 (patch)
tree1336b7d27114f73b5c9f60a4f8b0850d40edf735 /include
parentbbb1ef6a917a3e0b94c8278b3c6643b523aad5c0 (diff)
downloadlibsurvive-093802f9cc7ebaa0bfe8d862766e7e08026576f0.tar.gz
libsurvive-093802f9cc7ebaa0bfe8d862766e7e08026576f0.tar.bz2
switch to a hidden disambiguator.
Diffstat (limited to 'include')
-rw-r--r--include/disambiguator.h38
-rw-r--r--include/survive.h3
2 files changed, 1 insertions, 40 deletions
diff --git a/include/disambiguator.h b/include/disambiguator.h
deleted file mode 100644
index a17fc8d..0000000
--- a/include/disambiguator.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// (C) 2016 Julian Picht, MIT/x11 License.
-//
-//All MIT/x11 Licensed Code in this file may be relicensed freely under the GPL or LGPL licenses.
-#ifndef DISAMBIGUATOR_H
-#define DISAMBIGUATOR_H
-
-#define DIS_NUM_VALUES 8
-
-typedef enum {
- D_STATE_INVALID = 0,
- D_STATE_LOCKED = 1,
- D_STATE_UNLOCKED = -1,
-} dis_state;
-
-typedef enum {
- P_UNKNOWN = 0,
- P_SYNC = 1,
- P_SWEEP = 2,
-} pulse_type;
-
-typedef struct disambiguator_ {
- long times[DIS_NUM_VALUES];
- int scores[DIS_NUM_VALUES];
- dis_state state;
- long last;
- int max_confidence;
- char code;
-} disambiguator;
-
-typedef struct classified_pulse_ {
- pulse_type t;
- int length;
-} classified_pulse;
-
-void disambiguator_init(disambiguator * d);
-pulse_type disambiguator_step(disambiguator * d, long time, int length);
-
-#endif /* DISAMBIGUATOR_H */ \ No newline at end of file
diff --git a/include/survive.h b/include/survive.h
index e29c82b..889e24d 100644
--- a/include/survive.h
+++ b/include/survive.h
@@ -1,7 +1,6 @@
#ifndef _SURVIVE_H
#define _SURVIVE_H
-#include "disambiguator.h"
#include <stdint.h>
#define SV_FLOAT double
@@ -38,7 +37,7 @@ struct SurviveObject
int32_t total_photo_time;
int32_t total_pulsecode_time;
#else
- disambiguator d;
+ struct disambiguator * d;
#endif
};