From 8493041c1694a51dcd51c5f0db4018ba5397e430 Mon Sep 17 00:00:00 2001 From: Aarron Lee Date: Wed, 24 Apr 2024 20:55:57 -0400 Subject: [PATCH] add logging --- main.py | 1 + src/backend/alsListener.tsx | 2 ++ src/redux-modules/uiSlice.tsx | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 3adf5fa..51ec08b 100644 --- a/main.py +++ b/main.py @@ -55,6 +55,7 @@ async def find_als(self): return ambient_light_sensor.find_als() async def read_als(self): + decky_plugin.logger.info('read als called') return ambient_light_sensor.read_als() async def save_rgb_per_game_profiles_enabled(self, enabled: bool): diff --git a/src/backend/alsListener.tsx b/src/backend/alsListener.tsx index fb69fae..01d0dfd 100644 --- a/src/backend/alsListener.tsx +++ b/src/backend/alsListener.tsx @@ -126,6 +126,7 @@ export const enableAlsListener = () => { currentBrightness = data.flBrightness * 100; } ); + logInfo(`als listener enabled ${intervalId} ${steamRegistration}`); }; export const clearAlsListener = () => { @@ -146,4 +147,5 @@ export const clearAlsListener = () => { clearTimeout(timeoutId); timeoutId = undefined; } + logInfo(`als listener cleared`); }; diff --git a/src/redux-modules/uiSlice.tsx b/src/redux-modules/uiSlice.tsx index 9bbd617..5e72353 100644 --- a/src/redux-modules/uiSlice.tsx +++ b/src/redux-modules/uiSlice.tsx @@ -98,10 +98,10 @@ export const uiSliceMiddleware = } } - if (type === uiSlice.actions.setChargeLimit.type && serverApi) { + if (type === uiSlice.actions.setChargeLimit.type) { setChargeLimit(action.payload); } - if (type === uiSlice.actions.setAlsEnabled.type && serverApi) { + if (type === uiSlice.actions.setAlsEnabled.type) { const enabled = action.payload; setAlsEnabled(enabled); if (enabled) {