-
Notifications
You must be signed in to change notification settings - Fork 0
1 implement usb tmc #4
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
base: main
Are you sure you want to change the base?
Conversation
…d idn command. Also the test cases are for these functions added
|
|
||
| [dependencies] | ||
| anyhow = "1.0.98" | ||
| rs-usbtmc = { git = "https://github.com/MatzeS/rs-usbtmc" } |
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.
This is publish blocker, but unlikely to resolve soon.
The proposal at https://github.com/KrisNK/rs-usbtmc/issues/5 has been open for 3 weeks and the repo appears to be abandoned... :/
|
|
||
| impl ChannelControl { | ||
| pub fn new(spd: Arc<Mutex<Spd3303x>>, channel: Channel) -> Self { | ||
| impl<D: Driver> ChannelControl<D> { |
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.
Considering the power supply will probably become sync soon, the generic could also be convert to a Box<dyn ...> which might be a bit more ergonomic.
| let data = line.as_str(); | ||
| // TODO copy pasted | ||
| let mut out = String::with_capacity(128); | ||
| request.serialize(&mut out); |
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.
The fact that out.push('\n'); is present in send serialization but not in execute looks very suspicious.
Double check if this is correct, and if yes write a comment.
|
|
||
| self.reader.read_line(&mut line).await?; | ||
| let data = line.as_str(); | ||
| // TODO copy pasted |
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.
Cleanup, see comment below
|
Document udev rules |
|
There is some bug that no response is from the device, when the state goes to 0x00. But I believe this is simply an error in the tmcusb crate that the USB message is incorrectly parsed and identified as zero length when it containes zero bytes. |
No description provided.