Commit Graph

13 Commits

Author SHA1 Message Date
Cem Aksoylar 25f89ee6ab feat(battery): Add Kconfig setting for battery level report interval 2022-05-17 12:03:57 -04:00
Joel Spadin f91472fbe5 fix(battery): Warn if using deprecated battery label 2022-04-17 11:30:57 -04:00
Joel Spadin 388e345c28 feat(battery)!: Add chosen node for battery
battery.c now uses the zmk,battery chosen node to select a battery
sensor. Using the node labeled "BATTERY" is maintained for backwards
compatibility but is now deprecated. Custom boards should switch to
using the chosen node.

# Conflicts:
#	app/boards/arm/bluemicro840/bluemicro840_v1.dts
#	app/boards/arm/nice60/nice60.dts
#	app/boards/arm/nrfmicro/nrfmicro_13.dts

# Conflicts:
#	app/boards/arm/bluemicro840/bluemicro840_v1.dts
2022-04-17 11:30:57 -04:00
JP Bonn c643f1cd96 added battery.h, last_state_of_charge to uint8_t 2021-03-10 18:07:18 -05:00
JP Bonn b8a8ecd59d fixed order of setting state_of_charge 2021-03-10 18:07:18 -05:00
JP Bonn df4ec51f96 only send zmk_battery_state_changed on change 2021-03-10 18:07:18 -05:00
Pete Johanson 3fe2acc2d1 refactor(core): Extra event payloads to own types, refactor API.
* Make it easier to use *just* event payloads by defining the data,
  and then having event manager macros generate "wrapper structs"
* Improve is_*/cast_* APIs to hide details of full event struct.
* Create `zmk_event_t` typedef to pass to event handlers.
* Bring event names inline w/ consistent `zmk_` prefix.
2021-01-20 07:06:11 -05:00
innovaker 842aa5a842 refactor: replace filename hyphens with underscores
Aligns *.h and *.c to underscore naming convention.

These were kept (with warnings) for backwards compatibility with external boards/shields:
- kscan-mock.h
- matrix-transform.h
They should be removed in the future.

PR: #523
2020-12-28 01:15:35 -05:00
innovaker 0d4476d148 refactor(app): remove `_gatt_` infixes from BT DIS and BAS services
See: https://docs.zephyrproject.org/latest/releases/release-notes-2.4.html
PR: #467
2020-12-14 12:41:25 -05:00
innovaker 00ca0d2f1c refactor(app): replace `struct device *` with `const struct device *`
Replaced with RegExp: /(?<!const )(struct device \*)/g

See: https://docs.zephyrproject.org/latest/releases/release-notes-2.4.html
PR: #467
2020-12-14 12:41:25 -05:00
Pete Johanson d5ea426975 refactor(battery): Fire event on battery event. 2020-12-02 16:04:56 -05:00
Nick Winans 89b8bfc95d fix(battery): Only log if finding battery device failed
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
2020-11-01 23:00:54 -05:00
Nick 953de71646 feat(battery): Add BAS GATT reporting 2020-11-01 23:00:54 -05:00