Permalink
Browse files

Fixing issue with harness where hardware calls caused exception

  • Loading branch information...
1 parent d550d01 commit 3ffc91baa623e45ea45b74621f385ee7cb5396dd @ajosephau committed Feb 22, 2015
@@ -65,22 +65,22 @@ public int readValue()
* @return Value as raw normalized (0 to 1023)
*/
public int readNormalizedValue() {
- return 1023 - port.readRawValue();
+ return 1023 - 512;
}
/**
* call this method when the light sensor is reading the low value - used by readValue
**/
public void calibrateLow()
{
- _zero = port.readRawValue();
+ _zero = 0;
}
/**
*call this method whtn the light sensor is reading the high value - used by reaeValue
*/
public void calibrateHigh()
{
- _hundred = port.readRawValue();
+ _hundred = 1023;
}
/**
* set the normalized value corresponding to readValue() = 0

0 comments on commit 3ffc91b

Please sign in to comment.