Removed external power errors from disabling idle

This commit is contained in:
Nicolas Munnich 2024-08-02 11:05:13 +02:00
parent e4e6a0502c
commit 0f5c88862e

View file

@ -101,10 +101,9 @@ void activity_work_handler(struct k_work *work) {
const struct device *ext_power = device_get_binding("EXT_POWER"); const struct device *ext_power = device_get_binding("EXT_POWER");
if (ext_power == NULL) { if (ext_power == NULL) {
LOG_ERR("Unable to retrieve ext_power device on entering idle."); LOG_ERR("Unable to retrieve ext_power device on entering idle.");
return; } else {
ext_power_disable(ext_power);
} }
ext_power_disable(ext_power);
#endif /* IS_ENABLED(CONFIG_ZMK_EXT_POWER_IDLE_OFF) */ #endif /* IS_ENABLED(CONFIG_ZMK_EXT_POWER_IDLE_OFF) */
set_state(ZMK_ACTIVITY_IDLE); set_state(ZMK_ACTIVITY_IDLE);
} }