can't enable pid #63

Open
opened 2022-01-06 00:09:53 +08:00 by hartytp · 7 comments
from pytec.client import Client
dev = Client("xx.xx.xx.xx")
dev.set_param('pwm', 0, 'pid')

gives raise CommandError(response["error"]). How should one enable the PID control?

``` from pytec.client import Client dev = Client("xx.xx.xx.xx") dev.set_param('pwm', 0, 'pid') ``` gives `raise CommandError(response["error"])`. How should one enable the PID control?

Maybe there is a more useful error message hiding in there somewhere but it's only on the USB UART? e6a5c31db6/src/main.rs (L218-L219)

Maybe there is a more useful error message hiding in there somewhere but it's only on the USB UART? https://git.m-labs.hk/M-Labs/thermostat/src/commit/e6a5c31db60cd1f27606eae3c85cdaf94846f0ea/src/main.rs#L218-L219

This should be covered by a test. f6802635a4/src/command_parser.rs (L650) Where are the test logs?

This should be covered by a test. https://git.m-labs.hk/M-Labs/thermostat/src/commit/f6802635a418b459e8d5beafa6e2373efa0c6585/src/command_parser.rs#L650 Where are the test logs?

Just ERROR - session input: UnexpectedInput(32)

Just `ERROR - session input: UnexpectedInput(32)`

Right, got it!

So, issues I see here:

  1. Command parser errors should be sent to ethernet not the USB
  2. The error message here is pretty unfriendly (why only send the first unexpected character as an integer rather than printing a clear error message?)
  3. pytec is broken. The command parser is fussy about white space but the way the commands are created using " ".join(..) can lead to trailing whitespace which breaks things...
Right, got it! So, issues I see here: 1. Command parser errors should be sent to ethernet not the USB 2. The error message here is pretty unfriendly (why only send the first unexpected character as an integer rather than printing a clear error message?) 3. pytec is broken. The command parser is fussy about white space but the way the commands are created using `" ".join(..)` can lead to trailing whitespace which breaks things...

Also, when I tried to run the tests locally I got a bunch or errors like

error[E0531]: cannot find tuple struct or tuple variant `Err` in this scope
  --> src/main.rs:86:13
   |
86 |             Err(e) =>
   |             ^^^ not found in this scope

cargo build runs without error. Not sure what that's about. Once I found the hydra logs I checked that the firmware tests pass.

Also, when I tried to run the tests locally I got a bunch or errors like ``` error[E0531]: cannot find tuple struct or tuple variant `Err` in this scope --> src/main.rs:86:13 | 86 | Err(e) => | ^^^ not found in this scope ``` `cargo build` runs without error. Not sure what that's about. Once I found the hydra logs I checked that the firmware tests pass.

Not sure what that's about. Once I found the hydra logs I checked that the firmware tests pass.

Rust "nightly" constantly breaks compatibility. Again, things are probably harder than you think and you may want to consider using Nix, which reliably pins all packages and avoids this kind of problem, instead of complaining about it.

> Not sure what that's about. Once I found the hydra logs I checked that the firmware tests pass. Rust "nightly" constantly breaks compatibility. Again, things are probably harder than you think and you may want to consider using Nix, which reliably pins all packages and avoids this kind of problem, instead of complaining about it.
topquark12 was assigned by sb10q 2022-01-19 11:32:00 +08:00
from pytec.client import Client
dev = Client("xx.xx.xx.xx")
dev.set_param('pwm', 0, 'pid')

gives raise CommandError(response["error"]). How should one enable the PID control?

The issue was reproducible, fixed in 1940367dc8 in GUI branch, will be merged into master together with GUI interface.

> ``` > from pytec.client import Client > dev = Client("xx.xx.xx.xx") > dev.set_param('pwm', 0, 'pid') > ``` > > gives `raise CommandError(response["error"])`. How should one enable the PID control? The issue was reproducible, fixed in 1940367dc8 in GUI branch, will be merged into master together with GUI interface.
topquark12 was unassigned by sb10q 2022-12-12 18:37:36 +08:00
esavkin was assigned by sb10q 2022-12-12 18:37:36 +08:00
Sign in to join this conversation.
No Label
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/thermostat#63
There is no content yet.