Emit event on power-present toggle (#320)

* Emit event on power-present toggle

* clang-format on changes

* also update battery status on any event

* update comments; remove double battery update

* Fix formatting

* Vibrate shortly on charging event

* debounce charge event
This commit is contained in:
David Ventura
2021-05-16 21:13:22 +02:00
committed by GitHub
parent 5b2472c4bc
commit 9342d62a44
4 changed files with 35 additions and 7 deletions

View File

@@ -15,7 +15,6 @@ Battery::Battery() {
void Battery::Init() {
nrf_gpio_cfg_input(chargingPin, (nrf_gpio_pin_pull_t) GPIO_PIN_CNF_PULL_Pullup);
nrf_gpio_cfg_input(powerPresentPin, (nrf_gpio_pin_pull_t) GPIO_PIN_CNF_PULL_Pullup);
}
void Battery::Update() {