Automatic download no match #193
Merged
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.
What's this PR do?
Rewrites the source code if no matching BS2s are available but a different BS2 is and is selected. Then recompiles the source and programs the device.
What are the important parts of the code?
src/stores/documentsneeded anupdatemethod and to track the current filename so we could alter the source code without causing a change event on CodeMirror.src/stores/deviceis where the source code replacement is happening. Not sure if that is the best place for it but it works for the current implementation.How should this be tested by the reviewer?
Create a new program but change the stamp directive to
BS2e, connect your BS2, attempt to download. You should get the "No Matching Devices" message. Then, manually select the BS2, your source code should have the stamp directive change and your device will be programmed.Is any other information necessary to understand this?
Also, note that this is a temp file changed and isn't saved to disk unless the user explicitly saves.
What are the relevant tickets? (Please add
closes,refs, etc)Closes #166