Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Advanced message parsing #34

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

leon0399
Copy link

@leon0399 leon0399 commented Feb 27, 2024

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
Copy link

CLAassistant commented Feb 27, 2024

CLA assistant check
All committers have signed the CLA.

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

codecov-commenter commented Feb 27, 2024

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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