![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Lab 4
Revision 2:ac894e4cff0d, committed 2016-03-14
- Comitter:
- mikeb
- Date:
- Mon Mar 14 14:03:53 2016 +0000
- Parent:
- 1:f68acb38a472
- Commit message:
- Final;
Changed in this revision
ACS712.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/ACS712.h Mon Mar 14 13:44:12 2016 +0000 +++ b/ACS712.h Mon Mar 14 14:03:53 2016 +0000 @@ -45,14 +45,18 @@ * @return current value in amps */ float read(); - ACS712& operator=(const ACS712&); + /** Read the value of the measured current in amps * Allows the ACS712 object to be used in a float context * * @return current value in amps */ - operator float() { return read(); } + operator float() { return read(); + + + ACS712& operator=(const ACS712&); + } private: AnalogIn sensor;