-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Add GPS Status Line to CLI Status Output #12769
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
Add GPS Status Line to CLI Status Output #12769
Conversation
…rial port baud + configured baud, configured status.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👾
This comment has been minimized.
This comment has been minimized.
AUTOMERGE: (FAIL)
|
Tested and works OK on a quad using a Beitian BE-220 (M10)... After turning off auto-baud and setting ports to auto, saw that the gps also connected at 57600 and 115200, for what it's worth. statusMCU F722 Clock=216MHz, Vref=3.27V, Core temp=48degC |
This comment has been minimized.
This comment has been minimized.
src/main/io/gps.c
Outdated
@@ -1985,4 +1985,9 @@ float getGpsDataIntervalSeconds(void) | |||
return gpsDataIntervalSeconds; | |||
} | |||
|
|||
baudRate_e getGPSPortActualBaudRateIndex(void) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it enough tu return baudrate, not index?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The baud rate index seems to be representation used in a lot of other places. For example, the configured GPS baud rate is represented as an index and a lot of functions in the serial library and elsewhere deal in indexes. I thought it good to maintain consistency with that convention for that getter.
The code in cli.c at lines 4749-4753 prints the two baud rates, so I also thought that code block would look more consistent to deal in indexes and have the two statements perform the similar array lookup, rather than having them use two different approaches.
Awesome work! |
My only suggestion is perhaps to include the text For example,
|
Good stuff @ZzyzxTek |
Done, thanks! |
I’ve tested this it works good. Very useful |
* Add GPS status line to cli status output: connected status, UART + serial port baud + configured baud, configured status. * Fixed unit test link fail. * Really fixed unit test link fail (I hope). * Really fixed unit test link fail (no really this time). * Updated to address code reviews. * Updated to address code reviews. * Updated to address code reviews.
* Add GPS status line to cli status output: connected status, UART + serial port baud + configured baud, configured status. * Fixed unit test link fail. * Really fixed unit test link fail (I hope). * Really fixed unit test link fail (no really this time). * Updated to address code reviews. * Updated to address code reviews. * Updated to address code reviews.
* Add GPS status line to cli status output: connected status, UART + serial port baud + configured baud, configured status. * Fixed unit test link fail. * Really fixed unit test link fail (I hope). * Really fixed unit test link fail (no really this time). * Updated to address code reviews. * Updated to address code reviews. * Updated to address code reviews.
Note: This is "Part 1" of a series of additions for the GPS Status Line functionality. See [future] comments below for planned additions.
Adds a new
GPS: ....
status line to the output of the CLIstatus
command.The
GPS: ...
status line will appear only when the firmware has been built with theUSE_GPS
feature define.If the GPS feature is not enabled, the GPS status line will show
GPS: NOT ENABLED
.The GPS status line shows a list of status items following
GPS:
:NOT CONNECTED
orconnected
.UARTn actualBaudRate (set to configuredBaudRate)
, for example:UART4 115200 (set to AUTO)
when using UART4 connected at 115200 configured with GPS Auto Baud on.UART4 57600 (set to 57600)
when using UART4 connected at 57600 configured with GPS Auto Baud off and the serial port configured for 57600.auto config OFF
,NOT CONFIGURED
orconfigured
.See attached status output screen captures for illustrations of the above output (GPS status is next to last line). (Note the screen shots are a bit out of date vs. the above description.)
Additional Notes:
configured
status only means the state machine has moved through the configuration steps.