-
Notifications
You must be signed in to change notification settings - Fork 914
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
Optimise GPS probe code - one message per family #5193
Comments
can you assign this to me? |
Welcome to Meshtastic, we're happy to have you! One way I thought about implementing this was to change the PROBE_SIMPLE macro. At the end, save the command we sent as a variable (lastcmd = TOWRITE). Then, at the start, check if TOWRITE == lastcmd and perform the check of the buffer from last time there. Would require changing GPS::getACK so that it can handle returning the buffer or accepting a pointer to a buffer. Let us know if you need any pointers! |
Hi @fifieldt, I have a few questions. First, can you tell me how the PROBE_SIMPLE macro currently works? To make sure that my modification can work correctly with your project. Second, how do you want me to solve this issue? As I initially understood, I need to add something to store the results of each GPS family, so that I can call a family many times without having to re-execute the PROBE_SIMPLE macro. But according to your suggestion, I understand it in a different way, which is to save the last command. If the next command matches it, I will get the result that was just called to return. Can you explain this issue more clearly? I need to understand clearly to be able to have the correct solution. |
In the GPS probe code (
firmware/src/gps/GPS.cpp
Line 1137 in aae346a
GPS units in the same family sometimes use the same command, but return different results (eg AG3335 and AG3332 both use $PAIR021*39). Currently we run the command once per GPS. Instead we should run each command only once per family, record the result, and select the GNSS MODEL based on the result.
This will mean probing takes a shorter time.
The text was updated successfully, but these errors were encountered: