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

ookSwitch returns number of messages in buffer #32

Closed
Achronite opened this issue Aug 10, 2023 · 1 comment · Fixed by #44
Closed

ookSwitch returns number of messages in buffer #32

Achronite opened this issue Aug 10, 2023 · 1 comment · Fixed by #44
Assignees
Labels
done Issue fixed in develop branch
Milestone

Comments

@Achronite
Copy link
Owner

The ookSwitch function sometimes returns a non-zero value when there were messages in the Rx buffer when called. This is not documented very well. For example mqtt-energenie-ener314rt (before v0.5) checked for non-zero return code, and logs an error if non-zero. This is believed to be the dodgy code:

/*
** flush Rx buffer if required
*/
ret = empty_radio_Rx_buffer(DT_CONTROL);
Achronite added a commit to Achronite/mqtt-energenie-ener314rt that referenced this issue Aug 11, 2023
Extensive rewrite of logging in application which is now configurable.
Fixed a bug where the target switch state sometimes fails to be updated in MQTT for OOK devices due to a bug in dependency [energenie-ener314rt#32](Achronite/energenie-ener314rt#32)
Fixed a bug where a stack trace was sometimes output for MQTT connection when exiting application
@Achronite
Copy link
Owner Author

Achronite commented Jan 2, 2024

The record count is used in openthings_scan() to return messages before timeout reached. So the solution should be to change ookSwitch to ignore record count

@Achronite Achronite added this to the v0.7.0 milestone Jan 2, 2024
@Achronite Achronite self-assigned this Jan 4, 2024
@Achronite Achronite added the done Issue fixed in develop branch label Jan 12, 2024
@Achronite Achronite mentioned this issue Feb 20, 2024
@Achronite Achronite linked a pull request Feb 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done Issue fixed in develop branch
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant