gpstar81 / GPStar-proton-pack

GPStar Proton Pack and Neutrona Wand
https://www.gpstartechnologies.com
GNU General Public License v3.0
38 stars 9 forks source link

Neutrona Wand music control in bench test mode #220

Closed gpstar81 closed 1 year ago

gpstar81 commented 1 year ago

I haven't had the time to bench test this yet, so it should also be tested with a Proton Pack as well, and the Neutrona Wand as a stand alone.

Whats new: -Neutrona Wand music control in bench test mode. -Another sound effect added for the Neutrona Wand, but it is unused at the moment.

DustinGrau commented 1 year ago

Looks good on the surface, but yeah this needs testing and I'll plan to do a sequence with the special standalone wand firmware. I just committed some updates including rebuilding the binaries and some minor doc updates to solve some confusion on software/hardware items that have come up recently.

nomakewan commented 1 year ago

I got a little busy this week, but I should be able to do a test with a standalone wand this weekend.

At a quick glance it looks very similar to how I did it on my end (including adding in that check timer start I missed!), with just a few modifications I'd make here and there to some syntax. Nothing breaking though.

I'll be able to review it more thoroughly in the morning (~12 hours). Thank you!

DustinGrau commented 1 year ago

Just tested on my setup, both wand alone and with the pack, both appear to be working as expected. @nomakewan I will leave the PR unmerged but approved if you would like to test--I think you were affected by this issue so it would be good to know if it's addressed.

DustinGrau commented 1 year ago

Ohhhh, I think I see why. The strobing of that LED was tied to the bargraph animation for Super Hero Mode. There doesn't seem to be similar logic for Mode Original, though a comment in the code implies this happens when the system is close to overheating.

gpstar81 commented 1 year ago

Ohhhh, I think I see why. The strobing of that LED was tied to the bargraph animation for Super Hero Mode. There doesn't seem to be similar logic for Mode Original, though a comment in the code implies this happens when the system is close to overheating.

Oh yes I forgot about adding the strobe to mode original firing. I will add it during the weekend and commit it to this pull request.

DustinGrau commented 1 year ago

Just to restore the function and make sure it does something at the moment, I added some very basic code which just illuminates the tip when the last LED in the barrel is lit. This makes functional sense as it would follow the animation for the stock lights. You can choose to keep it or replace that logic, though in looking at the bargraph-dependent animation for Super Hero, this approach may make more sense as the new wand LED's are implemented.

Edit: The diff for the file looks extensive, but what I had done was moved some of the bargraph logic into a new function, similar to how the SuperHero firing animation was done, just for consistency and to make the parent function easier to maintain (hopefully).

gpstar81 commented 1 year ago

I am just redoing the wiring on my bench test boards, I will give things a good test soon and update the wand flash tip at the same time.

gpstar81 commented 1 year ago

I had time to bench test these updates now. It seems all good. Made a few tiny changes:

-Updated the strobe in mode original. -Added a slightly longer delay on the afterlife beep sounds when changing the power level. If you spam the rotary encoder by rotating it super quick for 10+ seconds before, you could get the audio to crash in the wand (very fringe case use). Now it is stable.