-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
Fix return type of ArduinoLEDMatrix::begin() #282
Conversation
Hi @mast-eu , |
Could supersede #225 |
Yes, I can amend the PR. But why do you want to keep
ArduinoCore-renesas/cores/arduino/pwm.cpp Line 41 in aee54e9
|
|
2e8e95a
to
4a5632f
Compare
4a5632f
to
2c8dd57
Compare
@facchinm Please have a look. I've changed the implementation to provide a meaningful return value. I preferred |
Super, looks much better now! Merging |
I think this change was incorect because of using bool type. Data type of begin() is actually important because begin() of ArduinoLEDMatrix overrides begin() of ArduinoGraphics and ArduinoGraphics define begin as
|
While playing around with the LED matrix on my Arduino R4 WiFi I noticed that the function
ArduinoLEDMatrix::begin()
causes a compiler warning:(This is what I observe after setting
Preferences -> Compiler Warnings
toAll
)The reason appears to be very simple:
ArduinoLEDMatrix::begin()
is declared to return anint
, but never returns anything. I think this is actually ok, since the function has nothing useful it could return.Thus I send you this PR to change it's return type from
int
tovoid
.