summaryrefslogtreecommitdiff
path: root/apps/plugins/lib/helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lib/helper.c')
-rw-r--r--apps/plugins/lib/helper.c56
1 files changed, 37 insertions, 19 deletions
diff --git a/apps/plugins/lib/helper.c b/apps/plugins/lib/helper.c
index 0151a36c6c..2feff14a22 100644
--- a/apps/plugins/lib/helper.c
+++ b/apps/plugins/lib/helper.c
@@ -19,37 +19,55 @@
#include "plugin.h"
-/*
- * force the backlight on
- * now enabled regardless of HAVE_BACKLIGHT because it is not needed to
- * build and makes modded targets easier to update
- */
+/* Force the backlight on */
void backlight_force_on(struct plugin_api* rb)
{
- if(!rb) return;
-/* #ifdef HAVE_BACKLIGHT */
+ if(!rb)
+ return;
if (rb->global_settings->backlight_timeout > 0)
rb->backlight_set_timeout(0);
#if CONFIG_CHARGING
if (rb->global_settings->backlight_timeout_plugged > 0)
rb->backlight_set_timeout_plugged(0);
#endif /* CONFIG_CHARGING */
-/* #endif */ /* HAVE_BACKLIGHT */
-}
+}
-/*
- * reset backlight operation to its settings
- * now enabled regardless of HAVE_BACKLIGHT because it is not needed to
- * build and makes modded targets easier to update
- */
+/* Reset backlight operation to its settings */
void backlight_use_settings(struct plugin_api* rb)
{
- if(!rb) return;
-/* #ifdef HAVE_BACKLIGHT */
+ if (!rb)
+ return;
rb->backlight_set_timeout(rb->global_settings->backlight_timeout);
#if CONFIG_CHARGING
- rb->backlight_set_timeout_plugged(rb->global_settings-> \
- backlight_timeout_plugged);
+ rb->backlight_set_timeout_plugged(rb->global_settings->
+ backlight_timeout_plugged);
+#endif /* CONFIG_CHARGING */
+}
+
+#ifdef HAVE_REMOTE_LCD
+/* Force the backlight on */
+void remote_backlight_force_on(struct plugin_api* rb)
+{
+ if (!rb)
+ return;
+ if (rb->global_settings->remote_backlight_timeout > 0)
+ rb->remote_backlight_set_timeout(0);
+#if CONFIG_CHARGING
+ if (rb->global_settings->remote_backlight_timeout_plugged > 0)
+ rb->remote_backlight_set_timeout_plugged(0);
+#endif /* CONFIG_CHARGING */
+}
+
+/* Reset backlight operation to its settings */
+void remote_backlight_use_settings(struct plugin_api* rb)
+{
+ if (!rb)
+ return;
+ rb->remote_backlight_set_timeout(rb->global_settings->
+ remote_backlight_timeout);
+#if CONFIG_CHARGING
+ rb->remote_backlight_set_timeout_plugged(rb->global_settings->
+ remote_backlight_timeout_plugged);
#endif /* CONFIG_CHARGING */
-/* #endif */ /* HAVE_BACKLIGHT */
}
+#endif /* HAVE_REMOTE_LCD */