mirror of
https://github.com/clockworkpi/PicoCalc.git
synced 2025-12-12 10:18:54 +01:00
Depricated report_bat in picocalc_keyboard
This commit is contained in:
parent
3b84959ee6
commit
295f7e7a8e
@ -186,6 +186,7 @@ void requestEvent() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//depricated https://github.com/clockworkpi/PicoCalc/issues/20
|
||||||
void report_bat(){
|
void report_bat(){
|
||||||
if (PMU.isBatteryConnect()) {
|
if (PMU.isBatteryConnect()) {
|
||||||
write_buffer[0] = REG_ID_BAT;
|
write_buffer[0] = REG_ID_BAT;
|
||||||
@ -294,14 +295,15 @@ void check_pmu_int() {
|
|||||||
// set the threshold through getLowBatWarnThreshold( 5% ~ 20% )
|
// set the threshold through getLowBatWarnThreshold( 5% ~ 20% )
|
||||||
if (PMU.isDropWarningLevel2Irq()) {
|
if (PMU.isDropWarningLevel2Irq()) {
|
||||||
Serial1.println("isDropWarningLevel2");
|
Serial1.println("isDropWarningLevel2");
|
||||||
report_bat();
|
//report_bat();
|
||||||
}
|
}
|
||||||
|
|
||||||
// When the set low-voltage battery percentage shutdown threshold is reached
|
// When the set low-voltage battery percentage shutdown threshold is reached
|
||||||
// set the threshold through setLowBatShutdownThreshold()
|
// set the threshold through setLowBatShutdownThreshold()
|
||||||
//This is related to the battery charging and discharging logic. If you're not sure what you're doing, please don't modify it, as it could damage the battery.
|
//This is related to the battery charging and discharging logic. If you're not sure what you're doing, please don't modify it, as it could damage the battery.
|
||||||
if (PMU.isDropWarningLevel1Irq()) {
|
if (PMU.isDropWarningLevel1Irq()) {
|
||||||
report_bat();
|
Serial1.println("isDropWarningLevel1");
|
||||||
|
//report_bat();
|
||||||
//
|
//
|
||||||
PMU.shutdown();
|
PMU.shutdown();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user