Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(release/v1.1.1): code cleanup #9

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

(release/v1.1.1): code cleanup #9

wants to merge 16 commits into from

Conversation

Vitineth
Copy link
Contributor

This change shouldn't have much of an impact on the functionality of the system, in general it has just divided the code up to extract out the HTTP server into a more modular structure and changed slightly how the interactions work (ie x32 devices are now identified by name rather than ip/port combinations in the web requests). To accomplish this, one technically breaking change has had to be made in which the name key of the x32 devices in the config is now required and constrained to alphanumeric with -_. This makes it simpler when using it in the web requests and as they are now identified by name, these names must be unique. This is marked as a patch change as this will not affect the existing configurations in use.

Addresses #6

Vitineth added 12 commits April 29, 2022 02:56
Going to be extracting out a lot of functionality to slim this down
This is just to avoid a new dependency via express and handles some pre-processing for me by default. Not the prettiest but its also not the worst thing I've ever made
This centralises all the interaction with x32 into a single class with methods to interact with them. Uses some hacky stuff for error handling which may not be necessary but should roughly handle everything it needs to do. Logging has been included throughout
These routes are just aliases around a simple state function call. Everything is routed and parameters are checked through the micro router
Slimmed down and extracted out of the index
This is much nicer and should make a much more maintainable system. Will be going through and adding some more comments soon and that should conclude the initial cleanup
This should be the end of the changes required to fix up #6
@Vitineth Vitineth added this to the v1.1.1 milestone Apr 29, 2022
@Vitineth Vitineth requested a review from wlabarron April 29, 2022 15:29
@Vitineth Vitineth self-assigned this Apr 29, 2022
@wlabarron
Copy link
Member

wlabarron commented May 4, 2022

I've not looked at the code in great detail but my feedback points are:

  • npm run dev on my local machine serves a blank page -- might be because I'm not connected to any X32 devices?
  • Update the version number in package.json

@Vitineth
Copy link
Contributor Author

New updates have been released and this has been deployed on the pi

@wlabarron - version has been changed, you might have better luck with npm run dev now, let me know if it still does not work

@wlabarron
Copy link
Member

Can confirm that npm run dev worked correctly on my local machine. #10 also looked fixed on my machine, haven't tested with a real desk yet but seems good otherwise.

@Vitineth
Copy link
Contributor Author

@wlabarron astounded you don't just have an x32 lying around on your desk to use! As soon as we've got a run on a real desk this will get merged in to make main match the version deployed to the pi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants