Decoupled position and current control working.
CurrentSense.cpp@4:5ae9f8b3a16f, 2015-11-24 (annotated)
- Committer:
- abuchan
- Date:
- Tue Nov 24 03:56:22 2015 +0000
- Revision:
- 4:5ae9f8b3a16f
Decoupled position and current control working.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
abuchan | 4:5ae9f8b3a16f | 1 | #include "CurrentSense.h" |
abuchan | 4:5ae9f8b3a16f | 2 | |
abuchan | 4:5ae9f8b3a16f | 3 | CurrentSense::CurrentSense(PinName current_pin): current_pin_(current_pin) {} |
abuchan | 4:5ae9f8b3a16f | 4 | |
abuchan | 4:5ae9f8b3a16f | 5 | float CurrentSense::get_current(void) { |
abuchan | 4:5ae9f8b3a16f | 6 | return ADC_TO_CURRENT_SCALE * current_pin_.read(); |
abuchan | 4:5ae9f8b3a16f | 7 | } |