Advertisement
Guest User

Untitled

a guest
Jun 29th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1.  
  2. /* Changed this code if-statement back to stock because this
  3. * parameter is now user settable by changing the actual
  4. * register value inside the battery chip EEPROM.
  5. * --RP
  6. */
  7.  
  8. if ((di->status.status_reg & 0x80) &&
  9. (di->status.percentage == 100)) {
  10. di->status.battery_full = 1;
  11. charge_mode = CHARGE_BATT_DISABLE;
  12. }
  13.  
  14. /* We don't move from full to not-full until
  15. * we drop below 95%, to avoid confusing the
  16. * user while we're maintaining a full charge
  17. * (slowly draining to 95 and charging back
  18.  
  19. * to 100)
  20. * Oddly, only Passion is for 99% cycles, HTC
  21. * set the Bravo to 95%.
  22. * -od of xbravoteam
  23. *
  24. * Set 99 for Passion - pershoot
  25. */
  26.  
  27. if (di->status.percentage < 99) {
  28. di->status.battery_full = 0;
  29. }
  30.  
  31. if (temp >= TEMP_HOT) {
  32. if (temp >= TEMP_CRITICAL)
  33. charge_mode = CHARGE_BATT_DISABLE;
  34.  
  35. /* once we charge to max voltage when hot, disable
  36. * charging until the temp drops or the voltage drops
  37. */
  38. if (volt >= TEMP_HOT_MAX_MV)
  39. di->status.cooldown = 1;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement