Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added docker support and debounce logic on door open button #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alex-milanov
Copy link

No description provided.

@@ -4,7 +4,7 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"dev": "vite --no-open --host 0.0.0.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move these parameters to Dockerfile CMD line

@@ -50,15 +51,19 @@ const DeviceActionButton = ({
icon: '',
};

const openDoor = debounce(execute, 2000);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep the timeout at 3000, since the door mechanisms are open for at least 3 seconds and there is no reason to request opening again. Also this is a generic function that is used for both doors and lights (and other things in the future) so please either use a more generic name like executeDelayed or limit debouncing to just the door device type.

Comment on lines +59 to +62
// await execute({
// deviceId,
// action,
// });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the old code, it can be easily recovered from the Git history.


await sleep(3000);
// await sleep(3000);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

@@ -0,0 +1 @@
COMPOSE_PROJECT_NAME=space-initlab
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a new line at the end of the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants