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

Create a channel stantard #14

Merged
merged 5 commits into from
Jul 4, 2023

Conversation

RaulTrombin
Copy link
Member

@RaulTrombin RaulTrombin commented Jun 28, 2023

Like we did on navigator-lib, channels should be called with Ch*,

As here:

PwmChannel::Ch1
AdcChannel::Ch1

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

@RaulTrombin RaulTrombin force-pushed the channel_stantard branch 3 times, most recently from d9ea8e6 to d771ec2 Compare June 29, 2023 01:47
@RaulTrombin RaulTrombin marked this pull request as ready for review June 29, 2023 12:39
Copy link
Member

@patrickelectric patrickelectric left a comment

Choose a reason for hiding this comment

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

needs rebase

@RaulTrombin RaulTrombin force-pushed the channel_stantard branch 2 times, most recently from 451dbcd to 561df6e Compare June 29, 2023 18:05
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],
Copy link
Member

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 ?

@RaulTrombin RaulTrombin force-pushed the channel_stantard branch 3 times, most recently from e99b52b to 0a3e34a Compare June 29, 2023 23:56
src/lib.rs Outdated
Comment on lines 312 to 318
///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%
Copy link
Member

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
Comment on lines 328 to 329
/// 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.
Copy link
Member

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.

@@ -310,6 +310,7 @@ impl Navigator {
/// use navigator_rs::{Navigator, PwmChannel};
///
/// let mut nav = Navigator::new();
///
Copy link
Member

@patrickelectric patrickelectric Jun 30, 2023

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.

Copy link
Member

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.

@RaulTrombin RaulTrombin mentioned this pull request Jul 4, 2023
1 task
Copy link
Member

@joaoantoniocardoso joaoantoniocardoso left a comment

Choose a reason for hiding this comment

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

LGTM

@patrickelectric patrickelectric merged commit 648533c into bluerobotics:master Jul 4, 2023
2 checks passed
@RaulTrombin RaulTrombin deleted the channel_stantard branch July 13, 2023 19:50
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