personal changes
Fork of FSR by
Revision 6:71a6328709ea, committed 2017-05-03
- Comitter:
- jd0205
- Date:
- Wed May 03 21:01:09 2017 +0000
- Parent:
- 5:d9520bf7eb9e
- Commit message:
- Just personal changes
Changed in this revision
| FSR.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/FSR.cpp Thu Oct 22 17:06:17 2015 +0000
+++ b/FSR.cpp Wed May 03 21:01:09 2017 +0000
@@ -14,13 +14,13 @@
float FSR::readFSRResistance()
{
float read = _ain;
- return _r * 1 / read - _r;
+ return _r * (1 - read) / read;
}
float FSR::readWeight()
{
float read = _ain;
- float rfsr = _r * 1 / read - _r;
+ float rfsr = _r * (1 - read) / read;
float slope = (4 - 2) / (log10(6.2) - log10(0.25));
float a = log10(rfsr);
if (a < log10(6.2))
