Is this the most efficient way of doing this?
diff --git a/modules/battery.c b/modules/battery.c index cec3f0d..a1ab114 100644 --- a/modules/battery.c +++ b/modules/battery.c @@ -129,7 +129,7 @@ static gboolean battery_ok_dbus_cb(DBusMessage *const msg) mce_log(LL_DEBUG, "Received battery ok signal"); -// execute_datapipe_output_triggers(&led_pattern_deactivate_pipe, MCE_LED_PATTERN_BATTERY_LOW, USE_INDATA); + execute_datapipe_output_triggers(&led_pattern_deactivate_pipe, MCE_LED_PATTERN_BATTERY_LOW, USE_INDATA); execute_datapipe(&battery_status_pipe, GINT_TO_POINTER(BATTERY_STATUS_OK), @@ -156,7 +156,7 @@ static gboolean battery_low_dbus_cb(DBusMessage *const msg) mce_log(LL_DEBUG, "Received battery low signal"); -// execute_datapipe_output_triggers(&led_pattern_activate_pipe, MCE_LED_PATTERN_BATTERY_LOW, USE_INDATA); + execute_datapipe_output_triggers(&led_pattern_activate_pipe, MCE_LED_PATTERN_BATTERY_LOW, USE_INDATA); execute_datapipe(&battery_status_pipe, GINT_TO_POINTER(BATTERY_STATUS_LOW), @@ -263,7 +263,7 @@ static gboolean charger_charging_on_dbus_cb(DBusMessage *const msg) /* In case these are active; there's no harm to call them anyway */ execute_datapipe_output_triggers(&led_pattern_deactivate_pipe, MCE_LED_PATTERN_BATTERY_FULL, USE_INDATA); -// execute_datapipe_output_triggers(&led_pattern_deactivate_pipe, MCE_LED_PATTERN_BATTERY_LOW, USE_INDATA); + execute_datapipe_output_triggers(&led_pattern_deactivate_pipe, MCE_LED_PATTERN_BATTERY_LOW, USE_INDATA); execute_datapipe_output_triggers(&led_pattern_activate_pipe, MCE_LED_PATTERN_BATTERY_CHARGING, USE_INDATA);
Is this way more efficient than the script (or is it exactly the same)? Does the daemon only activate when triggered by the low battery or is it always running?