mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
Rover: added SERIAL0_BAUD parameter
This commit is contained in:
parent
74e3d64e62
commit
aff5b1559d
@ -61,6 +61,7 @@ public:
|
||||
k_param_gcs3, // stream rates for port3
|
||||
k_param_sysid_this_mav,
|
||||
k_param_sysid_my_gcs,
|
||||
k_param_serial0_baud,
|
||||
k_param_serial3_baud,
|
||||
k_param_telem_delay,
|
||||
|
||||
@ -238,6 +239,7 @@ public:
|
||||
//
|
||||
AP_Int16 sysid_this_mav;
|
||||
AP_Int16 sysid_my_gcs;
|
||||
AP_Int8 serial0_baud;
|
||||
AP_Int8 serial3_baud;
|
||||
AP_Int8 telem_delay;
|
||||
|
||||
|
@ -14,11 +14,18 @@
|
||||
#define GOBJECT(v, name, class) { AP_PARAM_GROUP, name, Parameters::k_param_ ## v, &v, {group_info:class::var_info} }
|
||||
|
||||
const AP_Param::Info var_info[] PROGMEM = {
|
||||
GSCALAR(format_version, "FORMAT_VERSION", 0),
|
||||
GSCALAR(format_version, "FORMAT_VERSION", 1),
|
||||
GSCALAR(software_type, "SYSID_SW_TYPE", Parameters::k_software_type),
|
||||
GSCALAR(sysid_this_mav, "SYSID_THISMAV", MAV_SYSTEM_ID),
|
||||
GSCALAR(sysid_my_gcs, "SYSID_MYGCS", 255),
|
||||
|
||||
// @Param: SERIAL0_BAUD
|
||||
// @DisplayName: Telemetry Baud Rate
|
||||
// @Description: The baud rate used on the first serial port
|
||||
// @Values: 1:1200,2:2400,4:4800,9:9600,19:19200,38:38400,57:57600,111:111100,115:115200
|
||||
// @User: Standard
|
||||
GSCALAR(serial0_baud, "SERIAL0_BAUD", SERIAL0_BAUD/1000),
|
||||
|
||||
// @Param: SERIAL3_BAUD
|
||||
// @DisplayName: Telemetry Baud Rate
|
||||
// @Description: The baud rate used on the telemetry port
|
||||
|
@ -118,6 +118,9 @@ static void init_ardupilot()
|
||||
|
||||
load_parameters();
|
||||
|
||||
// after parameter load setup correct baud rate on uartA
|
||||
hal.uartA->begin(map_baudrate(g.serial0_baud, SERIAL0_BAUD));
|
||||
|
||||
// keep a record of how many resets have happened. This can be
|
||||
// used to detect in-flight resets
|
||||
g.num_resets.set_and_save(g.num_resets+1);
|
||||
|
Loading…
Reference in New Issue
Block a user