-
Notifications
You must be signed in to change notification settings - Fork 251
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 compile-time options for all preferences to movement_config #295
Conversation
9fd729d
to
868fecd
Compare
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.
This is great! More compile time customization features is always good.
Further improvements can be built on top of this in the future: setting flags like these could be made to cause the settings variables to be deleted and their references turned into compile time constants. This will allow compilers to partially evaluate functions and to eliminate dead code automatically, making for a smaller and more efficient program.
Adds overridable C preprocessor definitions for every user preference. Enables the user to set defaults and omit the preferences face. The default behavior of the watch is preserved. Suggested-by: Wesley Aptekar-Cassels <[email protected]> Implemented-by: madhogs <[email protected]> Reviewed-by: Matheus Afonso Martins Moreira <[email protected]> Signed-off-by: Matheus Afonso Martins Moreira <[email protected]> GitHub-Pull-Request: joeycastillo#295 GitHub-Related-Issue: joeycastillo#291
Adds overridable C preprocessor definitions for every user preference. Enables the user to set defaults and omit the preferences face. The default behavior of the watch is preserved. Suggested-by: Wesley Aptekar-Cassels <[email protected]> Implemented-by: madhogs <[email protected]> Reviewed-by: Matheus Afonso Martins Moreira <[email protected]> Signed-off-by: Matheus Afonso Martins Moreira <[email protected]> GitHub-Pull-Request: joeycastillo#295 GitHub-Related-Issue: joeycastillo#291
Adds overridable C preprocessor definitions for every user preference. Enables the user to set defaults and omit the preferences face. The default behavior of the watch is preserved. Suggested-by: Wesley Aptekar-Cassels <[email protected]> Implemented-by: madhogs <[email protected]> Reviewed-by: Matheus Afonso Martins Moreira <[email protected]> Signed-off-by: Matheus Afonso Martins Moreira <[email protected]> GitHub-Pull-Request: joeycastillo#295 GitHub-Related-Issue: joeycastillo#291
Adds overridable C preprocessor definitions for every user preference. Enables the user to set defaults and omit the preferences face. The default behavior of the watch is preserved. Suggested-by: Wesley Aptekar-Cassels <[email protected]> Implemented-by: madhogs <[email protected]> Reviewed-by: Matheus Afonso Martins Moreira <[email protected]> Signed-off-by: Matheus Afonso Martins Moreira <[email protected]> GitHub-Pull-Request: joeycastillo#295 GitHub-Related-Issue: joeycastillo#291
Am now running this code on real hardware. Used it to set 24h as default. Worked. No issues. |
@matheusmoreira That's great to hear, thanks for looking at this. Let me know if there is anything more needed to merge this in. |
I think the upstream maintainers are reviewing it right now. I'm looking forward to it. In any case, it's already been merged into my branch¹ along with several other pull requests. I'm running that branch on my watch with no issues so far. You're welcome to use it if you'd like! |
@madhogs, since there are "instant" LED activation and 10 min. LE timeout, there need to be some additions in your code, right? I'm not so familiar with this, so just a note. |
@814d3 yes, this was merged after the 10min timeout option was merged and unfortunately needs changing. I have adjusted the options in my next pr here #387 . This fixes the comment and puts the default back to 1 hour. |
PR to add compile-time options for all preferences to movement_config.h.
I have set the values to match all currently existing defaults.
This will allow the user to omit the preferences face if they wish and define all options at build time.
Addresses issue - #291 (some of it at least)