teejusb / fsr

FSR code used for dance pads
GNU General Public License v3.0
62 stars 43 forks source link

Threshold persistence #88

Open alesya-h opened 5 months ago

alesya-h commented 5 months ago

A friend of mine needed this, so I implemented it. Completely untested until tomorrow :)

Sereni commented 5 months ago

Friend here lol (thank you~~)

This works well on the Arduino side. I uploaded the new sketch, and tested this with the serial monitor in the Arduino IDE:

On the client/server side, the button isn't there. I tried hacking it into the dropdown as a form, but it didn't work, and with zero js knowledge, I gave up.

alesya-h commented 5 months ago

I just tried building it - the button is definitely there. I probably forgot to tell that you'll need to recompile the frontend.

Screenshot 2024-07-03 at 8 53 50 AM

alesya-h commented 5 months ago

Fixed a copy-paste typo in the server, works as expected now.

Sereni commented 5 months ago

My bad, I only rebuilt after I started messing with button placement. Reverted and it's there. Works end to end! Thank you.

For the merge, it'd be great to add some feedback that the command has worked (is that possible?), and perhaps the button shouldn't be as prominent, but that's up to teejusb.

alesya-h commented 5 months ago

I've added a success alert for when values have been persisted:

Screenshot 2024-07-03 at 7 22 22 PM

As for button prominence, it's a nice blue primary button, seemingly quite attractive :) But naturally it can be made to look like any variant from https://react-bootstrap.github.io/docs/components/buttons should anyone propose which one.

alesya-h commented 5 months ago

(fixed grammar - has->have 😅)

teejusb commented 4 months ago

If you're open to it, I can go make the proposed changes (and then maybe have @Sereni test before merging?).

Sereni commented 4 months ago

Happy to test!

alesya-h commented 4 months ago

@teejusb yeah, sounds great, absolutely, feel free to do that :)

teejusb commented 4 months ago

Just pushed a change. Not tested at all (hopefully I didn't have any syntax errors haha). Please try it out when you get a chance!

Sereni commented 3 months ago

@teejusb you may need to take a look yourself -- I got past a couple syntax errors, but then the board doesn't save thresholds correctly through Arduino IDE for me, nor do I see the changes in the web UI :( I made sure to upload the new sketch and yarn build before trying.

Sereni commented 3 months ago

That said, I'm happy to report that the previous version has performed very well in the field :D Thank you both!

IMG_8841

teejusb commented 3 months ago

Thanks for the update! Admittedly I didn't run it myself so I'll do that and post an update to test when ready.

Also congrats!!

Sereni commented 3 months ago

I also just noticed that the previous version requires a bit of persistence (ha) to use -- the web UI doesn't always save thresholds on the first click, but it's hard to tell why. Explains why it sometimes feels like nothing changed. Your update will help debug this if I catch it again, so looking forward to it!