Commit 05511c7
amyboard: clear AMY sequences on restart_sketch so factory reset stops old loops
restart_sketch only stopped the Python loop() callback; the AMY-side sequences
the old sketch registered (AMYSequence drum loops etc.) kept firing. Hardware
factory reset reboots the board so AMY starts fresh, but the web simulator's
"Reset to factory defaults" (and any on-device sketch restart) runs in place --
the old pattern kept playing over the new sketch.
Send RESET_SEQUENCER on restart (scoped to AMY sequences; not
sequencer.clear(), whose seq_remove_callbacks would also kill UI
TulipSequences like show_midi), and restart the AMYSequence tag counter so
repeated sketch saves don't creep toward AMY's max_sequencer_tags.
Verified in the web simulator: drum sketch loops, factory reset clears all
sequence tags (D1 dump shows highest_tag -1) and silences the loop, and a
sketch installed after reset registers tags starting from 0 again.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent d1175bd commit 05511c7
1 file changed
Lines changed: 11 additions & 0 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
758 | 758 | | |
759 | 759 | | |
760 | 760 | | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
761 | 772 | | |
762 | 773 | | |
763 | 774 | | |
| |||
0 commit comments