Skip to content

Commit

Permalink
Change leak threshold back to 0.85
Browse files Browse the repository at this point in the history
This almost eliminates false positives when the analogin pin is floating
  • Loading branch information
kevin1 committed Jun 18, 2013
1 parent 50eed27 commit 09aa19f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/global.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
#include "pc.h"

//analoginput.h
// TODO: check the magic threshold 0.85f. Too high/low?
// Analog inputs' thresholds need to be around 0.85 because when the mbed's
// AnalogIn pins are floating, the noise may make them oscillate between 0.0 and
// 0.6. This avoids false positives/negatives when we're testing out of the sub.
AnalogKillSwitch kill(p16, p18, 0.85f); // Vin, Vout

// Threshold determined experimentally with tap water
LeakDetector leakDetector(p20, 0.5f); //pin 20
LeakDetector leakDetector(p20, 0.85f); //pin 20

/*
* Daniel's was depth = adc_buffer[ADC_PRESS] * 0.361904762 - 101.33333;
Expand Down

1 comment on commit 09aa19f

@jchen1
Copy link
Member

@jchen1 jchen1 commented on 09aa19f Jun 18, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ha i knew 0.85 would work

Please sign in to comment.