This pull request covers a number of improvements to the plugin's Composer settings panel, including:
proper conversion of strings to appropriate types when saving settings
insertion cursor that points to where the next M300 gcode line will be inserted (no longer restricted to appending to the last line)
auto-snap feature to normalize durations while playing notes (rather than running cleanup afterwards)
implementation of a better backstack that can undo/redo more than just the last line of text, which is helpful given the insertion cursor changes
"Open Gcode File" functionality for editing previously-saved files
"Import MIDI File" functionality for converting MIDI files to M300 commands (experimental)
improved error handling
updated documentation including some answered FAQs
Test Plan
[x] Test various composer tools and undo (then redo) all of the different actions, verifying expected functionality at each step
[x] verify playing new notes or inserting rests happens at the indicated line indicator caret point
[x] verify importing MIDI files with each of the various options toggled resulting in the correct output
[x] verify "auto-snap" durations works while the checkmark is ticked, otherwise still functions when pressing the button after-the-fact
[x] try and play Gcode with the printer disconnected and verify it shows an error message
[x] try and play a huge composition (e.g. the debug comments from importing a MIDI file) and verify it shows an error message
[x] edit a previously saved composition and verify it doesn't add another header/footer around the modified file
[x] add, edit, and rename a file and verify it checks for M300 commands after the 30 second delay (e.g. should see a music note next to the file in the "Open Gcode file" prompt after it has been processed)
[x] key indicators and preview work with any combination of enabled buzzers
Description
This pull request covers a number of improvements to the plugin's Composer settings panel, including:
Test Plan