Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Flashify defines #58

Open
p-h-a-i-l opened this issue Jul 1, 2019 · 1 comment
Open

Flashify defines #58

p-h-a-i-l opened this issue Jul 1, 2019 · 1 comment
Labels
enhancement New feature or request Not a bug

Comments

@p-h-a-i-l
Copy link
Member

As mentioned here: #55

Change lots of hardcoded magic numbers to flash stored values which can be updated via serial protocol.
Especially ADC parameters need to be update-able via protocol.

@btsimonh: We still need to have the default values somewhere. I'd still use defines but use them only for flash initialization. Do you know of a better way?

@p-h-a-i-l p-h-a-i-l added enhancement New feature or request Not a bug labels Jul 1, 2019
@btsimonh
Copy link
Contributor

btsimonh commented Jul 1, 2019

I'm happy with them in the non excluded part of config.h, and with allowing re-definition of them from the env, like you have:

#ifndef ADC1_MAX
  #define ADC1_MAX      4095        // max ADC1-value while poti at maximum-position (0 - 4095)
#endif

These would then be the defaults put into flash or used if the flash did not contain them. (short read of flash?).
On flash write, they would be written.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request Not a bug
Projects
None yet
Development

No branches or pull requests

2 participants