pour size on touchend and mouseup,
Modified the websocket on frontend to recieve messages from the backend. Added a data object to store poursizes and include a timestamp. Added logic to send the data object to the backend on touchend and mouseup. Added logic to confirm the pour size on the backend and send the pour size to the frontend. Added logic to update the pour size on the frontend upon recieving confirmation. Ensured the sliders reflect the backend values on page load. Ensured the sliders reflect backend values when no confirmation of change is recieved. Removed some unused code.
Changes:
HTML/JS
Added message handling from the backend
Added an object that is populated by the backend on websocket connection open
Added functionality to ensure the sliders always reflect the last known backend values
pour size on touchend and mouseup, Modified the websocket on frontend to recieve messages from the backend. Added a data object to store poursizes and include a timestamp. Added logic to send the data object to the backend on touchend and mouseup. Added logic to confirm the pour size on the backend and send the pour size to the frontend. Added logic to update the pour size on the frontend upon recieving confirmation. Ensured the sliders reflect the backend values on page load. Ensured the sliders reflect backend values when no confirmation of change is recieved. Removed some unused code.
Changes:
HTML/JS
pour.cpp
get_pour_size()
server.cpp