mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-30 01:14:07 +08:00
GPS driver: Initialize baud rate and improve output
This commit is contained in:
parent
16dd82ab60
commit
5dd981a7be
@ -36,7 +36,7 @@ px4_add_git_submodule(TARGET git_gps_devices PATH "devices")
|
||||
px4_add_module(
|
||||
MODULE drivers__gps
|
||||
MAIN gps
|
||||
STACK_MAIN 1200
|
||||
STACK_MAIN 1400
|
||||
SRCS
|
||||
gps.cpp
|
||||
devices/src/gps_helper.cpp
|
||||
|
||||
@ -263,6 +263,7 @@ extern "C" __EXPORT int gps_main(int argc, char *argv[]);
|
||||
GPS::GPS(const char *path, gps_driver_mode_t mode, GPSHelper::Interface interface, bool fake_gps,
|
||||
bool enable_sat_info, Instance instance) :
|
||||
_serial_fd(-1),
|
||||
_baudrate(0),
|
||||
_healthy(false),
|
||||
_mode_changed(false),
|
||||
_mode(mode),
|
||||
@ -871,7 +872,7 @@ GPS::print_status()
|
||||
}
|
||||
}
|
||||
|
||||
PX4_INFO("port: %s, baudrate: %d, status: %s", _port, _baudrate, _healthy ? "OK" : "NOT OK");
|
||||
PX4_INFO("status: %s, port: %s, baudrate: %d", _healthy ? "OK" : "NOT OK", _port, _baudrate);
|
||||
PX4_INFO("sat info: %s", (_p_report_sat_info != nullptr) ? "enabled" : "disabled");
|
||||
|
||||
if (_report_gps_pos.timestamp != 0) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user