-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add support for F() macro #15
Comments
The way I think we handle this is by providing an F() macro in the base logger, which is defined if there isn't one defined in the logging strategy. This would ensure that logger code doesn't have to change. We would need a derived strategy which handles F() appropriately, needs to read the string from flash. We can't put this in the base necessarily because we might want to use the logger with unit tests that don't include Arduino.h/WString.h. We should allow swapping to a strategy which just passes these strings through if there's no overriding implementation. One implication, however, is that the F() macro must be included/defined by the Arduino headers before including the base logger header. |
|
We do not currently handle strings stored in flash via the F() macro.
https://andybrown.me.uk/wk/wp-content/images//avr-gcc-4.7.0/WString.h
https://github.com/esp8266/Arduino/blob/master/cores/esp8266/Print.h
The text was updated successfully, but these errors were encountered: