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

Expander last_message_age property. #62

Merged
merged 2 commits into from
Aug 9, 2024

Conversation

SeaTechRC
Copy link
Contributor

Hello,

This change enables one to write rules or higher level controls which are dependent on wether or not the expander actually transmits data.
This could be used for motor-movement based on sensor data from a sensor on an expander, where communication could fail or is highly time-critical.

@rodja rodja requested a review from falkoschindler August 7, 2024 15:40
Copy link
Collaborator

@falkoschindler falkoschindler left a comment

Choose a reason for hiding this comment

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

Thanks for the pull request, @SeaTechRC! The "last_message_age" property is a great idea!

I just added it to the documentation and removed some trivial comments.
And I think this->last_message_millis = millis(); can be moved out of the if-condition checking for "!!". This condition is only for distinguishing broadcast messages that need to be evaluated as Lizard code and other messages that will simply be printed to the terminal. last_message_millis should always be updated, independent of the message type or content.

@Johannes-Thiel Can you briefly check this new feature with a Robot Brain? Thanks!

@falkoschindler falkoschindler added the enhancement New feature or request label Aug 8, 2024
@falkoschindler falkoschindler added this to the 0.3.0 milestone Aug 8, 2024
@Johannes-Thiel
Copy link
Collaborator

I did a test on the testbrain and the result was as expected.

@Johannes-Thiel Johannes-Thiel merged commit a0d21fe into zauberzeug:main Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants