-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[gps] fix ubx ucenter autobaud and autoconf #1480
Conversation
@@ -457,12 +461,12 @@ static bool_t gps_ubx_ucenter_configure(uint8_t nr) | |||
if (gps_ubx_ucenter.reply != GPS_UBX_UCENTER_REPLY_ACK) { | |||
DEBUG_PRINT("ublox did not acknowledge port configuration.\n"); | |||
} else { | |||
DEBUG_PRINT("Changed ublox baudrate to: %u\n", UART_SPEED(UBX_GPS_BAUD)); | |||
DEBUG_PRINT("Changed ublox baudrate to: %u\n", UART_BAUD(gps_ubx_ucenter.baud_target)); |
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.
should be UART_SPEED?
Should be fine now. @fvantienen can you test on Bebop2 or any other UBX8 gps ? |
@dewagter maybe you can test this, since @fvantienen is on vacation? |
Actually this thing is half broken since f4ada86. Since it is saving the conf at the end and that that most of the receiver have flash, any older gps using ucenter module kept working because parameters were already correct. |
[gps] fix ubx ucenter autobaud and autoconf The reason it is not working (at least one of the reasons...) is that the autobaud function is not working. Or exactly it is not very robust to properly catch the ACK. And if it happens to work (either it found the correct value while testing them or it falls back to the default and it is the correct one), it will not set the uart to the "new" value. It will send the message to set the baudrate to the last tested rate. This is because UBX_GPS_BAUD is defined to GPS_LINK.baudrate which is set to the last value, not the initial one. The end result in most cases is that the modules are saturated with messages at 9600 bauds and that the reply of the version request fails, and then the NAV config is sent instead of NAV5. I'm going to try this patch: - save target baudrate at init - use NAV5 by default if version couldn't be fetched
I can confirm it now works nicely: change from any baudrate to any baudrate, also on ublox8 devices. |
Paparazzi v5.8.0_stable ======================= Stable version release. - module: nav_catapult: avoid conditional directives [paparazzi#1454] (paparazzi#1454) - module: gps_ubx_ucenter fix autobaud and autoconf for ublox-8 [paparazzi#1480] (paparazzi#1480) - module: add stereocam2state which publishes a VELOCITY_ESTIMATE from stereocam [paparazzi#1486] (paparazzi#1486) - arch/linux: I2C: use repeated-start for transceive as required by some sensors [paparazzi#1469] (paparazzi#1469) - remove unused libeknav and fms folder [paparazzi#1487] (paparazzi#1487)
should fix #1459
tested on UBX M8M module with default config at startup