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

refactor: misc #2

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

refactor: misc #2

wants to merge 14 commits into from

Conversation

reiniiriarios
Copy link
Collaborator

@reiniiriarios reiniiriarios commented Apr 30, 2024

  • when strcmp already exists, compiler throws error that int16_t is not int
  • add strncasecmp
  • split i2c and user commands into own functions
  • simplify command type filtering logic
  • refactor command struct to class
    • this makes more sense as this code doesn't need to be visible to end-user
    • if keeping this, my recommendation is to make properties private that can be
  • fix i2c command/args length issue
    • if my understanding is correct, the end result of removeSpaces is that, in the case of I2CWFFFFFF, the cmdLength will be 10 and argsLength 0??
  • simplify error setting
    • the error_t struct needs access to the PROGMEM strings
    • alternative approach: move set() fn outside of error_t struct
    • alternative approach: refactor error_t to Error class, implemented in cpp file instead

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.

None yet

1 participant