-
Notifications
You must be signed in to change notification settings - Fork 2
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 - Brakes sensor #72
base: master
Are you sure you want to change the base?
Conversation
Make modifications so that it build and push. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete this file
if (!optional_reading) { return std::nullopt; } | ||
const auto reading = *optional_reading; | ||
|
||
if (reading == core::DigitalSignal::kHigh) { return false; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need an if statement here - you can just return the condition :)
Brakes::Brakes(core::ILogger &logger, std::shared_ptr<io::IGpioReader> gpio_reader) | ||
: gpio_reader_(gpio_reader), | ||
logger_(logger), | ||
pin_() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need this here? Either pass the pin into the constructor if it may need to be accessible in the future (i.e. if something else might want to know which pin it's using) or remove it from here and the header file
No description provided.