Penn Electric Racing / Mbed 2 deprecated SystemManagement

Dependencies:   mbed CANBuffer Watchdog MODSERIAL mbed-rtos xbeeRelay IAP

Fork of SystemManagement by Martin Deng

Revision:
34:18bcf276d3bf
Parent:
33:6bc82b6b62e5
Child:
36:0afc0fc8f86b
--- a/Libs/CoulombCounter/CoulombCounter.cpp	Tue Jan 06 20:45:26 2015 +0000
+++ b/Libs/CoulombCounter/CoulombCounter.cpp	Wed Jan 07 03:25:50 2015 +0000
@@ -5,9 +5,6 @@
 const float BAT_ISENSE_OFFSET = -0.5*BAT_ISENSE_MULTIPLIER; // Offset to convert float to amps
 const float BAT_ISENSE_LIMS = 3.0;                          // Over-current limit = +/- 3A
 
-const int rtcGPREG_counter = 0;     // RTC GPREG offset for the coulomb counter
-const int rtcGPREG_capacity = 1;    // RTC GPREG offset for the capacity spec
-
 CoulombCounter::CoulombCounter(PinName _pin, int _mSec) : BatISense(_pin) {
     mSec = _mSec;
     
@@ -54,15 +51,7 @@
     tracker++;
     if (tracker >= CC_FILTER_TAPS) tracker = 0;
 }
-void CoulombCounter::resetToSOC(float SOC) { 
-    store.write(SOC*capacity(), rtcGPREG_counter);
-}
-void CoulombCounter::resetToAh(float Ah) {
-    store.write(Ah, rtcGPREG_counter);
-}
-void CoulombCounter::changeCapacity(float capAh) {
-    store.write(capAh, rtcGPREG_capacity);
-}
+
 float CoulombCounter::current() { 
     float avg = 0;
     for (int i = 0; i < CC_FILTER_TAPS; i++) {
@@ -72,15 +61,7 @@
     if (abs(avg) > BAT_ISENSE_LIMS) overCurrent = true;
     return avg;
 }
-float CoulombCounter::ampHours() {
-    return store.read(rtcGPREG_counter);
-}
-float CoulombCounter::capacity() {
-    return store.read(rtcGPREG_capacity);
-}
-float CoulombCounter::SOC() {
-    return ampHours()/capacity();
-}
+
 bool CoulombCounter::overCurrentDetected() {
-    return overCurrent;    
+    return overCurrent;
 }
\ No newline at end of file