-
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
React UI #7
Conversation
Following feedback from the code review, the improvement to make here would be adding Modbus error handling and client re-establishment to the adapter. At present it needs to be restarted to return to life since client connection is in init. A nice change would be adding modularity, particularly for the PID controller parameter trees. This would significantly cut down on the visual clutter in the file and make it much more readable. At a minimum, the LiveX class could be moved to its own file to remove the ~200 lines of setup above it. |
References #3
Changes Made
+
adapter.py
now has a full tree with the updated controls, and gets all relevant information on startup and each time+React is now used for the UI. This includes a number of other files and images
+This allows for proper and straightforward UI -> adapter -> modbus -> device control
Additionally, this PR inherits a number of changes from this PR: #5 as it was branched off of that with the view that this was definitely not within scope for that PR. But since then it hasn't modified files on that branch at all, so should be compatible without issue (if there is an issue, files in PR #5 are preferred as they are more recent) with github seems to agree with.
Potential future work
The adapter would benefit from further modularity, making 'LiveX' its own file, especially the PID controls. This makes it much more readable for when controls are added that are not simply modbus communications, such as the cameras.
There is no handling for the modbus connection terminating, which so far has only happened when the device is disconnected in some way (such as being unplugged or new code being uploaded), which does require a restart of Odin-control. This should be implemented.