HeptaBattery library

Dependencies:   PowerControl

Dependents:   HEPTA_EPS

Revision:
3:16fd450bcf16
Parent:
2:821f36c03e26
Child:
4:65dc53760aa0
--- a/HeptaBattery.cpp	Wed Jul 26 06:22:39 2017 +0000
+++ b/HeptaBattery.cpp	Wed Aug 23 10:40:53 2017 +0000
@@ -38,24 +38,24 @@
     Bat = _bat.read()*1.431*3.3;
     //4.2以上
     if(Bat>=4.2) {
-        _bat_ct = 0;
-        Peripheral_PowerUp(0xFDFF6FF7);
+        _bat_ct = 1;
+        //Peripheral_PowerUp(0xFDFF6FF7);
         LPC_SC->CCLKCFG = 2;
         SystemCoreClockUpdate();
     } 
     //3.7 < Voltage < 4.1
     else if(Bat<=4.1 && Bat>=3.7) {
-        Peripheral_PowerUp(0xFDFF6FF7);
+        //Peripheral_PowerUp(0xFDFF6FF7);
          LPC_SC->CCLKCFG = 2;
          SystemCoreClockUpdate();
         _bat_ct = 1;
     }
     //3.5V以下
     else if(Bat<=3.5) {
-        Peripheral_PowerDown(0x7D7E6DF1);
+        //Peripheral_PowerDown(0x7D7E6DF1);
         LPC_SC->CCLKCFG = 5;
         SystemCoreClockUpdate();
-        _bat_ct = 1;
+        _bat_ct = 0;
     }
 
 }
\ No newline at end of file