Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@haydenroche5
Copy link
Collaborator

Also, fix a couple problems in n_ua.c:

  • The logic for putting the Atollic GCC compiler in the user agent object was written such that it would never trigger.
  • We allow the user to set n_cpu_name via NoteSetUserAgentCPU, but then in NoteUserAgent we were overriding whatever they set it to, based on preprocessor logic. I moved that preprocessor logic out so that it controls the default value of n_cpu_name, but if the user overrides it, that's what we put in the user agent object.

Also, fix a couple problems in n_ua.c:

- The logic for putting the Atollic GCC compiler in the user agent object was
written such that it would never trigger.
- We allow the user to set n_cpu_name via NoteSetUserAgentCPU, but then in
NoteUserAgent we were overriding whatever they set it to, based on preprocessor
logic. I moved that preprocessor logic out so that it controls the default
value of n_cpu_name, but if the user overrides it, that's what we put in the
user agent object.
- NoteFactoryReset
- NoteSetProductID
- NoteSetSerialNumber
- NoteSetSyncMode
- NoteSetUploadMode
- NoteTemplate
static char *n_cpu_vendor = NULL;

static char *n_cpu_name = NULL;
#if defined(ARDUINO_ARCH_ARC32)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why change the whitespace? Was this done by the linter?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. astyle removed the indentation.

char *compiler = (char *) ("gcc" PLUS " " __VERSION__);
#elif defined(__ATOLLIC__) && defined(__GNUC__)
char *compiler = (char *) ("atollic gcc" PLUS " " __VERSION__);
#elif defined(__GNUC__)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is fine, but I will take this opportunity to belly ache that I would like to see modifications performed on the underlying library as separate PRs from unit-tests.

To me it seems cleaner, and maintains the separation of church and state.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with that going forward.

@rayozzie rayozzie merged commit 4877eac into blues:master Mar 7, 2023
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.

3 participants