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

uart: set baudrate as configured in config file #32

Closed
wants to merge 77 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
ef16634
fix build on Windows
mzembsbg Oct 19, 2021
4823326
remove build status
mzembsbg Oct 20, 2021
c65ed4c
Added subscription to RTCM msg
cledant May 30, 2023
e308f8f
Added publisher for nmea msg
cledant May 31, 2023
a57302e
Fixed deprecated header warning
cledant Jun 2, 2023
9ce8d6c
Added rtcm / nmea parameters in config files
cledant Jun 2, 2023
b8309a4
Improved NMEA GGA message
cledant Jun 5, 2023
b1664cd
Code documentation
cledant Jun 6, 2023
2612c90
Realigned members.
cledant Jun 7, 2023
07ef7aa
Fixes in GGA serialization
cledant Jun 7, 2023
2c8fbcf
Namespace related coding style fix
cledant Jun 7, 2023
d30ba53
Removed threaded subscription.
cledant Jun 12, 2023
a6b07f3
Removed SbgInterface as class member
cledant Jun 12, 2023
b606293
Updated documentation
cledant Jun 12, 2023
5979b24
Switched dependency from mavros_msgs to rtcm_msgs
cledant Jun 12, 2023
3dd2261
Removed MessageSubscriber class
cledant Jun 12, 2023
06b3797
Added documentation about RTCM messages and device configuration.
cledant Jun 27, 2023
ec40b19
Reworked and improved main project README and small fixed in yaml exa…
Aug 11, 2023
9c62d7d
Code cleanup - removed (void) as it is not recommended in C++
Aug 11, 2023
bf82be6
Improved RTCM and NMEA parameters naming
Aug 11, 2023
256391c
Improved GGA generation and code cleanup
Aug 11, 2023
ad0de10
Compilation fix
cledant Aug 11, 2023
540b27a
NTRIP: GGA generation Work In Progress with the following fixex:
Aug 14, 2023
675f85a
Compilation fixes
cledant Aug 16, 2023
a27ac78
Fixed nmea output condition
cledant Aug 16, 2023
c70994b
Merge pull request #15 from SBG-Systems/ntrip_clean
rsiryani Aug 17, 2023
086cd4f
Fixed Euler / Quaternion orientation in ENU mode
cledant Jun 30, 2023
cbc2b1e
Updated ROS messages documentation
cledant Jun 30, 2023
ef1947b
Refactored NED to ENU array conversion
cledant Jun 30, 2023
897875b
odom->base_link is now correct in NED mode
cledant Jun 30, 2023
ff94ef5
Fixed variable inversion.
cledant Jul 3, 2023
54b3fc6
Renamed function.
cledant Jul 3, 2023
c385019
odom->base_link is now correct in NED mode
cledant Jul 3, 2023
33b208e
Documentation update
cledant Jul 4, 2023
a35035f
Reverted NED to ENU array conversion
cledant Aug 21, 2023
0cc9f1c
More explicit naming for quaternions
cledant Aug 21, 2023
d035a94
Added range for Euler angle measurement.
cledant Aug 21, 2023
1286ebb
Reworked angle wrapping functions
cledant Aug 21, 2023
c112e9f
Updated readme about ENU frame convention
cledant Aug 21, 2023
e882a92
Quaternion: NED to ENU conversion rework
cledant Aug 22, 2023
7bbd401
Reworked odometry message
cledant Aug 22, 2023
6136658
Quaternion: cleaner version for NED to ENU conversion
cledant Aug 22, 2023
9b5f320
Reverted NED to ENU quaternion conversion
cledant Aug 24, 2023
0bd0ea1
Disabling ROS standard message when in NED frame convention
cledant Aug 25, 2023
918aebb
Improved ENU/NED documentation
Aug 25, 2023
340cb98
Merge pull request #16 from SBG-Systems/ned_enu_fix
rsiryani Aug 25, 2023
40341b3
Updated naming convention
cledant Aug 25, 2023
db22cc5
Removed catkin reference in CMakeLists.txt
cledant Aug 25, 2023
a06a68e
Moved UTM initialization into its own class
cledant Aug 25, 2023
2af8917
Moved functions into helper namespace
cledant Aug 28, 2023
28453b5
Removed sendTransform in fillTransform method
cledant Aug 28, 2023
4f0f398
Reworked createRosPointStampedMessage computations
cledant Aug 28, 2023
e4417a0
Using pow instead of multiply
cledant Aug 28, 2023
bb8dbdd
Added constexpr to some variables
cledant Aug 28, 2023
196aa29
Using fma for computation
cledant Aug 28, 2023
6afffc4
SbgUtm documentation
cledant Aug 28, 2023
de978c5
Code indentation
cledant Aug 29, 2023
35a4e1a
Fixed space / tabluations issues
Sep 1, 2023
873b6c3
Factory for UTM data
cledant Sep 1, 2023
7820f4c
Added Position class
cledant Sep 4, 2023
74aa608
Added documentation on Position class
cledant Sep 4, 2023
2e35488
Added documentation on Utm structure
cledant Sep 4, 2023
f555673
Updated sbg_utm documentation and function prototype
cledant Sep 4, 2023
afc89e2
Indentation fix
cledant Sep 4, 2023
9007017
Utm as class
cledant Sep 4, 2023
9c86709
Code indentation
cledant Sep 4, 2023
6b64d9d
Class documentation
cledant Sep 4, 2023
2e60585
WIP code cleanup
Sep 5, 2023
9dece1c
Variable naming
cledant Sep 5, 2023
be1d617
Moved LLAtoECEF into a helper
cledant Sep 5, 2023
59879d9
Cleanup
cledant Sep 5, 2023
388c52d
Merge pull request #17 from SBG-Systems/cleanup
rsiryani Sep 19, 2023
4f5ffca
Fix deprecated use of rosidl_target_interfaces
SanderVanDijk-StreetDrone Oct 27, 2022
766770a
time_reference parameter fix
vovo-4K Mar 23, 2023
7e1e1ee
Remove boost dependency
Nov 29, 2023
fdbd2a6
uart: set baudrate as configured in config file
Sep 24, 2024
ebf06ab
fix: change device baudrate, not local interface baudrate
Oct 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: change device baudrate, not local interface baudrate
  • Loading branch information
Christoph Gruber committed Oct 2, 2024
commit ebf06abca0545f03e18f5aa1f03949886b80aa2b
19 changes: 18 additions & 1 deletion src/sbg_device.cpp
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@

// SbgECom headers
#include <version/sbgVersion.h>
#include <commands/sbgEComCmdInterface.h>

using namespace std;
using sbg::SbgDevice;
@@ -217,7 +218,23 @@ SbgErrorCode SbgDevice::findCurrentDeviceBaudrate()
void SbgDevice::setDeviceBaudrate()
{
SbgErrorCode error_code;
error_code = sbgInterfaceSerialChangeBaudrate(&sbg_interface_, config_store_.getBaudRate());
SbgEComInterfaceConf com_conf;
error_code = sbgEComCmdInterfaceGetUartConf(&com_handle_, SBG_ECOM_IF_COM_A, &com_conf);
if (error_code != SBG_NO_ERROR) {
rclcpp::exceptions::throw_from_rcl_error(RCL_RET_ERROR, "SBG_DRIVER - [Reconfig] Unable to get config of device - " + std::string(sbgErrorCodeToString(error_code)));
}

com_conf.baudRate = config_store_.getBaudRate();
error_code = sbgEComCmdInterfaceSetUartConf(&com_handle_, SBG_ECOM_IF_COM_A, &com_conf);
if (error_code != SBG_NO_ERROR) {
rclcpp::exceptions::throw_from_rcl_error(RCL_RET_ERROR, "SBG_DRIVER - [Reconfig] Unable to set new baudrate of device - " + std::string(sbgErrorCodeToString(error_code)));
}

error_code = sbgEComCmdSettingsAction(&com_handle_, SBG_ECOM_SAVE_SETTINGS);
if (error_code != SBG_NO_ERROR) {
rclcpp::exceptions::throw_from_rcl_error(RCL_RET_ERROR, "SBG_DRIVER - [Reconfig] Unable to save settings on device - " + std::string(sbgErrorCodeToString(error_code)));
}

sbgEComClose(&com_handle_);
sbgInterfaceSerialDestroy(&sbg_interface_);