-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: main
Are you sure you want to change the base?
Conversation
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
I've not looked at the code in great detail but my feedback points are:
|
New updates have been released and this has been deployed on the pi @wlabarron - version has been changed, you might have better luck with |
Can confirm that |
@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 |
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 thex32
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