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

SNS - High Power Relay #55

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

Hiatus44I
Copy link

No description provided.

@Hiatus44I Hiatus44I self-assigned this Nov 25, 2024
Copy link

linear bot commented Nov 25, 2024

Comment on lines +1 to +6
/// Abstraction for a GPIO pin so that sensors can be tested with a mock GPIO pin
pub trait HypedGpioPin {
fn is_high(&mut self) -> bool;
fn switch_on(&mut self) -> bool;
fn switch_off(&mut self) -> bool;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

We actually need to separate the input and output GPIO pins, like in PR #40 lib/io/src/gpio.rs.

Comment on lines +1 to +3
// need to take in a GPIO pin like Keyence does
// functions: switch_on, switch_off

Copy link
Collaborator

Choose a reason for hiding this comment

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

remove


use hyped_io::gpio::HypedGpioPin;

pub struct HighPowerRelay<T: HypedGpioPin> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add a Rust doc comment here explaining what this does

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.

2 participants