Skip to content

chore: better err logging in radiolib #6164

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

Closed
wants to merge 1 commit into from

Conversation

rostekus
Copy link
Contributor

I added an additional check for specific Radiolib and included logs.

Should I also add logs in places where there are none? For example:

    err = lora.setBandwidth(bw);
    if (err != RADIOLIB_ERR_NONE)
        RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING);

@@ -131,7 +131,9 @@ template <typename T> bool SX128xInterface<T>::reconfigure()
RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING);

err = lora.setSyncWord(syncWord);
if (err != RADIOLIB_ERR_NONE)
if (err == RADIOLIB_ERR_WRONG_MODEM)
LOG_ERROR("SX128X setSyncWord: WRONG MODEM error %s%d", radioLi / bErr, err);
Copy link
Contributor

Choose a reason for hiding this comment

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

Syntax error here

Copy link
Member

@caveman99 caveman99 left a comment

Choose a reason for hiding this comment

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

That's an awful lot of verbiage added. Can we just output the numerical error value when something goes wrong? That would save a bit of flash space.

@caveman99
Copy link
Member

This PR seems abandoned. Please re-open if neccessary

@caveman99 caveman99 closed this Mar 31, 2025
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