Skip to content

Commit

Permalink
add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
aarron-lee committed Apr 25, 2024
1 parent 836a941 commit 8493041
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 2 additions & 0 deletions src/backend/alsListener.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ export const enableAlsListener = () => {
currentBrightness = data.flBrightness * 100;
}
);
logInfo(`als listener enabled ${intervalId} ${steamRegistration}`);
};

export const clearAlsListener = () => {
Expand All @@ -146,4 +147,5 @@ export const clearAlsListener = () => {
clearTimeout(timeoutId);
timeoutId = undefined;
}
logInfo(`als listener cleared`);
};
4 changes: 2 additions & 2 deletions src/redux-modules/uiSlice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 8493041

Please sign in to comment.