feat: Add GRBL plotter backend for G-code sending #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've implemented a backend system to send G-code commands directly to a GRBL-based pen plotter via a serial connection.
Key changes include:
grbl_communicator.pywith aGRBLCommunicatorclass to handle serial connection, G-code command sending, and GRBL response parsing ('ok', 'error')./api/send_jobroute inapp.pyto utilizeGRBLCommunicatorfor processing and sending G-code jobs. Includes default serial port and baud rate configuration.pyserialtorequirements.txtfor serial communication.GRBLCommunicatorintest_grbl_communicator.py, usingunittest.mockto simulate serial port interactions.README.mdwith details on the new backend, configuration instructions for serial port/baud rate, and dependency information.The system now allows you to send G-code from the frontend, which is then relayed to the connected GRBL device. Error handling for connection issues and GRBL errors is included.