From 94e499f9aae8b7f36568bd949b841503f89394ea Mon Sep 17 00:00:00 2001 From: Dominic Clifton Date: Tue, 3 Mar 2015 22:52:56 +0000 Subject: [PATCH] Serial port documentation update. --- README.md | 4 +- docs/Blackbox.md | 3 +- docs/Cli.md | 11 +-- docs/Gps.md | 12 +-- docs/Migrating from baseflight.md | 2 +- docs/Serial.md | 178 ++------------------------------------ 6 files changed, 20 insertions(+), 190 deletions(-) diff --git a/README.md b/README.md index 755301575..e104e20b4 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ Cleanflight also has additional features not found in baseflight. * Multi-color RGB LED Strip support (each LED can be a different color using variable length WS2811 Addressable RGB strips - use for Orientation Indicators, Low Battery Warning, Flight Mode Status, etc) * Oneshot ESC support. +* Blackbox flight recorder logging (to onboard flash or external SD card). * Support for additional targets that use the STM32F3 processors (baseflight only supports STM32F1). * Support for the TauLabs Sparky board (~$35 STM32F303 I2C sensors, based board with acc/gyro/compass and baro!) * Support for the OpenPilot CC3D board. (~$20 STM32F103 board, SPI acc/gyro) @@ -36,7 +37,8 @@ Cleanflight also has additional features not found in baseflight. * Rate profiles and in-flight selection of them. * Graupner PPM failsafe. * Graupner HoTT telemetry. -* Configurable serial port scenarios for Serial RX, Telemetry, MSP, GPS - Use most devices on any port, softserial too. +* Multiple simultantious telemetry providers. +* Configurable serial ports for Serial RX, Telemetry, MSP, GPS - Use most devices on any port, softserial too. + more many minor bug fixes. For a list of features, changes and some discussion please review the thread on MultiWii forums and consult the documenation. diff --git a/docs/Blackbox.md b/docs/Blackbox.md index 00a57db2c..a215fef2e 100644 --- a/docs/Blackbox.md +++ b/docs/Blackbox.md @@ -135,8 +135,7 @@ Enter `set blackbox_device=0` to switch to logging to a serial port (this is the You then need to let Cleanflight know which of [your serial ports][] you connected the OpenLog to. A 115200 baud port is required (such as `serial_port_1` on the Naze32, the two-pin Tx/Rx header in the center of the board). -For example, use `set serial_port_1_scenario=11` to switch the main serial port to MSP, CLI, Blackbox and GPS -Passthrough. You can also use the GUI to configure a port for the Blackbox feature on the Ports tab. +You can use the GUI to configure a port for the Blackbox feature on the Ports tab. ### Onboard dataflash Enter `set blackbox_device=1` to switch to logging to an onboard dataflash chip, if your flight controller has one. diff --git a/docs/Cli.md b/docs/Cli.md index f07eedbf9..129b9bcd6 100644 --- a/docs/Cli.md +++ b/docs/Cli.md @@ -7,7 +7,7 @@ Cleanflight has a command line interface (CLI) that can be used to change settin The CLI can be accessed via the GUI tool or via a terminal emulator connected to the CLI serial port. 1. Connect your terminal emulator to the CLI serial port (which, by default, is the same as the MSP serial port) -2. Use the baudrate specified by cli_baudrate (115200 by default). +2. Use the baudrate specified by msp_baudrate (115200 by default). 3. Send a `#` character. To save your settings type in 'save', saving will reboot the flight controller. @@ -120,16 +120,7 @@ Re-apply any new defaults as desired. | small_angle | If the copter tilt angle exceed this value the copter will refuse to arm. default is 25°. | 0 | 180 | 25 | Master | UINT8 | | flaps_speed | | 0 | 100 | 0 | Master | UINT8 | | fixedwing_althold_dir | | -1 | 1 | 1 | Master | INT8 | -| serial_port_1_scenario | | 0 | 11 | | Master | UINT8 | -| serial_port_2_scenario | | 0 | 11 | | Master | UINT8 | -| serial_port_3_scenario | | 0 | 11 | | Master | UINT8 | -| serial_port_4_scenario | | 0 | 11 | | Master | UINT8 | -| serial_port_5_scenario | | 0 | 11 | | Master | UINT8 | | reboot_character | | 48 | 126 | 82 | Master | UINT8 | -| msp_baudrate | | 1200 | 115200 | 115200 | Master | UINT32 | -| cli_baudrate | | 1200 | 115200 | 115200 | Master | UINT32 | -| gps_baudrate | | 0 | 115200 | 115200 | Master | UINT32 | -| gps_passthrough_baudrate | | 1200 | 115200 | 115200 | Master | UINT32 | | gps_provider | | 0 | 1 | 0 | Master | UINT8 | | gps_sbas_mode | | 0 | 4 | 0 | Master | UINT8 | | gps_auto_config | | 0 | 1 | 1 | Master | UINT8 | diff --git a/docs/Gps.md b/docs/Gps.md index 34d4ef9ab..77acd83dd 100644 --- a/docs/Gps.md +++ b/docs/Gps.md @@ -6,16 +6,16 @@ Two GPS protocols are supported. NMEA text and UBLOX binary. Enable the GPS from the CLI as follows: -1. first enable the `feature GPS` -1. set the `gps_provider` +1. configure a serial port to use for GPS. 1. set your GPS baud rate -1. connect your GPS to a serial port that supports GPS and set an approprate `serial_port_x_functions` to include the GPS flag. -1. `save`. +1. enable the `feature GPS` +1. set the `gps_provider` +1. connect your GPS to the serial port configured for GPS. +1. save and reboot. Note: GPS packet loss has been observed at 115200. Try using 57600 if you experience this. -For the connections step check the Board documentation for pins and port numbers and check the Serial documentation for details on serial port scenarios where you will also find some example configurations. - +For the connections step check the Board documentation for pins and port numbers. ### GPS Provider diff --git a/docs/Migrating from baseflight.md b/docs/Migrating from baseflight.md index 0a4377b1d..f6199d9a4 100644 --- a/docs/Migrating from baseflight.md +++ b/docs/Migrating from baseflight.md @@ -35,7 +35,7 @@ reason: unified baud rate configuration If an unsupported baud rate value is used the gps code will select 115200 baud. -see `serial_port_x_baudrate` +see `serial_port_x_gps_baudrate` ### gps_type reason: renamed to `gps_provider` for consistency diff --git a/docs/Serial.md b/docs/Serial.md index 025821d0d..65a11929c 100644 --- a/docs/Serial.md +++ b/docs/Serial.md @@ -31,184 +31,22 @@ Both SoftSerial and UART ports can be connected to your computer via USB to UART ## Serial Configuration -To make configuration easier, common usage scenarios are listed below. - -### Serial port scenarios - -``` -0 UNUSED -1 MSP, CLI, TELEMETRY, SMARTPORT TELEMETRY, GPS-PASSTHROUGH -2 GPS ONLY -3 RX SERIAL ONLY -4 TELEMETRY ONLY -5 MSP, CLI, GPS-PASSTHROUGH -6 CLI ONLY -7 GPS-PASSTHROUGH ONLY -8 MSP ONLY -9 SMARTPORT TELEMETRY ONLY -10 BLACKBOX ONLY -11 MSP, CLI, BLACKBOX, GPS-PASSTHROUGH -``` +Serial port configuration is best done via the configurator. ### Constraints If the configuration is invalid the serial port configuration will reset to its defaults and features may be disabled. -* There must always be a port available to use for MSP -* There must always be a port available to use for CLI -* There can only be 1 CLI port. +* There must always be a port available to use for MSP/CLI. * There is a maximum of 2 MSP ports. * To use a port for a function, the function's corresponding feature must be also be enabled. e.g. after configuring a port for GPS enable the GPS feature. * If SoftSerial is used, then all SoftSerial ports must use the same baudrate. +* Softserial is limited to 19200 buad. +* All telemetry systems except MSP will ignore any attempts to override the baudrate. +* MSP/CLI can be shared with EITHER Blackbox OR telemetry. In shared mode blackbox or telemetry will be output only when armed. +* Smartport telemetry cannot be shared with MSP. +* No other serial port sharing combinations are valid. +* You can use as many telemetry systems as you like at the same time. -### Examples - -All examples assume default configuration (via CLI `defaults` command) - -a) Parallel PWM, GPS and FrSky TELEMETRY (when armed) - -- TELEMETRY,MSP,CLI,GPS PASSTHROUGH on UART1 -- GPS on UART2 - -``` -feature RX_PARALLEL_PWM -feature TELEMETRY -feature GPS -set serial_port_2_scenario = 2 -save -``` - -b) Graupner SumD RX SERIAL and HoTT TELEMETRY via SoftSerial - -- MSP,CLI,GPS PASSTHROUGH on UART1 -- RX SERIAL on UART2 -- HoTT Telemetry on SOFTSERIAL1 -``` -feature -RX_PARALLEL_PWM -feature RX_SERIAL -feature TELEMETRY -feature SOFTSERIAL -set serial_port_1_scenario = 5 -set serialrx_provider = 3 -set serial_port_2_scenario = 3 -set telemetry_provider = 1 -set serial_port_3_scenario = 4 -save -``` - -c) PPM RX, GPS and FrSky TELEMETRY via SoftSerial - -- MSP, CLI, GPS PASSTHROUGH on UART1 -- GPS on UART2 -- TELEMETRY on SOFTSERIAL1 - -``` -feature -RX_PARALLEL_PWM -feature RX_PPM -feature TELEMETRY -feature GPS -feature SOFTSERIAL -set serial_port_1_scenario = 5 -set serial_port_2_scenario = 2 -set serial_port_3_scenario = 4 -save -``` -d) RX SERIAL, GPS and TELEMETRY (when armed) MSP/CLI via SoftSerial - -- GPS on UART1 -- RX SERIAL on UART2 -- TELEMETRY,MSP,CLI,GPS PASSTHROUGH on SOFTSERIAL1 - -``` -feature -RX_PARALLEL_PWM -feature TELEMETRY -feature GPS -feature RX_SERIAL -feature SOFTSERIAL -set serial_port_1_scenario = 2 -set serial_port_2_scenario = 3 -set serial_port_3_scenario = 1 -set msp_baudrate = 19200 -set cli_baudrate = 19200 -set gps_passthrough_baudrate = 19200 -save -``` - -e) PPX RX, HoTT Telemetry via UART2 - -- MSP,CLI,GPS PASSTHROUGH on UART1 -- HoTT telemetry on UART2 - -``` -feature -RX_PARALLEL_PWM -feature RX_PPM -feature TELEMETRY -set serial_port_1_scenario = 5 -set serial_port_2_scenario = 4 -set telemetry_provider = 1 -``` - -f) PPM RX, GPS, HoTT Telemetry via SoftSerial 1 - -- MSP,CLI,GPS PASSTHROUGH on UART1 -- GPS on UART2 -- HoTT telemetry on SOFTSERIAL1 - -``` -feature -RX_PARALLEL_PWM -feature RX_PPM -feature TELEMETRY -feature GPS -feature SOFTSERIAL -set serial_port_2_scenario = 2 -set serial_port_3_scenario = 4 -set telemetry_provider = 1 -save -``` - -g) S.BUS RX SERIAL - -- TELEMETRY, MSP, CLI, GPS PASSTHROUGH on UART1 -- RX SERIAL on UART2 - -``` -feature -RX_PARALLEL_PWM -feature RX_SERIAL -set serialrx_provider = 2 -set serial_port_2_scenario = 3 -save -``` - -h) Spektrum RX SERIAL - -- TELEMETRY, MSP, CLI, GPS PASSTHROUGH on UART1 -- RX SERIAL on UART2 - -``` -feature -RX_PARALLEL_PWM -feature RX_SERIAL -set serialrx_provider = 0 -set serial_port_2_scenario = 3 -save -``` - -i) MSP via USART1 and SoftSerial 1 - -- TELEMETRY, MSP, CLI, GPS PASSTHROUGH on UART1 -- MSP on SOFTSERIAL1 -- Both ports will be at 19200 (limited by SoftSerial) -- USART2 can still be used for GPS/SerialRX/Telemetry, etc. - -``` -feature -RX_PARALLEL_PWM -feature RC_PPM -feature SOFTSERIAL -set serial_port_1_scenario = 1 -set serial_port_3_scenario = 8 -set msp_baudrate = 19200 -set cli_baudrate = 19200 -set gps_passthrough_baudrate = 19200 -save -``` -- 2.11.4.GIT