can't enable pid #63

Open
opened 11 months ago 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?
Poster

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
Poster

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?
Poster

Just ERROR - session input: UnexpectedInput(32)

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

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...
Poster

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.
Owner

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 11 months ago
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.
Sign in to join this conversation.
No Label
No Milestone
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

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