aboutsummaryrefslogtreecommitdiff
path: root/src/survive_data.c
diff options
context:
space:
mode:
authormwturvey <michael.w.turvey@intel.com>2017-03-24 15:19:59 -0700
committermwturvey <michael.w.turvey@intel.com>2017-03-24 15:19:59 -0700
commit4dc1d72785c660c206f8def9d8c8aa32289c2709 (patch)
treeb6b06ee4504ac4afd76a885343373919e120341b /src/survive_data.c
parentf7d1c19e299df46087eb8693d2d0c0637d2e395f (diff)
downloadlibsurvive-4dc1d72785c660c206f8def9d8c8aa32289c2709.tar.gz
libsurvive-4dc1d72785c660c206f8def9d8c8aa32289c2709.tar.bz2
More cleanup & finishing genericization of calibrator
Diffstat (limited to 'src/survive_data.c')
-rw-r--r--src/survive_data.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/survive_data.c b/src/survive_data.c
index 4e2479a..9447104 100644
--- a/src/survive_data.c
+++ b/src/survive_data.c
@@ -25,7 +25,7 @@ typedef struct
typedef struct
{
- float acode_offset;
+ double acode_offset;
} lightcap2_global_data;
typedef struct
@@ -40,11 +40,11 @@ typedef struct
int handle_lightcap2_getAcodeFromSyncPulse(SurviveObject * so, int pulseLen)
{
- float oldOffset = ((lightcap2_data*)so->disambiguator_data)->global.acode_offset;
+ double oldOffset = ((lightcap2_data*)so->disambiguator_data)->global.acode_offset;
int modifiedPulseLen = pulseLen - (int)oldOffset;
- float newOffset = (((pulseLen) + 250) % 500) - 250;
+ double newOffset = (((pulseLen) + 250) % 500) - 250;
((lightcap2_data*)so->disambiguator_data)->global.acode_offset = oldOffset * 0.9 + newOffset * 0.1;