-
Notifications
You must be signed in to change notification settings - Fork 6
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
Create a channel stantard #14
Create a channel stantard #14
Conversation
d9ea8e6
to
d771ec2
Compare
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.
needs rebase
451dbcd
to
561df6e
Compare
src/lib.rs
Outdated
pub fn set_pwm_channels_values<const N: usize>( | ||
&mut self, | ||
channels: &[pwm_Channel; N], | ||
values: &[u16; N], | ||
channels: [PwmChannel; N], |
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.
why we moved from reference to own the list ?
e99b52b
to
0a3e34a
Compare
src/lib.rs
Outdated
///let mut nav = Navigator::new(); | ||
/// | ||
///nav.init(); | ||
///nav.pwm_enable(); | ||
/// | ||
///nav.set_pwm_freq_prescale(99); // sets the pwm frequency to 60 Hz | ||
///nav.set_pwm_channel_value(PwmChannel::Ch0, 2048); // sets the duty cycle to 50% |
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.
It should have a space before the first character of each line of the doc comment
src/lib.rs
Outdated
/// Like [`set_pwm_channel_value`](struct.Navigator.html#method.set_pwm_channel_value). This function | ||
/// sets the Duty Cycle on a list of multiple channels. |
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.
Maybe change the "on" to "for", meaning that the same value is applied to every channel of that list.
…nd *_channels_values)
0a3e34a
to
a40d85e
Compare
@@ -310,6 +310,7 @@ impl Navigator { | |||
/// use navigator_rs::{Navigator, PwmChannel}; | |||
/// | |||
/// let mut nav = Navigator::new(); | |||
/// |
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 not create commits based on PRs, create commits based on what they are doing.
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.
Besides that this is not fixing a PR, is fixing a commit in this PR.
a40d85e
to
747fe10
Compare
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.
LGTM
Like we did on navigator-lib, channels should be called with Ch*,
As here:
*As pointed on Raom meeting, DiffChannels wasn't added to the navigator AdcChannel
Also add more documentation files for set_pwm_channel_value related functions.