EPS

Dependencies:   PowerControl

Dependents:   HEPTA_assembly template HEPTA_GS

Fork of HeptaBattery by Hepta 2

Files at this revision

API Documentation at this revision

Comitter:
umeume
Date:
Wed Aug 23 10:40:53 2017 +0000
Parent:
2:821f36c03e26
Commit message:
test

Changed in this revision

HeptaBattery.cpp Show annotated file Show diff for this revision Revisions of this file
--- 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