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

Dashing: Don't wait for acknowledge in setTimeMode. #84

Open
wants to merge 4 commits into
base: dashing-devel
Choose a base branch
from

Conversation

clalancette
Copy link
Collaborator

The basic problem is that setTimeMode can be called from within
a GPS object callback (particularly when running as a "base").
Trying to reconfigure the Rate and RTCM while in the callback
leads to a deadlock, as those reconfigure calls try to wait for
data to come in, but new data will never come in since we are
still handling the previous read. The solution here is to not
wait for acknowledgement and just go on, hoping for the best.
It's not an ideal solution, but it solves the problem for now.

Signed-off-by: Chris Lalancette [email protected]

The basic problem is that setTimeMode can be called from within
a GPS object callback (particularly when running as a "base").
Trying to reconfigure the Rate and RTCM while in the callback
leads to a deadlock, as those reconfigure calls try to wait for
data to come in, but new data will never come in since we are
still handling the previous read.  The solution here is to not
wait for acknowledgement and just go on, hoping for the best.
It's not an ideal solution, but it solves the problem for now.

Signed-off-by: Chris Lalancette <[email protected]>
@clalancette clalancette changed the title Don't wait for acknowledge in setTimeMode. Dashing: Don't wait for acknowledge in setTimeMode. Apr 15, 2020
We need to use this version so we can set the correct message
type for all ports.

Signed-off-by: Chris Lalancette <[email protected]>
Signed-off-by: Chris Lalancette <[email protected]>
ublox_msgs::msg::CfgMSGS msgs;
msgs.msg_class = ublox_msgs::Class::RTCM;
msgs.msg_id = rtcm.id;
msgs.rates[ublox_msgs::msg::CfgMSGS::PORT_ID_UART1] = rtcm.rate;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

One thing to note here: I'm only setting the rate on the UART1 port. There seem to be a lot of assumptions around this in the code, so I wasn't sure how to pass in which ports to set. Happy to make some modifications around this as necessary.

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.

1 participant