-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add serial connection #34
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #34 +/- ##
==========================================
+ Coverage 43.47% 43.91% +0.44%
==========================================
Files 18 20 +2
Lines 651 690 +39
==========================================
+ Hits 283 303 +20
- Misses 368 387 +19 ☔ View full report in Codecov by Sentry. |
bdf405d
to
ed95aec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good. Just a couple of minor suggestions.
This is good now, but could you squash everything into one commit? Changing the dependency list and then changing it back again is still losing the history. I think the easiest way to do this (besides lazygit) is
|
Im happy to do this - Although I would suggest the easiest way is "Squash and merge" |
With squash and merge you don't get a merge commit. Or rather it turns your commit into a merge commit and puts it on top, so there is not visible merge in the graph. |
Expand dependancy list rename aioserial_instance to stream
de19011
to
7eb9da1
Compare
As you wish. BTW the easy way IMO is |
I tested this against both a virtual serial device (based on https://stackoverflow.com/questions/52187/virtual-serial-port-for-linux) as well as some hardware (Thorlabs MFF usb serial device). To test virtually:
Create virtual serial port in terminal 1
socat -d -d pty,raw,echo=0 pty,raw,echo=0
Returns:
Connect controller in terminal 2
test-demo # port="/dev/pts/10"
- DiamondLightSource/demo-fast-cs#11Send serial device response in terminal 3
Test the position AttrR (can inspect via Phoebus screen)
echo -e -n "\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01" > /dev/pts/9
or
echo -e -n "\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02" > /dev/pts/9
Monitor port in terminal 4 (optional)
cat -v /dev/pts/9
Can see what the controller sends