Skip to content

Commit

Permalink
Heroc: Report 0 instead of max lux on wrong read
Browse files Browse the repository at this point in the history
Borrowed from Bravo/Bravoc.

Change-Id: Ic7471cd3e44657ed202ace1d5b8556505dafd8a5
  • Loading branch information
JasonMaloney committed May 14, 2011
1 parent 0baa767 commit 71da859
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libsensors/LightSensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,6 @@ float LightSensor::indexToValue(size_t index) const

const size_t maxIndex = sizeof(luxValues)/sizeof(*luxValues) - 1;
if (index > maxIndex)
index = maxIndex;
index = 0;
return luxValues[index];
}

0 comments on commit 71da859

Please sign in to comment.