-
Notifications
You must be signed in to change notification settings - Fork 1
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
base: master
Are you sure you want to change the base?
added docker support and debounce logic on door open button #1
Conversation
@@ -4,7 +4,7 @@ | |||
"version": "0.0.0", | |||
"type": "module", | |||
"scripts": { | |||
"dev": "vite", | |||
"dev": "vite --no-open --host 0.0.0.0", |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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.
// await execute({ | ||
// deviceId, | ||
// action, | ||
// }); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
No description provided.