Decoupled position and current control working.
Diff: CurrentSense.cpp
- Revision:
- 4:5ae9f8b3a16f
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CurrentSense.cpp Tue Nov 24 03:56:22 2015 +0000 @@ -0,0 +1,7 @@ +#include "CurrentSense.h" + +CurrentSense::CurrentSense(PinName current_pin): current_pin_(current_pin) {} + +float CurrentSense::get_current(void) { + return ADC_TO_CURRENT_SCALE * current_pin_.read(); +} \ No newline at end of file