george-norton / headphones-toolbox

A UI for configuring Ploopy Headphones
GNU General Public License v3.0
24 stars 4 forks source link

Some more! ^^ #6

Closed Igigog closed 10 months ago

Igigog commented 10 months ago

This one is quite a lot. Since I'm finished with what I wanted to achieve, feel free to take your time reviewing the changes. It builds on top of the other pull request, so better review it first.

Changelog:

  1. Major rust code refactoring
  2. I moved all commands into its own interface. send_cmd is now type-safe and won't send just random byte arrays, unless you really try.
  3. I let Tauri take care of serialization and deserialization instead of returning strings. Works like a charm.
  4. Added some very basic tests for commands. Since I don't actually know how they work, you may want to write something better, but these ones will do for now.
  5. Fixed all cargo clippy warnings. It took some minor renaming, so I also added the config migration. Don't know if it actually works fully, but my config was fine.
  6. Added error reporting to frontend. Now most errors will actually be reported.
  7. Added a very simple config validation. It will not let you set quality of a filter to 0 and destroy your ears anymore. Although it is very simple, together with error reporting it works surprisingly user-friendly.
  8. Made the window resizable.
  9. Condensed the frontend a bit. Now a full screen Toolbox shows a whole 3 filters, which isn't much but kinda better than 2. Also, looks fancy.

It's not perfect of course, but it sure got better to work with. At least, now Toolbox won't actively try to send a bad config right into your ears ^^. And my work is done here, I've implemented all I've wanted so far.

Igigog commented 10 months ago

oops, wrong branch actually

Igigog commented 10 months ago

now it's right