kamilsss655 / uv-k5-firmware-custom

Open re-implementation of the Quansheng UV-K5 firmware
Apache License 2.0
218 stars 36 forks source link

Fix compiler error when setting ENABLE_PWRON_PASSWORD = 0 #145

Closed dchauran closed 4 months ago

dchauran commented 4 months ago

When setting ENABLE_PWRON_PASSWORD to 0, there were compiler failures due to a few lintering references to gEeprom.POWER_ON_PASSWORD and gEeprom.PASSWORD_WRONG_ATTEMPTS. This pull request wraps those references in #ifdef directives. The net saving seems to be aroun 1kb when disabling this feature.

Apparently there is also a significant amount of trailing whtespace in the files, which my editor automatically removes, sorry about that.

kamilsss655 commented 4 months ago

Thanks, looks good so far.

Might take a while to get merged in as I am working on other things.

dchauran commented 4 months ago

No worries, it's a small fix and it is here in case anyone else runs into the issue and wants to know what to change.