Skip to content

Commander: parse once, improve parsing - #598

Open
Moddingear wants to merge 1 commit into
simplefoc:devfrom
Moddingear:commander_parse_once
Open

Moddingear wants to merge 1 commit into
simplefoc:devfrom
Moddingear:commander_parse_once

Conversation

@Moddingear

@Moddingear Moddingear commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Description

Current parser parses anywhere between 1 to 3 times a command. Also it uses atof (double) instead of atoff (float).

It can also be thrown off by commands coming in too fast, so it ends up getting malformed commands, and unpacking a wrong value.

This makes sure that the unpacked command is correctly formed (letter then (optional) value then newline), and only parsed once. Anything before is discarded.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Tested on Phoque2 as part of a bigger set of changes.

This branch has not been deployed

No deployments
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.

1 participant