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

Driver function lr_fhss_get_hop_sequence_count() returns a status instead of a count. #12

Closed
rdaubencd opened this issue Aug 11, 2023 · 2 comments

Comments

@rdaubencd
Copy link

rdaubencd commented Aug 11, 2023

This driver function is called with the expectation that it will return an unsigned integer for the count. But its interface is defined with a return of a status.

From ral_sx126x.c this is the implementation:

ral_status_t ral_sx126x_lr_fhss_get_hop_sequence_count( const void*                 context,
                                                        const ral_lr_fhss_params_t* lr_fhss_params )
{
    sx126x_lr_fhss_params_t sx126x_params;
    ral_sx126x_convert_lr_fhss_params_from_ral( lr_fhss_params, &sx126x_params );

    return ( ral_status_t ) sx126x_lr_fhss_get_hop_sequence_count( &sx126x_params );
}

This should be changed to return the actual count:

unsigned int ral_sx126x_lr_fhss_get_hop_sequence_count( const void*                 context,
                                                        const ral_lr_fhss_params_t* lr_fhss_params )
{
    sx126x_lr_fhss_params_t sx126x_params;
    ral_sx126x_convert_lr_fhss_params_from_ral( lr_fhss_params, &sx126x_params );

    return sx126x_lr_fhss_get_hop_sequence_count( &sx126x_params );
}

The other radio drivers probably have the same issue.

@lbm-team
Copy link
Contributor

Hi @rdaubencd ,
Thanks for your message.
Good catch!
This issue will be solved in next LBM release.

@lbm-team
Copy link
Contributor

Hi @rdaubencd

This issue is now fixed in new v4.3.0 release and mentioned in CHANGELOG.

Line updated in ral_sx126x.c can be found here

Line updated in ral_lr11xx.c can be found here

Once more thanks for your report

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

No branches or pull requests

2 participants