Skip to content
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

power: crelay: clean up and enable use of multiple compatible devices #83

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

rcooke-warwick
Copy link
Collaborator

@rcooke-warwick rcooke-warwick commented Apr 18, 2024

This allows for specifying the serial number of the crelay compatible relay being used to control power - for the case where multiple connected devices are picked up by crelay tooling (e.g an FTDI usb to serial adapter)

supersedes #81

Change-type: minor

@rcooke-warwick rcooke-warwick mentioned this pull request Apr 18, 2024
@flowzone-app flowzone-app bot enabled auto-merge April 18, 2024 12:29
@perezmeyer
Copy link
Contributor

Love it!

Copy link
Contributor

@vipulgupta2048 vipulgupta2048 left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines +36 to 37
let info = await execAsync(`crelay -i`);
console.log(info.stdout);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
let info = await execAsync(`crelay -i`);
console.log(info.stdout);
console.log((await execAsync(`crelay -i`)).stdout);

@@ -35,18 +44,17 @@ export class Crelay implements Power {
// Power on the DUT
async on(voltage?: number): Promise<void> {
console.log(`Powering on DUT...`);
await execAsync(`crelay ${this.relayId} ${this.connOn}`);
await execAsync(`${this.crelayCmd} ${this.connOn}`);
Copy link
Contributor

Choose a reason for hiding this comment

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

connOn doesn't give a lot of information what this variable would be? Suggest changing it to something more descriptive.

@flowzone-app flowzone-app bot merged commit fe5afd0 into master Aug 22, 2024
47 checks passed
@flowzone-app flowzone-app bot deleted the ryan/crelay-serial branch August 22, 2024 08:44
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.

3 participants