Skip to content

fix: preserve hexadecimal EEPROM addresses - #60

Closed
n3orma wants to merge 1 commit into
bitcraze:mainfrom
n3orma:fix-config-hex-address
Closed

n3orma wants to merge 1 commit into
bitcraze:mainfrom
n3orma:fix-config-hex-address

Conversation

@n3orma

@n3orma n3orma commented Oct 17, 2026 •

Copy link
Copy Markdown

Summary

Fix hexadecimal address parsing in config set. Previously, an input such as address=0x10 was converted to the decimal string 16, then interpreted as hexadecimal 0x16.

  • Preserve hexadecimal digits and leading zeros in EEPROM addresses.
  • Support both 0x and 0X prefixes.
  • Keep existing numeric conversion for other configuration values and parameters.
  • Add four regression tests covering address formats, numeric parsing, and invalid input.

Fixes #46

Validation

  • git diff --check
  • cargo test --locked config_address_tests
  • cargo test --locked
  • cargo build --locked

Signed-off-by: Dharmesh Makvana <212810347+n3orma@users.noreply.github.com>
@ArisMorgens

Copy link
Copy Markdown
Member

Hi @n3orma, thanks for your contribution!

We have recently updated our General guidelines for code contributions. This pull request was opened before the update, so nothing was done wrong, but we'd like all open pull requests to follow the new guidelines before we review them. For this pull request, that means:

  • Verify the problem first: config set address=0x... rejects or mangles the address #46 was found by reading the code and has not been reproduced on a Crazyflie yet. Before working on a fix, the problem needs to be confirmed on hardware. If you have a Crazyflie, please comment on config set address=0x... rejects or mangles the address #46 with the OS, platform, firmware version, the config set address commands you ran, and what you observed when reading the config back.
  • Agree on the approach: once the problem is confirmed, please describe in config set address=0x... rejects or mangles the address #46 how you would like to solve it. The issue suggests two options: skip the decimal conversion for address, or drop the conversion and let each key parse its own value. We'd like to agree on one before reviewing a solution.
  • Hardware testing: since this change writes to the Crazyflie's EEPROM, the pull request should also describe the hardware tests you ran with the fix and what you observed.

We're closing this pull request until the problem has been verified and we have agreed on the approach. Once we have, we'll reopen it, or you can open a new one with the agreed solution.

Thanks for your understanding, and if you have any questions, just ask!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

config set address=0x... rejects or mangles the address

2 participants