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

Thingset Synchronization with bq76952 Initialization #63

Open
Ananyaaynana opened this issue Mar 12, 2024 · 1 comment
Open

Thingset Synchronization with bq76952 Initialization #63

Ananyaaynana opened this issue Mar 12, 2024 · 1 comment

Comments

@Ananyaaynana
Copy link
Contributor

Description:

Feasibility of using semaphores to synchronize the execution of the Thingset with the initialization of the bq76952. Currently, when the live publication is enabled thingset executes before bq76952 is initialized. This leads to the publication of incorrect values.

Current Approach:

A few changes made by us to the code currently employ semaphores to ensure data consistency between the PC-provided current, voltage, and temperature inputs, and the SOC (State of Charge) output received from the board. This approach guarantees that the Thingset operates with synchronized data sets.

Proposed Synchronization with bq76952:

Would a semaphore-based synchronization method ensure the Thingset only starts execution after the bq76952 has finished initializing be feasible? This would prevent the Thingset from using potentially invalid or incomplete data during its initial execution phase.

Can semaphores be effectively utilized to achieve synchronization between the Thingset and bq76952 initialization?
Are there any potential drawbacks or limitations to this approach?

@martinjaeger
Copy link
Member

That's a very good point.

I don't think we need semaphores for that, but we could integrate something like a trigger into the ThingSet Zephyr SDK that inhibits publication of messages before valid data was read.

Will mark this as an enhancement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants