mirror of
https://github.com/zmkfirmware/zmk.git
synced 2026-03-19 20:45:18 -05:00
fix(battery): Warn if using deprecated battery label
This commit is contained in:
committed by
Pete Johanson
parent
388e345c28
commit
f91472fbe5
@@ -26,6 +26,8 @@ uint8_t zmk_battery_state_of_charge() { return last_state_of_charge; }
|
|||||||
#if DT_HAS_CHOSEN(zmk_battery)
|
#if DT_HAS_CHOSEN(zmk_battery)
|
||||||
static const struct device *const battery = DEVICE_DT_GET(DT_CHOSEN(zmk_battery));
|
static const struct device *const battery = DEVICE_DT_GET(DT_CHOSEN(zmk_battery));
|
||||||
#else
|
#else
|
||||||
|
#warning \
|
||||||
|
"Using a node labeled BATTERY for the battery sensor is deprecated. Set a zmk,battery chosen node instead. (Ignore this if you don't have a battery sensor.)"
|
||||||
static const struct device *battery;
|
static const struct device *battery;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user