-
Notifications
You must be signed in to change notification settings - Fork 2
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
platformio configs #30
Conversation
include/device_config.h
Outdated
@@ -28,17 +28,21 @@ | |||
// #define HAS_BALANCE_BOARD_INTEGRATION | |||
|
|||
// Enable the yukkuri voice talking clock | |||
#ifndef WITHOUT_AQUESTALK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The aquestalk binary detection script sets a flag AQUESTALK_FOUND
, so it may be a good idea to wrap this into that instead of a separate flag.
In such case also change the error down below in the file to a warning to warn the user if the library wasn't found (and move this feature flag down there I guess)
Creating a feature flag for a feature flag as done here is a pattern I would really be against of.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not get how to use that script? For me the project just fails to build until I comment AQUESTALK
in device_config.h
. And it annoys git of a changed file every time I switch the branches.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error you're getting is most likely not a linker failure but a sanity check coming from here:
plasma-clock/include/device_config.h
Line 86 in e03bad7
#error libaquestalk was not found. See `./lib/nonfree-aquestalk/README.md` on how to add it correctly, or disable `HAS_AQUESTALK` feature flag. |
This originally was done to prevent enabling the AquesTalk feature flag when the library file is missing. But now that I think of it, it makes sense to just automatically enable the HAS_AQUESTALK flag when the library is present and disable it otherwise, hence the suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this work?
#ifdef LIBAQUESTALK_FOUND
#define HAS_AQUESTALK
#endif
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so, and add a #warning in #else for good measure, that should fix it for good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes output a bit noisy )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logging is never enough, especially in embedded and CI both of which we have :P
allow disabling AQUESTALK/BT via build flags without hacking device_config
allow disabling AQUESTALK/BT via build flags without hacking device_config
allow user to have it's own platformio configs