From b87fddf3e729f8476c8158e835b02f59fdabc6c0 Mon Sep 17 00:00:00 2001 From: PT_Dreamer Date: Mon, 19 Dec 2016 18:19:46 +0000 Subject: [PATCH] Telemetry/Mavlink add 58798bps --- radio/src/targets/common/avr/telemetry_driver.cpp | 10 ++++++++++ radio/src/translations/cz.h.txt | 2 +- radio/src/translations/de.h.txt | 2 +- radio/src/translations/en.h.txt | 2 +- radio/src/translations/es.h.txt | 2 +- radio/src/translations/fi.h.txt | 2 +- radio/src/translations/fr.h.txt | 2 +- radio/src/translations/it.h.txt | 2 +- radio/src/translations/nl.h.txt | 2 +- radio/src/translations/pl.h.txt | 2 +- radio/src/translations/pt.h.txt | 2 +- radio/src/translations/se.h.txt | 2 +- 12 files changed, 21 insertions(+), 11 deletions(-) diff --git a/radio/src/targets/common/avr/telemetry_driver.cpp b/radio/src/targets/common/avr/telemetry_driver.cpp index e5aeb82e4..082eaaf0f 100644 --- a/radio/src/targets/common/avr/telemetry_driver.cpp +++ b/radio/src/targets/common/avr/telemetry_driver.cpp @@ -30,6 +30,7 @@ enum SERIAL_BAUDS {// KEEP IN SYNC WITH GUI BAUD_19200, BAUD_38400, BAUD_57600, + BAUD_58798, BAUD_76800 }; @@ -178,6 +179,12 @@ static void uart_57600(void) { #endif } +static void uart_58798(void) { + UBRRH_N(TLM_USART) = 0; + UBRRL_N(TLM_USART) = 0x010; + UCSRA_N(TLM_USART) &= ~(1 << U2X_N(TLM_USART)); // disable double speed operation. +} + static void uart_76800(void) { #undef BAUD #define BAUD 76800 @@ -211,6 +218,9 @@ void telemetryPortInitFromIndex(uint8_t index) { case BAUD_57600: telemetryPortInit(57600); break; + case BAUD_58798: + telemetryPortInit(58798); + break; case BAUD_76800: telemetryPortInit(76800); break; diff --git a/radio/src/translations/cz.h.txt b/radio/src/translations/cz.h.txt index 28c33f3dd..fd960d958 100644 --- a/radio/src/translations/cz.h.txt +++ b/radio/src/translations/cz.h.txt @@ -634,7 +634,7 @@ #if defined(TELEMETRY_MAVLINK) #define LEN_MAVLINK_BAUDS "\006" - #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""76800 ""115200" + #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""58798 ""76800" #define LEN_MAVLINK_AC_MODES "\011" #define TR_MAVLINK_AC_MODES "Stabilize""Acro ""Alt Hold ""Auto ""Guided ""Loiter ""RTL ""Circle ""Pos Hold ""Land ""OF Loiter""Toy A ""Toy M ""INVALID " #define LEN_MAVLINK_AP_MODES "\015" diff --git a/radio/src/translations/de.h.txt b/radio/src/translations/de.h.txt index c8d75d281..e373f3d5f 100644 --- a/radio/src/translations/de.h.txt +++ b/radio/src/translations/de.h.txt @@ -635,7 +635,7 @@ #if defined(TELEMETRY_MAVLINK) #define LEN_MAVLINK_BAUDS "\006" - #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""76800 ""115200" + #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""58798 ""76800" #define LEN_MAVLINK_AC_MODES "\011" #define TR_MAVLINK_AC_MODES "Stabilize""Acro ""Alt Hold ""Auto ""Guided ""Loiter ""RTL ""Circle ""Pos Hold ""Land ""OF Loiter""Toy A ""Toy M ""INVALID " #define LEN_MAVLINK_AP_MODES "\015" diff --git a/radio/src/translations/en.h.txt b/radio/src/translations/en.h.txt index 7f94fd2c1..37d8bf39c 100644 --- a/radio/src/translations/en.h.txt +++ b/radio/src/translations/en.h.txt @@ -613,7 +613,7 @@ #if defined(TELEMETRY_MAVLINK) #define LEN_MAVLINK_BAUDS "\006" - #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""76800 ""115200" + #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""58798 ""76800" #define LEN_MAVLINK_AC_MODES "\011" #define TR_MAVLINK_AC_MODES "Stabilize""Acro ""Alt Hold ""Auto ""Guided ""Loiter ""RTL ""Circle ""Pos Hold ""Land ""OF Loiter""Toy A ""Toy M ""INVALID " #define LEN_MAVLINK_AP_MODES "\015" diff --git a/radio/src/translations/es.h.txt b/radio/src/translations/es.h.txt index 47dcbec63..f7c7052b4 100644 --- a/radio/src/translations/es.h.txt +++ b/radio/src/translations/es.h.txt @@ -603,7 +603,7 @@ #if defined(TELEMETRY_MAVLINK) #define LEN_MAVLINK_BAUDS "\006" - #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""76800 ""115200" + #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""58798 ""76800" #define LEN_MAVLINK_AC_MODES "\011" #define TR_MAVLINK_AC_MODES "Estabilizar""Acrobat. ""Alt Hold ""Auto ""Guiado ""Loiter ""RTL ""Circulo ""Pos Hold ""Tierra ""OF Loiter""Toy A ""Toy M ""INVALIDO " #define LEN_MAVLINK_AP_MODES "\015" diff --git a/radio/src/translations/fi.h.txt b/radio/src/translations/fi.h.txt index c797350e0..d28efd606 100644 --- a/radio/src/translations/fi.h.txt +++ b/radio/src/translations/fi.h.txt @@ -603,7 +603,7 @@ #if defined(TELEMETRY_MAVLINK) #define LEN_MAVLINK_BAUDS "\006" - #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""76800 ""115200" + #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""58798 ""76800" #define LEN_MAVLINK_AC_MODES "\011" #define TR_MAVLINK_AC_MODES "Stabilize""Acro ""Alt Hold ""Auto ""Guided ""Loiter ""RTL ""Circle ""Pos Hold ""Land ""OF Loiter""Toy A ""Toy M ""INVALID " #define LEN_MAVLINK_AP_MODES "\015" diff --git a/radio/src/translations/fr.h.txt b/radio/src/translations/fr.h.txt index 39cc8db68..7d9123aed 100644 --- a/radio/src/translations/fr.h.txt +++ b/radio/src/translations/fr.h.txt @@ -623,7 +623,7 @@ #if defined(TELEMETRY_MAVLINK) #define LEN_MAVLINK_BAUDS "\006" - #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""76800 ""115200" + #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""58798 ""76800" #define LEN_MAVLINK_AC_MODES "\011" #define TR_MAVLINK_AC_MODES "Stabilize""Acro ""Alt Hold ""Auto ""Guided ""Loiter ""RTL ""Circle ""Pos Hold ""Land ""OF Loiter""Toy A ""Toy M ""INVALID " #define LEN_MAVLINK_AP_MODES "\015" diff --git a/radio/src/translations/it.h.txt b/radio/src/translations/it.h.txt index 2fe03966f..b4795b059 100644 --- a/radio/src/translations/it.h.txt +++ b/radio/src/translations/it.h.txt @@ -617,7 +617,7 @@ #if defined(TELEMETRY_MAVLINK) #define LEN_MAVLINK_BAUDS "\006" - #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""76800 ""115200" + #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""58798 ""76800" #define LEN_MAVLINK_AC_MODES "\011" #define TR_MAVLINK_AC_MODES "Stabilize""Acro ""Alt Hold ""Auto ""Guided ""Loiter ""RTL ""Circle ""Pos Hold ""Land ""OF Loiter""Toy A ""Toy M ""INVALID " #define LEN_MAVLINK_AP_MODES "\015" diff --git a/radio/src/translations/nl.h.txt b/radio/src/translations/nl.h.txt index d307c5473..83c414261 100644 --- a/radio/src/translations/nl.h.txt +++ b/radio/src/translations/nl.h.txt @@ -604,7 +604,7 @@ #if defined(TELEMETRY_MAVLINK) #define LEN_MAVLINK_BAUDS "\006" - #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""76800 ""115200" + #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""58798 ""76800" #define LEN_MAVLINK_AC_MODES "\011" #define TR_MAVLINK_AC_MODES "Stabilize""Acro ""Alt Hold ""Auto ""Guided ""Loiter ""RTL ""Circle ""Pos Hold ""Land ""OF Loiter""Toy A ""Toy M ""INVALID " #define LEN_MAVLINK_AP_MODES "\015" diff --git a/radio/src/translations/pl.h.txt b/radio/src/translations/pl.h.txt index 61385393f..ca0d2764d 100644 --- a/radio/src/translations/pl.h.txt +++ b/radio/src/translations/pl.h.txt @@ -619,7 +619,7 @@ #if defined(TELEMETRY_MAVLINK) #define LEN_MAVLINK_BAUDS "\006" - #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""76800 ""115200" + #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""58798 ""76800" #define LEN_MAVLINK_AC_MODES "\011" /*9 decimal*/ #define TR_MAVLINK_AC_MODES "Stabiliz.""Akro ""Alt Hold ""Auto ""Sterowany""Loiter ""RTL ""Koło ""Utrzymuj ""Ląduj ""OF Loiter""Toy A ""Toy M ""BŁĘDNY " #define LEN_MAVLINK_AP_MODES "\015" /*13 decimal*/ diff --git a/radio/src/translations/pt.h.txt b/radio/src/translations/pt.h.txt index b9475b5e3..97472edee 100644 --- a/radio/src/translations/pt.h.txt +++ b/radio/src/translations/pt.h.txt @@ -598,7 +598,7 @@ #if defined(TELEMETRY_MAVLINK) #define LEN_MAVLINK_BAUDS "\006" - #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""76800 ""115200" + #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""58798 ""76800" #define LEN_MAVLINK_AC_MODES "\011" #define TR_MAVLINK_AC_MODES "Stabilize""Acro ""Alt Hold ""Auto ""Guided ""Loiter ""RTL ""Circle ""Pos Hold ""Land ""OF Loiter""Toy A ""Toy M ""INVALID " #define LEN_MAVLINK_AP_MODES "\015" diff --git a/radio/src/translations/se.h.txt b/radio/src/translations/se.h.txt index 9d4580a6f..c44dc6a88 100644 --- a/radio/src/translations/se.h.txt +++ b/radio/src/translations/se.h.txt @@ -628,7 +628,7 @@ #if defined(TELEMETRY_MAVLINK) #define LEN_MAVLINK_BAUDS "\006" - #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""76800 ""115200" + #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""58798 ""76800" #define LEN_MAVLINK_AC_MODES "\011" #define TR_MAVLINK_AC_MODES "Stabil ""Akrobat ""Lås Höjd ""Automat ""Guidad ""Hovra ""Flyg Hem ""Cirkla ""Håll Pos.""Landa ""OF Hovra ""Leksak A ""Leksak M ""OGILTIG " #define LEN_MAVLINK_AP_MODES "\015"