Skip to content

Change 300ms time delay to a while loop#341

Open
abnv-goyal wants to merge 12 commits intomasterfrom
TunePIDTimeout
Open

Change 300ms time delay to a while loop#341
abnv-goyal wants to merge 12 commits intomasterfrom
TunePIDTimeout

Conversation

@abnv-goyal
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown
Contributor

@huttongrabiel huttongrabiel left a comment

Choose a reason for hiding this comment

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

Really good! Just a couple minor things

Copy link
Copy Markdown
Contributor

@huttongrabiel huttongrabiel left a comment

Choose a reason for hiding this comment

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

Nice! Just a few things to fix

src/TunePID.cpp Outdated
enum class targetmode_t {
step, sinusoidal
enum class targetmode_t
{
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can you move this onto the same line enum class targetmode_t? i thought clang-format would catch this but ig not

Copy link
Copy Markdown
Author

@abnv-goyal abnv-goyal Mar 4, 2025

Choose a reason for hiding this comment

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

so should it be like enum class targetmode_t {step, sinusoidal}; ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Oh you meant the left bracket?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i want it to be like

enum class targetmode_t {
   step,
   sinusoidal
};

but maybe that isn't what clang-format wants

src/TunePID.cpp Outdated
prescaled_target = round(prescaled_target);
}
angle_target = (int32_t) round(amplitude * prescaled_target) + starting_angle;
angle_target = (int32_t)round(amplitude * prescaled_target) + starting_angle;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you use a static_cast instead of a C-style cast?

@abnv-goyal abnv-goyal requested a review from huttongrabiel March 4, 2025 02:43
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