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

Reset button should send a close pada command #65

Open
jeffstjean opened this issue Apr 23, 2022 · 0 comments
Open

Reset button should send a close pada command #65

jeffstjean opened this issue Apr 23, 2022 · 0 comments
Assignees

Comments

@jeffstjean
Copy link
Member

jeffstjean commented Apr 23, 2022

In the new messaging protocol (which is yet to be implemented), there will be an ACTUATE_GROUP command that will allow us to actuate all the servos associated with DROP_PADA. This new protocol will come with a change to the /command endpoint. Instead of the payload looking like:

{
    commands:
    [
        { 
            command: 'DROP_PADA', 
            args: []
        }
    ]
}

it will be like this:

{
    commands:
    [
        {
            command: 'ACTUATE_GROUP',
            args:
            [
                group: 'PADA',
                state: 'OPEN' 
            ]
        }
    ]
}

This will allow both OPEN and CLOSE states to be sent for a given servo group to open or close that group. The backend hasn't been updated for this yet but I have created a branch feature/message-0.5 where all these changes can be made. Branch off of feature/message-0.5 into a new branch feature/message-0.5-frontend and make a PR back into feature/message-0.5 when complete. The backend changes, when complete will be on feature/message-0.5 and can be rebased onto feature/message-0.5-frontend to test everything. In the meantime, modify api/routes/CommandRoute.js to print out the req.body to confirm the frontend is sending a properly formatted request.

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

No branches or pull requests

2 participants