Having this issue with my new saber where sometimes it will do these instances of false clashes and thrusts when clicking the power button. Any ideas on how to fix this? Can’t seem to find anyone having this issue. I would add the video but it won’t allow it
I should note, this is a two button setup
First thing to do is to find out exactly what’s happening. Generally the easiest way to do that is to use the serial monitor, as it prints out most generated events.
ProffieOS has some code that disables clashes for a small amount of time after each button click, because “clicky” buttons can read a lot like a clash. It may be that the time has to be adjusted to something bigger for your particular setup for some reason.
Oh, and if you want to post a video, upload it to youtube or google photos, then post a link here.
Okay that that makes a lot of sense, as the buttons on my saber are pins that are very clicky (the hilt is the Republic Commando from Saberbay).
This video you can see it does it a few times and you can here the click of the buttons as I spam it.
How could I use the serial monitor properly and get the right data if the chassis is removed from the hilt/blade?
If you can’t have the USB cable plugged in while the buttons are connected, then it’s going to be more difficult to figure out exactly what is going on.
There are a number of settings we can fiddle with to try to make it better. The first one we should check is probably the clash threshold. Have you tried increasing it?
I figured so… yeah so the config that came with it had it at 2 which I found to be very low, I raised to 3.5 as my other proffie sits at that. I could try to raise it to maybe 4.5 and see how that does.
I also saw in my research that a loud speaker can contribute to the issue? My saber has a 28 mm and the hilt design puts out some serious sound/bass. Should I maybe decrease the max volume as well?
I raised threshold to 4.5 and volume down to 1950 (config initially was 2500 which was crazy to me), but it still did it. I’ll try going to 5.5. I notice it most often does it if I click the power immediately after I press the auxiliary
If changing the clash threshold doesn’t seem to help, then the next thing to try is probably to ignore clashes after button clicks for longer. There is no define for this, you need to change it in the code itself, here:
Try 150 and see if that helps?
Volume is dependent on speaker specs. If you’re using a 8ohm speaker, then you can push up to 2800 or maybe even 3000 if it sounds OK. 4ohm should only go to maybe 2000 safely.
Sorry for the delay; so it sort of worked? Or at least improved! It definitely doesn’t do it as often, but it still is frequently doing it right after I use the aux for blaster deflects, I’d say like 40 percent of the time
Been playing around for a solid ten minutes and it has yet to do it. At one point I did enter battle mode on accident, which may have contributed, but the more I test the less it does it. I’m realizing how much of a noob I am with two buttons. However, I am testing with no blade at the moment. I will keep you updated!
If 150 helps, but doesn’t solve it all the time, maybe try 250?
Ignoring clashes for 250ms seems very high to me, but maybe your saber needs it?
Sometimes it’s the button releaes that causes extra clashes, and the release can happen much later than the click. We do a very short delay of clashes to deal with this problem, and maybe that delay needs to be slightly higher for your saber?
You can try changing the 3 here to a 10 and see if that helps:
I did some more testing and it seems to only semi-consistently do it in two instances; either right after I ignite the saber or if I press the aux for blaster deflect, which makes me think it might be the latter. Let me do that first before upping the former to 250. Standby
Update: I haven’t had much time to do a ton of testing, just a few minutes of swinging and clicking the power, nor have I tested it with a blade (my LGT blade is kinda crap so I have a KR blade otw). So far I have not had a single false clash or thrust. The saber did randomly just… Freeze? But I think it’s because so much memory is being used on the board. I’m not going to mark it solved quite yet but if it continues to work with no false triggers once I get my blade, then I will. Things are looking good!
I got my new blade today and after some testing, this issue seems to have stopped! Thanks so much for your help.
Got an update- it does happen still, although extremely rarely. I find it to happen every now and again after doing several clashes. Just did some testing for my other issue and ran into it. Should I just try to bump up one of these numbers?
Probably, although it can take a fair bit of testing to figure out which number bumb works the best.
Gotcha, is there a limit to how high these numbers go? E.g. could I bump them up to say 12 and 200? I don’t see either of them needing to go higher than 15 or 250 but still learning!
The limit is high enough to not matter. (like 2 billion or so…)
At some point these number just don’t make sense anymore, because a vibration caused by a button click cannot realistically last for a really long time.