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

React UI #7

Merged
merged 16 commits into from
Sep 11, 2023
Merged

React UI #7

merged 16 commits into from
Sep 11, 2023

Conversation

TeraMika
Copy link
Collaborator

@TeraMika TeraMika commented Sep 6, 2023

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.

@TeraMika
Copy link
Collaborator Author

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.

@TeraMika TeraMika merged commit bb6be3f into main Sep 11, 2023
@TeraMika TeraMika deleted the react-ui branch September 11, 2023 12:24
@TeraMika TeraMika mentioned this pull request Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant