Closed scottbarnesg closed 5 years ago
Serial.println()'ing from a library is considered bad taste - you may want to, instead, have an #ifdef that people can turn on for more debugging - that's a much better ideas! also please use F("string") so AVRs dont use RAM for strings. thanks!
Updated per @ladyada's feedback:
DEBUG_SERIAL
definition (commented out)ifdef
around all Serial.print statementsF("string")
for eligible Serial.print statements (exception: line 74 not defined until run time).Another option would be to update the RH_RF95 class with optional debug parameter that defaults to false, but I wasn't sure if this would cause compilation issues with environments that don't support Serial
. Are there any target environments that don't support Serial
? If not, I think this would be the better option.
nice thank you :)
Fixes Issue #31: Insufficient error messages on RH_RF95 init.
Adds error messages for each failure (
return false
) condition of the RH_RF95 init function. This will make debugging initialization issues significantly easier for users.