Skip to content

Conversation

@MatzeS
Copy link
Owner

@MatzeS MatzeS commented Jul 29, 2025

No description provided.

@MatzeS MatzeS linked an issue Jul 29, 2025 that may be closed by this pull request

[dependencies]
anyhow = "1.0.98"
rs-usbtmc = { git = "https://github.com/MatzeS/rs-usbtmc" }
Copy link
Owner Author

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> {
Copy link
Owner Author

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);
Copy link
Owner Author

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
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleanup, see comment below

@MatzeS
Copy link
Owner Author

MatzeS commented Jul 30, 2025

Document udev rules

@MatzeS
Copy link
Owner Author

MatzeS commented Jul 30, 2025

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.
Or the device cuts the response string short because it does not encode a zero byte correctly.
This needs more debugging

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.

Implement USB TMC

2 participants