aboutsummaryrefslogtreecommitdiff
path: root/src/survive_turveybiguator.c
diff options
context:
space:
mode:
authorJustin Berger <j.david.berger@gmail.com>2018-04-20 22:31:18 -0600
committerJustin Berger <j.david.berger@gmail.com>2018-04-20 22:50:20 -0600
commita1027bceebb36afc4fa9d082277478abd8101eda (patch)
treef9692cad198f8e39e4fa0fe6cdd4cf1d5abcef5c /src/survive_turveybiguator.c
parent3c007f47a30b70f00fd642b14ef8f4127c46ffc3 (diff)
downloadlibsurvive-a1027bceebb36afc4fa9d082277478abd8101eda.tar.gz
libsurvive-a1027bceebb36afc4fa9d082277478abd8101eda.tar.bz2
Enabled and then cleaned up warnings
Diffstat (limited to 'src/survive_turveybiguator.c')
-rw-r--r--src/survive_turveybiguator.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/survive_turveybiguator.c b/src/survive_turveybiguator.c
index 8dbce46..5b10e63 100644
--- a/src/survive_turveybiguator.c
+++ b/src/survive_turveybiguator.c
@@ -155,8 +155,8 @@ static uint8_t remove_outliers(SurviveObject *so) {
// uint8_t removed_outliers = 0;
- uint32_t d1 = abs(*min - mean);
- uint32_t d2 = abs(*max - mean);
+ uint32_t d1 = mean - *min;
+ uint32_t d2 = *max - mean;
if (d1 > d2) {
if (d1 > tau_test) {
@@ -199,6 +199,7 @@ static void handle_lightcap2_process_sweep_data(SurviveObject *so) {
{
unsigned int longest_pulse = 0;
unsigned int timestamp_of_longest_pulse = 0;
+ (void)timestamp_of_longest_pulse;
for (int i = 0; i < SENSORS_PER_OBJECT; i++) {
if (lcd->sweep.sweep_len[i] > longest_pulse) {
longest_pulse = lcd->sweep.sweep_len[i];
@@ -216,6 +217,7 @@ static void handle_lightcap2_process_sweep_data(SurviveObject *so) {
{
static int counts[SENSORS_PER_OBJECT][2] = {0};
+ (void)counts;
// if (lcd->per_sweep.activeLighthouse == 0 && !allZero)
if (lcd->per_sweep.activeLighthouse > -1 && !allZero) {