Skip to content

Advanced message parsing - #34

Open
leon0399 wants to merge 2 commits into
arduino:mainfrom
leon0399:feature/advanced-parsing
Open

leon0399 wants to merge 2 commits into
arduino:mainfrom
leon0399:feature/advanced-parsing

Conversation

@leon0399

@leon0399 leon0399 commented Feb 27, 2024 •

Copy link
Copy Markdown

This PR adds a few different new features to the parsing algorithm:

Left-padded values

Sometimes, you want to take a glance at values without opening Serial Plotter. Without left padding this makes values jump horizontally, making it hard to follow changes. This closes #20

RawThumbCurl: 23, RawIndexCurl: 0, RawMiddleCurl: 321, RawRingCurl: 1245, RawPinkyCurl: 0, RawJoyX: 323, RawJoyY: 1973
RawThumbCurl: 0, RawIndexCurl: 0, RawMiddleCurl: 21, RawRingCurl: 54, RawPinkyCurl: 8, RawJoyX: 23, RawJoyY: 173
RawThumbCurl: 1973, RawIndexCurl: 231, RawMiddleCurl: 221, RawRingCurl: 2304, RawPinkyCurl: 2568, RawJoyX: 2003, RawJoyY: 173

With these changes, you can now left-pad values (Serial.printf("Label_1: %4u", value))

RawThumbCurl:   23, RawIndexCurl:    0, RawMiddleCurl:  321, RawRingCurl: 1245, RawPinkyCurl:    0, RawJoyX:  323, RawJoyY: 1973
RawThumbCurl:    0, RawIndexCurl:    0, RawMiddleCurl:   21, RawRingCurl:   54, RawPinkyCurl:    8, RawJoyX:   23, RawJoyY:  173
RawThumbCurl: 1973, RawIndexCurl:  231, RawMiddleCurl:  221, RawRingCurl: 2304, RawPinkyCurl: 2568, RawJoyX: 2003, RawJoyY: 173

Separate label and value with = (equals sign)

Given I am already refactoring parsing, I decided also to close #22, because it happened to me also, that I used = by mistake

@CLAassistant

CLAassistant commented Feb 27, 2024 •

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@leon0399
leon0399 force-pushed the feature/advanced-parsing branch from f124fa4 to aff3e74 Compare February 27, 2024 19:52
@codecov-commenter

codecov-commenter commented Feb 27, 2024 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 94.44444% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 86.88%. Comparing base (22c6952) to head (aff3e74).

Files Patch % Lines
src/msgAggregatorWorker.ts 94.44% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #34      +/-   ##
==========================================
- Coverage   87.71%   86.88%   -0.84%     
==========================================
  Files           1        1              
  Lines          57       61       +4     
  Branches       12       10       -2     
==========================================
+ Hits           50       53       +3     
  Misses          3        3              
- Partials        4        5       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@leon0399

This comment was marked as duplicate.

@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Mar 1, 2024
@leon0399

This comment was marked as duplicate.

@arduino arduino locked as too heated and limited conversation to collaborators Jun 24, 2024
@arduino arduino unlocked this conversation Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: code Related to content of the project itself type: enhancement Proposed improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add '=' as valid label value separator symbol Having [space] as a separator is a really BAD idea...

4 participants