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

Added tone() and noTone() stubs #69

Merged
merged 1 commit into from
Aug 8, 2022

Conversation

kwisii
Copy link
Contributor

@kwisii kwisii commented Aug 4, 2022

Added simple stubs for tone methods

@@ -65,6 +65,16 @@ unsigned long micros() {
return us;
}

void tone(uint8_t _pin, unsigned int frequency, unsigned long duration)
Copy link
Owner

@bxparks bxparks Aug 4, 2022

Choose a reason for hiding this comment

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

nit: change this to

void tone(uint8_t /*_pin*/, unsigned int /*frequency*/, unsigned long /*duration*/) {}

because

  1. The compiler will warn about unused variables otherwise.
  2. Curly brace on previous line, for consistency. (I know the Arduino code base has wildly inconsistent coding style and other ugliness. I try to keep my code somewhat consistent.)

return;
}

void noTone(uint8_t _pin)
Copy link
Owner

Choose a reason for hiding this comment

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

nit: change this to

void noTone(uint8_t /*_pin*/) {}

@kwisii
Copy link
Contributor Author

kwisii commented Aug 8, 2022

You are right!
I did not actively notice my auto formatting...
I changed this to your recommendation

@bxparks bxparks merged commit c5e5365 into bxparks:develop Aug 8, 2022
@bxparks
Copy link
Owner

bxparks commented Aug 8, 2022

Merged. Thank you.

@kwisii kwisii deleted the feature/tone_stubs branch August 9, 2022 04:56
@bxparks bxparks mentioned this pull request Aug 13, 2022
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