mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 17:25:13 +03:00
Crossfire telemetry protocol start
This commit is contained in:
parent
5a5f192451
commit
a3c175f537
21 changed files with 396 additions and 73 deletions
|
@ -407,11 +407,22 @@ if(CPU_FAMILY STREQUAL STM32)
|
||||||
STM32_USB_Device_Library/Core/src/usbd_ioreq.c
|
STM32_USB_Device_Library/Core/src/usbd_ioreq.c
|
||||||
STM32_USB_Device_Library/Core/src/usbd_req.c
|
STM32_USB_Device_Library/Core/src/usbd_req.c
|
||||||
)
|
)
|
||||||
set(FIRMWARE_TARGET_SRC ${FIRMWARE_TARGET_SRC} usb_bsp.c usbd_desc.c usbd_usr.cpp)
|
set(FIRMWARE_TARGET_SRC
|
||||||
|
${FIRMWARE_TARGET_SRC}
|
||||||
|
usb_bsp.c
|
||||||
|
usbd_desc.c
|
||||||
|
usbd_usr.cpp
|
||||||
|
)
|
||||||
if(USB STREQUAL SERIAL)
|
if(USB STREQUAL SERIAL)
|
||||||
add_definitions(-DUSB_SERIAL)
|
add_definitions(-DUSB_SERIAL)
|
||||||
set(FIRMWARE_TARGET_SRC ${FIRMWARE_TARGET_SRC} usbd_cdc.cpp)
|
set(FIRMWARE_TARGET_SRC
|
||||||
set(STM32USB_SRC ${STM32USB_SRC} STM32_USB_Device_Library/Class/cdc/src/usbd_cdc_core.c)
|
${FIRMWARE_TARGET_SRC}
|
||||||
|
usbd_cdc.cpp
|
||||||
|
)
|
||||||
|
set(STM32USB_SRC
|
||||||
|
${STM32USB_SRC}
|
||||||
|
STM32_USB_Device_Library/Class/cdc/src/usbd_cdc_core.c
|
||||||
|
)
|
||||||
elseif(USB STREQUAL MASSSTORAGE)
|
elseif(USB STREQUAL MASSSTORAGE)
|
||||||
add_definitions(-DUSB_MASS_STORAGE)
|
add_definitions(-DUSB_MASS_STORAGE)
|
||||||
set(STM32USB_SRC
|
set(STM32USB_SRC
|
||||||
|
@ -421,13 +432,22 @@ if(CPU_FAMILY STREQUAL STM32)
|
||||||
STM32_USB_Device_Library/Class/msc/src/usbd_msc_bot.c
|
STM32_USB_Device_Library/Class/msc/src/usbd_msc_bot.c
|
||||||
STM32_USB_Device_Library/Class/msc/src/usbd_msc_core.c
|
STM32_USB_Device_Library/Class/msc/src/usbd_msc_core.c
|
||||||
)
|
)
|
||||||
set(FIRMWARE_TARGET_SRC ${FIRMWARE_TARGET_SRC} usbd_storage_msd.cpp)
|
set(FIRMWARE_TARGET_SRC
|
||||||
|
${FIRMWARE_TARGET_SRC}
|
||||||
|
usbd_storage_msd.cpp
|
||||||
|
)
|
||||||
else()
|
else()
|
||||||
add_definitions(-DUSB_JOYSTICK)
|
add_definitions(-DUSB_JOYSTICK)
|
||||||
set(FIRMWARE_TARGET_SRC ${FIRMWARE_TARGET_SRC} usbd_hid_joystick.c)
|
set(FIRMWARE_TARGET_SRC
|
||||||
|
${FIRMWARE_TARGET_SRC}
|
||||||
|
usbd_hid_joystick.c
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
if(GVARS)
|
if(GVARS)
|
||||||
set(GUI_SRC ${GUI_SRC} menu_model_gvars.cpp)
|
set(GUI_SRC
|
||||||
|
${GUI_SRC}
|
||||||
|
menu_model_gvars.cpp
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
set(FIRMWARE_SRC
|
set(FIRMWARE_SRC
|
||||||
${FIRMWARE_SRC}
|
${FIRMWARE_SRC}
|
||||||
|
@ -436,12 +456,22 @@ if(CPU_FAMILY STREQUAL STM32)
|
||||||
targets/taranis/configure_pins.cpp
|
targets/taranis/configure_pins.cpp
|
||||||
)
|
)
|
||||||
foreach(FILE ${STM32LIB_SRC})
|
foreach(FILE ${STM32LIB_SRC})
|
||||||
set(FIRMWARE_SRC ${FIRMWARE_SRC} ${STM32LIB_DIR}/${FILE})
|
set(FIRMWARE_SRC
|
||||||
|
${FIRMWARE_SRC}
|
||||||
|
${STM32LIB_DIR}/${FILE}
|
||||||
|
)
|
||||||
endforeach()
|
endforeach()
|
||||||
foreach(FILE ${STM32USB_SRC})
|
foreach(FILE ${STM32USB_SRC})
|
||||||
set(FIRMWARE_SRC ${FIRMWARE_SRC} ${STM32USB_DIR}/${FILE})
|
set(FIRMWARE_SRC
|
||||||
|
${FIRMWARE_SRC}
|
||||||
|
${STM32USB_DIR}/${FILE}
|
||||||
|
)
|
||||||
endforeach()
|
endforeach()
|
||||||
set(SRC ${SRC} sbus.cpp)
|
set(SRC
|
||||||
|
${SRC}
|
||||||
|
sbus.cpp
|
||||||
|
telemetry/crossfire.cpp
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ARCH STREQUAL ARM)
|
if(ARCH STREQUAL ARM)
|
||||||
|
|
|
@ -346,6 +346,7 @@ enum TelemetryUnit {
|
||||||
UNIT_PERCENT,
|
UNIT_PERCENT,
|
||||||
UNIT_MAH,
|
UNIT_MAH,
|
||||||
UNIT_WATTS,
|
UNIT_WATTS,
|
||||||
|
UNIT_MILLIWATTS,
|
||||||
UNIT_DB,
|
UNIT_DB,
|
||||||
UNIT_RPMS,
|
UNIT_RPMS,
|
||||||
UNIT_G,
|
UNIT_G,
|
||||||
|
@ -473,7 +474,7 @@ enum TelemetryUnit {
|
||||||
UNIT_SECONDS,
|
UNIT_SECONDS,
|
||||||
UNIT_RPMS,
|
UNIT_RPMS,
|
||||||
UNIT_G,
|
UNIT_G,
|
||||||
UNIT_HDG,
|
UNIT_HDG
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../../opentx.h"
|
#include "opentx.h"
|
||||||
|
|
||||||
#if defined(FRSKY)
|
#if defined(FRSKY)
|
||||||
|
|
||||||
|
@ -33,9 +33,6 @@ void telemetryEnableRx(void)
|
||||||
UCSRB_N(TLM_USART) |= (1 << RXCIE_N(TLM_USART)); // enable Interrupt
|
UCSRB_N(TLM_USART) |= (1 << RXCIE_N(TLM_USART)); // enable Interrupt
|
||||||
}
|
}
|
||||||
|
|
||||||
void processFrskyTelemetryData(uint8_t data);
|
|
||||||
extern uint8_t frskyRxBufferCount; // TODO not driver, change name
|
|
||||||
|
|
||||||
ISR(USART_RX_vect_N(TLM_USART))
|
ISR(USART_RX_vect_N(TLM_USART))
|
||||||
{
|
{
|
||||||
uint8_t stat;
|
uint8_t stat;
|
||||||
|
@ -79,7 +76,7 @@ ISR(USART_RX_vect_N(TLM_USART))
|
||||||
|
|
||||||
if (stat & ((1 << FE_N(TLM_USART)) | (1 << DOR_N(TLM_USART)) | (1 << UPE_N(TLM_USART)))) {
|
if (stat & ((1 << FE_N(TLM_USART)) | (1 << DOR_N(TLM_USART)) | (1 << UPE_N(TLM_USART)))) {
|
||||||
// discard buffer and start fresh on any comms error
|
// discard buffer and start fresh on any comms error
|
||||||
frskyRxBufferCount = 0;
|
telemetryRxBufferCount = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
processFrskyTelemetryData(data);
|
processFrskyTelemetryData(data);
|
||||||
|
|
141
radio/src/telemetry/crossfire.cpp
Normal file
141
radio/src/telemetry/crossfire.cpp
Normal file
|
@ -0,0 +1,141 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) OpenTX
|
||||||
|
*
|
||||||
|
* Based on code named
|
||||||
|
* th9x - http://code.google.com/p/th9x
|
||||||
|
* er9x - http://code.google.com/p/er9x
|
||||||
|
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||||
|
*
|
||||||
|
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License version 2 as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "opentx.h"
|
||||||
|
|
||||||
|
struct CrossfireSensor {
|
||||||
|
const uint8_t id;
|
||||||
|
const uint8_t subId;
|
||||||
|
const char * name;
|
||||||
|
const TelemetryUnit unit;
|
||||||
|
const uint8_t prec;
|
||||||
|
};
|
||||||
|
|
||||||
|
const CrossfireSensor crossfireSensors[] = {
|
||||||
|
{LINK_STATS_ID, 0, ZSTR_RX_RSSI1, UNIT_DB, 0},
|
||||||
|
{LINK_STATS_ID, 1, ZSTR_RX_RSSI2, UNIT_DB, 0},
|
||||||
|
{LINK_STATS_ID, 2, ZSTR_RX_QUALITY, UNIT_PERCENT, 0},
|
||||||
|
{LINK_STATS_ID, 3, ZSTR_RX_SNR, UNIT_DB, 0},
|
||||||
|
{LINK_STATS_ID, 4, ZSTR_ANTENNA, UNIT_RAW, 0},
|
||||||
|
{LINK_STATS_ID, 5, ZSTR_RF_MODE, UNIT_RAW, 0},
|
||||||
|
{LINK_STATS_ID, 6, ZSTR_TX_POWER, UNIT_MILLIWATTS, 0},
|
||||||
|
{LINK_STATS_ID, 7, ZSTR_TX_RSSI, UNIT_DB, 0},
|
||||||
|
{LINK_STATS_ID, 8, ZSTR_TX_QUALITY, UNIT_PERCENT, 0},
|
||||||
|
{LINK_STATS_ID, 9, ZSTR_TX_SNR, UNIT_DB, 0},
|
||||||
|
{ 0, 0, NULL, UNIT_RAW, 0} // sentinel
|
||||||
|
};
|
||||||
|
|
||||||
|
const CrossfireSensor * getCrossfireSensor(uint8_t id, uint8_t subId=0)
|
||||||
|
{
|
||||||
|
const CrossfireSensor * result = NULL;
|
||||||
|
for (const CrossfireSensor * sensor = crossfireSensors; sensor->id; sensor++) {
|
||||||
|
if (id == sensor->id && subId == sensor->subId) {
|
||||||
|
result = sensor;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
void processCrossfireTelemetryFrame(uint8_t id, uint8_t subId, uint32_t value)
|
||||||
|
{
|
||||||
|
const CrossfireSensor * sensor = getCrossfireSensor(id, subId);
|
||||||
|
TelemetryUnit unit = UNIT_RAW;
|
||||||
|
uint8_t precision = 0;
|
||||||
|
if (sensor) {
|
||||||
|
unit = sensor->unit;
|
||||||
|
precision = sensor->prec;
|
||||||
|
}
|
||||||
|
setTelemetryValue(TELEM_PROTO_CROSSFIRE, id, 0, subId, value, unit, precision);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool checkCrossfireTelemetryFrameCRC()
|
||||||
|
{
|
||||||
|
// uint8_t length = telemetryRxBuffer[1];
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void processCrossfireTelemetryFrame()
|
||||||
|
{
|
||||||
|
if (!checkCrossfireTelemetryFrameCRC()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t id = telemetryRxBuffer[2];
|
||||||
|
switch(id) {
|
||||||
|
case LINK_STATS_ID:
|
||||||
|
for (int i=0; i<10; i++) {
|
||||||
|
processCrossfireTelemetryFrame(id, i, telemetryRxBuffer[3+i]);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void processCrossfireTelemetryData(uint8_t data)
|
||||||
|
{
|
||||||
|
if (telemetryRxBufferCount == 0 && data != 0x00) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (telemetryRxBufferCount == 1 && (data < || data > TELEMETRY_RX_PACKET_SIZE-2)) {
|
||||||
|
telemetryRxBufferCount = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (telemetryRxBufferCount < TELEMETRY_RX_PACKET_SIZE) {
|
||||||
|
telemetryRxBuffer[telemetryRxBufferCount++] = data;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
TRACE("processCrossfirePacket(): length error ");
|
||||||
|
DUMP(telemetryRxBuffer, TELEMETRY_RX_PACKET_SIZE);
|
||||||
|
telemetryRxBufferCount = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (telemetryRxBufferCount > 4) {
|
||||||
|
uint8_t length = telemetryRxBuffer[1];
|
||||||
|
if (length + 2 == telemetryRxBufferCount) {
|
||||||
|
processCrossfireTelemetryFrame();
|
||||||
|
telemetryRxBufferCount = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void crossfireSetDefault(int index, uint8_t id, uint8_t subId)
|
||||||
|
{
|
||||||
|
TelemetrySensor & telemetrySensor = g_model.telemetrySensors[index];
|
||||||
|
|
||||||
|
telemetrySensor.id = id;
|
||||||
|
telemetrySensor.instance = subId;
|
||||||
|
|
||||||
|
const CrossfireSensor * sensor = getCrossfireSensor(id, subId);
|
||||||
|
if (sensor) {
|
||||||
|
TelemetryUnit unit = sensor->unit;
|
||||||
|
uint8_t prec = min<uint8_t>(2, sensor->prec);
|
||||||
|
telemetrySensor.init(sensor->name, unit, prec);
|
||||||
|
if (id == LINK_STATS_ID) {
|
||||||
|
telemetrySensor.logs = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
telemetrySensor.init(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
storageDirty(EE_MODEL);
|
||||||
|
}
|
29
radio/src/telemetry/crossfire.h
Normal file
29
radio/src/telemetry/crossfire.h
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) OpenTX
|
||||||
|
*
|
||||||
|
* Based on code named
|
||||||
|
* th9x - http://code.google.com/p/th9x
|
||||||
|
* er9x - http://code.google.com/p/er9x
|
||||||
|
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||||
|
*
|
||||||
|
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License version 2 as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _CROSSFIRE_H_
|
||||||
|
#define _CROSSFIRE_H_
|
||||||
|
|
||||||
|
#define LINK_STATS_ID 0x14
|
||||||
|
|
||||||
|
void processCrossfireTelemetryData(uint8_t data);
|
||||||
|
void crossfireSetDefault(int index, uint8_t id, uint8_t subId);
|
||||||
|
|
||||||
|
#endif // _CROSSFIRE_H_
|
|
@ -20,9 +20,6 @@
|
||||||
|
|
||||||
#include "opentx.h"
|
#include "opentx.h"
|
||||||
|
|
||||||
uint8_t frskyRxBuffer[FRSKY_RX_PACKET_SIZE]; // Receive buffer. 9 bytes (full packet), worst case 18 bytes with byte-stuffing (+1)
|
|
||||||
uint8_t frskyRxBufferCount = 0;
|
|
||||||
|
|
||||||
#if !defined(CPUARM)
|
#if !defined(CPUARM)
|
||||||
uint8_t frskyTxBuffer[FRSKY_TX_PACKET_SIZE];
|
uint8_t frskyTxBuffer[FRSKY_TX_PACKET_SIZE];
|
||||||
uint8_t frskyTxBufferCount = 0;
|
uint8_t frskyTxBufferCount = 0;
|
||||||
|
@ -39,6 +36,18 @@ extern uint8_t TrotCount;
|
||||||
extern uint8_t TezRotary;
|
extern uint8_t TezRotary;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Receive buffer state machine state enum
|
||||||
|
enum FrSkyDataState {
|
||||||
|
STATE_DATA_IDLE,
|
||||||
|
STATE_DATA_START,
|
||||||
|
STATE_DATA_IN_FRAME,
|
||||||
|
STATE_DATA_XOR,
|
||||||
|
#if defined(TELEMETREZ)
|
||||||
|
STATE_DATA_PRIVATE_LEN,
|
||||||
|
STATE_DATA_PRIVATE_VALUE
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
NOINLINE void processFrskyTelemetryData(uint8_t data)
|
NOINLINE void processFrskyTelemetryData(uint8_t data)
|
||||||
{
|
{
|
||||||
static uint8_t dataState = STATE_DATA_IDLE;
|
static uint8_t dataState = STATE_DATA_IDLE;
|
||||||
|
@ -72,12 +81,12 @@ NOINLINE void processFrskyTelemetryData(uint8_t data)
|
||||||
if (data == START_STOP) {
|
if (data == START_STOP) {
|
||||||
if (IS_FRSKY_SPORT_PROTOCOL()) {
|
if (IS_FRSKY_SPORT_PROTOCOL()) {
|
||||||
dataState = STATE_DATA_IN_FRAME ;
|
dataState = STATE_DATA_IN_FRAME ;
|
||||||
frskyRxBufferCount = 0;
|
telemetryRxBufferCount = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (frskyRxBufferCount < FRSKY_RX_PACKET_SIZE) {
|
if (telemetryRxBufferCount < TELEMETRY_RX_PACKET_SIZE) {
|
||||||
frskyRxBuffer[frskyRxBufferCount++] = data;
|
telemetryRxBuffer[telemetryRxBufferCount++] = data;
|
||||||
}
|
}
|
||||||
dataState = STATE_DATA_IN_FRAME;
|
dataState = STATE_DATA_IN_FRAME;
|
||||||
}
|
}
|
||||||
|
@ -90,30 +99,30 @@ NOINLINE void processFrskyTelemetryData(uint8_t data)
|
||||||
else if (data == START_STOP) {
|
else if (data == START_STOP) {
|
||||||
if (IS_FRSKY_SPORT_PROTOCOL()) {
|
if (IS_FRSKY_SPORT_PROTOCOL()) {
|
||||||
dataState = STATE_DATA_IN_FRAME ;
|
dataState = STATE_DATA_IN_FRAME ;
|
||||||
frskyRxBufferCount = 0;
|
telemetryRxBufferCount = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// end of frame detected
|
// end of frame detected
|
||||||
frskyDProcessPacket(frskyRxBuffer);
|
frskyDProcessPacket(telemetryRxBuffer);
|
||||||
dataState = STATE_DATA_IDLE;
|
dataState = STATE_DATA_IDLE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (frskyRxBufferCount < FRSKY_RX_PACKET_SIZE) {
|
else if (telemetryRxBufferCount < TELEMETRY_RX_PACKET_SIZE) {
|
||||||
frskyRxBuffer[frskyRxBufferCount++] = data;
|
telemetryRxBuffer[telemetryRxBufferCount++] = data;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STATE_DATA_XOR:
|
case STATE_DATA_XOR:
|
||||||
if (frskyRxBufferCount < FRSKY_RX_PACKET_SIZE) {
|
if (telemetryRxBufferCount < TELEMETRY_RX_PACKET_SIZE) {
|
||||||
frskyRxBuffer[frskyRxBufferCount++] = data ^ STUFF_MASK;
|
telemetryRxBuffer[telemetryRxBufferCount++] = data ^ STUFF_MASK;
|
||||||
}
|
}
|
||||||
dataState = STATE_DATA_IN_FRAME;
|
dataState = STATE_DATA_IN_FRAME;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STATE_DATA_IDLE:
|
case STATE_DATA_IDLE:
|
||||||
if (data == START_STOP) {
|
if (data == START_STOP) {
|
||||||
frskyRxBufferCount = 0;
|
telemetryRxBufferCount = 0;
|
||||||
dataState = STATE_DATA_START;
|
dataState = STATE_DATA_START;
|
||||||
}
|
}
|
||||||
#if defined(TELEMETREZ)
|
#if defined(TELEMETREZ)
|
||||||
|
@ -155,8 +164,8 @@ NOINLINE void processFrskyTelemetryData(uint8_t data)
|
||||||
} // switch
|
} // switch
|
||||||
|
|
||||||
#if defined(FRSKY_SPORT)
|
#if defined(FRSKY_SPORT)
|
||||||
if (IS_FRSKY_SPORT_PROTOCOL() && frskyRxBufferCount >= FRSKY_SPORT_PACKET_SIZE) {
|
if (IS_FRSKY_SPORT_PROTOCOL() && telemetryRxBufferCount >= FRSKY_SPORT_PACKET_SIZE) {
|
||||||
processSportPacket(frskyRxBuffer);
|
processSportPacket(telemetryRxBuffer);
|
||||||
dataState = STATE_DATA_IDLE;
|
dataState = STATE_DATA_IDLE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -388,20 +388,6 @@ enum AlarmLevel {
|
||||||
#define BYTESTUFF 0x7d
|
#define BYTESTUFF 0x7d
|
||||||
#define STUFF_MASK 0x20
|
#define STUFF_MASK 0x20
|
||||||
|
|
||||||
// Receive buffer state machine state enum
|
|
||||||
enum FrSkyDataState {
|
|
||||||
STATE_DATA_IDLE,
|
|
||||||
STATE_DATA_START,
|
|
||||||
STATE_DATA_IN_FRAME,
|
|
||||||
STATE_DATA_XOR,
|
|
||||||
#if defined(TELEMETREZ)
|
|
||||||
STATE_DATA_PRIVATE_LEN,
|
|
||||||
STATE_DATA_PRIVATE_VALUE
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
#define FRSKY_RX_PACKET_SIZE 19
|
|
||||||
|
|
||||||
#if defined(CPUARM)
|
#if defined(CPUARM)
|
||||||
#define frskySendAlarms()
|
#define frskySendAlarms()
|
||||||
#else
|
#else
|
||||||
|
@ -453,6 +439,7 @@ enum TelemetryProtocol
|
||||||
{
|
{
|
||||||
TELEM_PROTO_FRSKY_D,
|
TELEM_PROTO_FRSKY_D,
|
||||||
TELEM_PROTO_FRSKY_SPORT,
|
TELEM_PROTO_FRSKY_SPORT,
|
||||||
|
TELEM_PROTO_CROSSFIRE,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum TelemAnas {
|
enum TelemAnas {
|
||||||
|
@ -496,23 +483,6 @@ void frskyUpdateCells();
|
||||||
|
|
||||||
void processFrskyTelemetryData(uint8_t data);
|
void processFrskyTelemetryData(uint8_t data);
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
|
||||||
inline uint8_t modelTelemetryProtocol()
|
|
||||||
{
|
|
||||||
#if defined(CROSSFIRE)
|
|
||||||
if (g_model.moduleData[EXTERNAL_MODULE].type == MODULE_TYPE_CROSSFIRE)
|
|
||||||
return PROTOCOL_PULSES_CROSSFIRE;
|
|
||||||
#endif
|
|
||||||
if (g_model.moduleData[INTERNAL_MODULE].rfProtocol == RF_PROTO_OFF && g_model.moduleData[EXTERNAL_MODULE].type == MODULE_TYPE_PPM)
|
|
||||||
return g_model.telemetryProtocol;
|
|
||||||
else
|
|
||||||
return PROTOCOL_FRSKY_SPORT;
|
|
||||||
}
|
|
||||||
#define MODEL_TELEMETRY_PROTOCOL() modelTelemetryProtocol()
|
|
||||||
#elif defined(CPUARM)
|
|
||||||
#define MODEL_TELEMETRY_PROTOCOL() g_model.telemetryProtocol
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LUA)
|
#if defined(LUA)
|
||||||
struct LuaTelemetryValue
|
struct LuaTelemetryValue
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
#include "opentx.h"
|
#include "opentx.h"
|
||||||
|
|
||||||
uint8_t telemetryStreaming = 0;
|
uint8_t telemetryStreaming = 0;
|
||||||
|
uint8_t telemetryRxBuffer[TELEMETRY_RX_PACKET_SIZE]; // Receive buffer. 9 bytes (full packet), worst case 18 bytes with byte-stuffing (+1)
|
||||||
|
uint8_t telemetryRxBufferCount = 0;
|
||||||
|
|
||||||
#if defined(WS_HOW_HIGH)
|
#if defined(WS_HOW_HIGH)
|
||||||
uint8_t wshhStreaming = 0;
|
uint8_t wshhStreaming = 0;
|
||||||
|
@ -60,6 +62,10 @@ lcdint_t applyChannelRatio(source_t channel, lcdint_t val)
|
||||||
#if defined(CPUSTM32)
|
#if defined(CPUSTM32)
|
||||||
void processTelemetryData(uint8_t data)
|
void processTelemetryData(uint8_t data)
|
||||||
{
|
{
|
||||||
|
#if defined(CROSSFIRE)
|
||||||
|
if (telemetryProtocol == PROTOCOL_PULSES_CROSSFIRE)
|
||||||
|
processCrossfireTelemetryData(data);
|
||||||
|
#endif
|
||||||
processFrskyTelemetryData(data);
|
processFrskyTelemetryData(data);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#ifndef _TELEMETRY_H_
|
#ifndef _TELEMETRY_H_
|
||||||
#define _TELEMETRY_H_
|
#define _TELEMETRY_H_
|
||||||
|
|
||||||
#if defined (FRSKY)
|
#if defined(FRSKY)
|
||||||
// FrSky Telemetry
|
// FrSky Telemetry
|
||||||
#include "frsky.h"
|
#include "frsky.h"
|
||||||
#elif defined(JETI)
|
#elif defined(JETI)
|
||||||
|
@ -38,6 +38,10 @@
|
||||||
#include "mavlink.h"
|
#include "mavlink.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(CROSSFIRE)
|
||||||
|
#include "crossfire.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
extern uint8_t telemetryStreaming; // >0 (true) == data is streaming in. 0 = no data detected for some time
|
extern uint8_t telemetryStreaming; // >0 (true) == data is streaming in. 0 = no data detected for some time
|
||||||
|
|
||||||
#if defined(WS_HOW_HIGH)
|
#if defined(WS_HOW_HIGH)
|
||||||
|
@ -55,6 +59,10 @@ enum TelemetryStates {
|
||||||
extern uint8_t telemetryState;
|
extern uint8_t telemetryState;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define TELEMETRY_RX_PACKET_SIZE 19 // 9 bytes (full packet), worst case 18 bytes with byte-stuffing (+1)
|
||||||
|
extern uint8_t telemetryRxBuffer[TELEMETRY_RX_PACKET_SIZE];
|
||||||
|
extern uint8_t telemetryRxBufferCount;
|
||||||
|
|
||||||
#if defined(CPUARM)
|
#if defined(CPUARM)
|
||||||
#define TELEMETRY_VALUE_TIMER_CYCLE 200 /*20 seconds*/
|
#define TELEMETRY_VALUE_TIMER_CYCLE 200 /*20 seconds*/
|
||||||
#define TELEMETRY_VALUE_OLD_THRESHOLD 150 /*15 seconds*/
|
#define TELEMETRY_VALUE_OLD_THRESHOLD 150 /*15 seconds*/
|
||||||
|
@ -113,6 +121,23 @@ extern uint8_t telemetryProtocol;
|
||||||
#define IS_FRSKY_SPORT_PROTOCOL() (false)
|
#define IS_FRSKY_SPORT_PROTOCOL() (false)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(CPUSTM32)
|
||||||
|
inline uint8_t modelTelemetryProtocol()
|
||||||
|
{
|
||||||
|
#if defined(CROSSFIRE)
|
||||||
|
if (g_model.moduleData[EXTERNAL_MODULE].type == MODULE_TYPE_CROSSFIRE)
|
||||||
|
return PROTOCOL_PULSES_CROSSFIRE;
|
||||||
|
#endif
|
||||||
|
if (g_model.moduleData[INTERNAL_MODULE].rfProtocol == RF_PROTO_OFF && g_model.moduleData[EXTERNAL_MODULE].type == MODULE_TYPE_PPM)
|
||||||
|
return g_model.telemetryProtocol;
|
||||||
|
else
|
||||||
|
return PROTOCOL_FRSKY_SPORT;
|
||||||
|
}
|
||||||
|
#define MODEL_TELEMETRY_PROTOCOL() modelTelemetryProtocol()
|
||||||
|
#elif defined(CPUARM)
|
||||||
|
#define MODEL_TELEMETRY_PROTOCOL() g_model.telemetryProtocol
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(CPUARM)
|
#if defined(CPUARM)
|
||||||
#include "telemetry_sensors.h"
|
#include "telemetry_sensors.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -529,6 +529,11 @@ void setTelemetryValue(TelemetryProtocol protocol, uint16_t id, uint8_t subId, u
|
||||||
case TELEM_PROTO_FRSKY_D:
|
case TELEM_PROTO_FRSKY_D:
|
||||||
frskyDSetDefault(index, id);
|
frskyDSetDefault(index, id);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
#if defined(CROSSFIRE)
|
||||||
|
case TELEM_PROTO_CROSSFIRE:
|
||||||
|
crossfireSetDefault(index, id, instance);
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -376,7 +376,7 @@
|
||||||
#define LEN_VUNITSSYSTEM TR("\006", "\010")
|
#define LEN_VUNITSSYSTEM TR("\006", "\010")
|
||||||
#define TR_VUNITSSYSTEM TR("Metr.\0""Imper.", "Metrické""Imperial")
|
#define TR_VUNITSSYSTEM TR("Metr.\0""Imper.", "Metrické""Imperial")
|
||||||
#define LEN_VTELEMUNIT "\003"
|
#define LEN_VTELEMUNIT "\003"
|
||||||
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""dB\0""rpm""g\0 ""@\0 ""ml\0""fOz"
|
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""mW\0""dB\0""rpm""g\0 ""@\0 ""ml\0""fOz"
|
||||||
#else
|
#else
|
||||||
#if defined(IMPERIAL_UNITS)
|
#if defined(IMPERIAL_UNITS)
|
||||||
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
||||||
|
@ -1160,3 +1160,13 @@
|
||||||
#define ZSTR_BATT2_CONSUMPTION "RB2C"
|
#define ZSTR_BATT2_CONSUMPTION "RB2C"
|
||||||
#define ZSTR_RB_STATE "RBS"
|
#define ZSTR_RB_STATE "RBS"
|
||||||
#define ZSTR_CHANS_STATE "RBCS"
|
#define ZSTR_CHANS_STATE "RBCS"
|
||||||
|
#define ZSTR_RX_RSSI1 "1RSS"
|
||||||
|
#define ZSTR_RX_RSSI2 "2RSS"
|
||||||
|
#define ZSTR_RX_QUALITY "RQly"
|
||||||
|
#define ZSTR_RX_SNR "RSNR"
|
||||||
|
#define ZSTR_ANTENNA "ANT"
|
||||||
|
#define ZSTR_RF_MODE "RFMD"
|
||||||
|
#define ZSTR_TX_POWER "TPWR"
|
||||||
|
#define ZSTR_TX_RSSI "TRSS"
|
||||||
|
#define ZSTR_TX_QUALITY "TQly"
|
||||||
|
#define ZSTR_TX_SNR "TSNR"
|
|
@ -383,7 +383,7 @@
|
||||||
#define LEN_VUNITSSYSTEM TR("\006", "\012")
|
#define LEN_VUNITSSYSTEM TR("\006", "\012")
|
||||||
#define TR_VUNITSSYSTEM TR("Metrik""Imper.", "Metrisch\0 ""Imperial\0 ")
|
#define TR_VUNITSSYSTEM TR("Metrik""Imper.", "Metrisch\0 ""Imperial\0 ")
|
||||||
#define LEN_VTELEMUNIT "\003"
|
#define LEN_VTELEMUNIT "\003"
|
||||||
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""dB\0""rpm""g\0 ""@\0 ""ml\0""fOz"
|
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""mW\0""dB\0""rpm""g\0 ""@\0 ""ml\0""fOz"
|
||||||
#else
|
#else
|
||||||
#if defined(IMPERIAL_UNITS)
|
#if defined(IMPERIAL_UNITS)
|
||||||
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
||||||
|
@ -1163,3 +1163,13 @@
|
||||||
#define ZSTR_BATT2_CONSUMPTION "RB2C"
|
#define ZSTR_BATT2_CONSUMPTION "RB2C"
|
||||||
#define ZSTR_RB_STATE "RBS"
|
#define ZSTR_RB_STATE "RBS"
|
||||||
#define ZSTR_CHANS_STATE "RBCS"
|
#define ZSTR_CHANS_STATE "RBCS"
|
||||||
|
#define ZSTR_RX_RSSI1 "1RSS"
|
||||||
|
#define ZSTR_RX_RSSI2 "2RSS"
|
||||||
|
#define ZSTR_RX_QUALITY "RQly"
|
||||||
|
#define ZSTR_RX_SNR "RSNR"
|
||||||
|
#define ZSTR_ANTENNA "ANT"
|
||||||
|
#define ZSTR_RF_MODE "RFMD"
|
||||||
|
#define ZSTR_TX_POWER "TPWR"
|
||||||
|
#define ZSTR_TX_RSSI "TRSS"
|
||||||
|
#define ZSTR_TX_QUALITY "TQly"
|
||||||
|
#define ZSTR_TX_SNR "TSNR"
|
|
@ -378,7 +378,7 @@
|
||||||
#define LEN_VUNITSSYSTEM TR("\006", "\010")
|
#define LEN_VUNITSSYSTEM TR("\006", "\010")
|
||||||
#define TR_VUNITSSYSTEM TR("Metric""Imper.", "Metric\0 ""Imperial")
|
#define TR_VUNITSSYSTEM TR("Metric""Imper.", "Metric\0 ""Imperial")
|
||||||
#define LEN_VTELEMUNIT "\003"
|
#define LEN_VTELEMUNIT "\003"
|
||||||
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""dB\0""rpm""g\0 ""@\0 ""ml\0""fOz"
|
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""mW\0""dB\0""rpm""g\0 ""@\0 ""ml\0""fOz"
|
||||||
#else
|
#else
|
||||||
#if defined(IMPERIAL_UNITS)
|
#if defined(IMPERIAL_UNITS)
|
||||||
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
||||||
|
@ -1178,3 +1178,13 @@
|
||||||
#define ZSTR_BATT2_CONSUMPTION "RB2C"
|
#define ZSTR_BATT2_CONSUMPTION "RB2C"
|
||||||
#define ZSTR_RB_STATE "RBS"
|
#define ZSTR_RB_STATE "RBS"
|
||||||
#define ZSTR_CHANS_STATE "RBCS"
|
#define ZSTR_CHANS_STATE "RBCS"
|
||||||
|
#define ZSTR_RX_RSSI1 "1RSS"
|
||||||
|
#define ZSTR_RX_RSSI2 "2RSS"
|
||||||
|
#define ZSTR_RX_QUALITY "RQly"
|
||||||
|
#define ZSTR_RX_SNR "RSNR"
|
||||||
|
#define ZSTR_ANTENNA "ANT"
|
||||||
|
#define ZSTR_RF_MODE "RFMD"
|
||||||
|
#define ZSTR_TX_POWER "TPWR"
|
||||||
|
#define ZSTR_TX_RSSI "TRSS"
|
||||||
|
#define ZSTR_TX_QUALITY "TQly"
|
||||||
|
#define ZSTR_TX_SNR "TSNR"
|
|
@ -376,7 +376,7 @@
|
||||||
#define LEN_VUNITSSYSTEM TR("\006", "\010")
|
#define LEN_VUNITSSYSTEM TR("\006", "\010")
|
||||||
#define TR_VUNITSSYSTEM TR("Metric""Imper.", "Metric\0 ""Imperial")
|
#define TR_VUNITSSYSTEM TR("Metric""Imper.", "Metric\0 ""Imperial")
|
||||||
#define LEN_VTELEMUNIT "\003"
|
#define LEN_VTELEMUNIT "\003"
|
||||||
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""dB\0""rpm""g\0 ""@\0 ""ml\0""fOz"
|
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""mW\0""dB\0""rpm""g\0 ""@\0 ""ml\0""fOz"
|
||||||
#else
|
#else
|
||||||
#if defined(IMPERIAL_UNITS)
|
#if defined(IMPERIAL_UNITS)
|
||||||
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
||||||
|
@ -1120,3 +1120,13 @@
|
||||||
#define ZSTR_BATT2_CONSUMPTION "RB2C"
|
#define ZSTR_BATT2_CONSUMPTION "RB2C"
|
||||||
#define ZSTR_RB_STATE "RBS"
|
#define ZSTR_RB_STATE "RBS"
|
||||||
#define ZSTR_CHANS_STATE "RBCS"
|
#define ZSTR_CHANS_STATE "RBCS"
|
||||||
|
#define ZSTR_RX_RSSI1 "1RSS"
|
||||||
|
#define ZSTR_RX_RSSI2 "2RSS"
|
||||||
|
#define ZSTR_RX_QUALITY "RQly"
|
||||||
|
#define ZSTR_RX_SNR "RSNR"
|
||||||
|
#define ZSTR_ANTENNA "ANT"
|
||||||
|
#define ZSTR_RF_MODE "RFMD"
|
||||||
|
#define ZSTR_TX_POWER "TPWR"
|
||||||
|
#define ZSTR_TX_RSSI "TRSS"
|
||||||
|
#define ZSTR_TX_QUALITY "TQly"
|
||||||
|
#define ZSTR_TX_SNR "TSNR"
|
|
@ -376,7 +376,7 @@
|
||||||
#define LEN_VUNITSSYSTEM TR("\006", "\010")
|
#define LEN_VUNITSSYSTEM TR("\006", "\010")
|
||||||
#define TR_VUNITSSYSTEM TR("Metric""Imper.", "Metric\0 ""Imperial")
|
#define TR_VUNITSSYSTEM TR("Metric""Imper.", "Metric\0 ""Imperial")
|
||||||
#define LEN_VTELEMUNIT "\003"
|
#define LEN_VTELEMUNIT "\003"
|
||||||
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""dB\0""rpm""g\0 ""@\0 ""ml\0""fOz"
|
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""mW\0""dB\0""rpm""g\0 ""@\0 ""ml\0""fOz"
|
||||||
#else
|
#else
|
||||||
#if defined(IMPERIAL_UNITS)
|
#if defined(IMPERIAL_UNITS)
|
||||||
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
||||||
|
@ -1120,3 +1120,13 @@
|
||||||
#define ZSTR_BATT2_CONSUMPTION "RB2C"
|
#define ZSTR_BATT2_CONSUMPTION "RB2C"
|
||||||
#define ZSTR_RB_STATE "RBS"
|
#define ZSTR_RB_STATE "RBS"
|
||||||
#define ZSTR_CHANS_STATE "RBCS"
|
#define ZSTR_CHANS_STATE "RBCS"
|
||||||
|
#define ZSTR_RX_RSSI1 "1RSS"
|
||||||
|
#define ZSTR_RX_RSSI2 "2RSS"
|
||||||
|
#define ZSTR_RX_QUALITY "RQly"
|
||||||
|
#define ZSTR_RX_SNR "RSNR"
|
||||||
|
#define ZSTR_ANTENNA "ANT"
|
||||||
|
#define ZSTR_RF_MODE "RFMD"
|
||||||
|
#define ZSTR_TX_POWER "TPWR"
|
||||||
|
#define ZSTR_TX_RSSI "TRSS"
|
||||||
|
#define ZSTR_TX_QUALITY "TQly"
|
||||||
|
#define ZSTR_TX_SNR "TSNR"
|
|
@ -378,7 +378,7 @@
|
||||||
#define LEN_VUNITSSYSTEM TR("\006", "\012")
|
#define LEN_VUNITSSYSTEM TR("\006", "\012")
|
||||||
#define TR_VUNITSSYSTEM TR("Métr.\0""Impér.", "Métriques\0""Impériales")
|
#define TR_VUNITSSYSTEM TR("Métr.\0""Impér.", "Métriques\0""Impériales")
|
||||||
#define LEN_VTELEMUNIT "\003"
|
#define LEN_VTELEMUNIT "\003"
|
||||||
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""dB\0""rpm""g\0 ""@\0 ""ml\0""fOz"
|
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""mW\0""dB\0""rpm""g\0 ""@\0 ""ml\0""fOz"
|
||||||
#else
|
#else
|
||||||
#if defined(IMPERIAL_UNITS)
|
#if defined(IMPERIAL_UNITS)
|
||||||
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
||||||
|
@ -1150,3 +1150,13 @@
|
||||||
#define ZSTR_BATT2_CONSUMPTION "RB2C"
|
#define ZSTR_BATT2_CONSUMPTION "RB2C"
|
||||||
#define ZSTR_RB_STATE "RBS"
|
#define ZSTR_RB_STATE "RBS"
|
||||||
#define ZSTR_CHANS_STATE "RBCS"
|
#define ZSTR_CHANS_STATE "RBCS"
|
||||||
|
#define ZSTR_RX_RSSI1 "1RSS"
|
||||||
|
#define ZSTR_RX_RSSI2 "2RSS"
|
||||||
|
#define ZSTR_RX_QUALITY "RQly"
|
||||||
|
#define ZSTR_RX_SNR "RSNR"
|
||||||
|
#define ZSTR_ANTENNA "ANT"
|
||||||
|
#define ZSTR_RF_MODE "RFMD"
|
||||||
|
#define ZSTR_TX_POWER "TPWR"
|
||||||
|
#define ZSTR_TX_RSSI "TRSS"
|
||||||
|
#define ZSTR_TX_QUALITY "TQly"
|
||||||
|
#define ZSTR_TX_SNR "TSNR"
|
|
@ -378,7 +378,7 @@
|
||||||
#define LEN_VUNITSSYSTEM TR("\006", "\011")
|
#define LEN_VUNITSSYSTEM TR("\006", "\011")
|
||||||
#define TR_VUNITSSYSTEM TR("Metric""Imper.", "Metriche\0""Imperiali")
|
#define TR_VUNITSSYSTEM TR("Metric""Imper.", "Metriche\0""Imperiali")
|
||||||
#define LEN_VTELEMUNIT "\003"
|
#define LEN_VTELEMUNIT "\003"
|
||||||
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""dB\0""rpm""g\0 ""@\0 ""ml\0""fOz"
|
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""mW\0""dB\0""rpm""g\0 ""@\0 ""ml\0""fOz"
|
||||||
#else
|
#else
|
||||||
#if defined(IMPERIAL_UNITS)
|
#if defined(IMPERIAL_UNITS)
|
||||||
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
||||||
|
@ -1159,3 +1159,13 @@
|
||||||
#define ZSTR_BATT2_CONSUMPTION "RB2C"
|
#define ZSTR_BATT2_CONSUMPTION "RB2C"
|
||||||
#define ZSTR_RB_STATE "RBS"
|
#define ZSTR_RB_STATE "RBS"
|
||||||
#define ZSTR_CHANS_STATE "RBCS"
|
#define ZSTR_CHANS_STATE "RBCS"
|
||||||
|
#define ZSTR_RX_RSSI1 "1RSS"
|
||||||
|
#define ZSTR_RX_RSSI2 "2RSS"
|
||||||
|
#define ZSTR_RX_QUALITY "RQly"
|
||||||
|
#define ZSTR_RX_SNR "RSNR"
|
||||||
|
#define ZSTR_ANTENNA "ANT"
|
||||||
|
#define ZSTR_RF_MODE "RFMD"
|
||||||
|
#define ZSTR_TX_POWER "TPWR"
|
||||||
|
#define ZSTR_TX_RSSI "TRSS"
|
||||||
|
#define ZSTR_TX_QUALITY "TQly"
|
||||||
|
#define ZSTR_TX_SNR "TSNR"
|
|
@ -379,7 +379,7 @@
|
||||||
#define LEN_VUNITSSYSTEM TR("\006", "\010")
|
#define LEN_VUNITSSYSTEM TR("\006", "\010")
|
||||||
#define TR_VUNITSSYSTEM TR("Metrs.""Engels", "Metrisch\0 ""Engels\0 ")
|
#define TR_VUNITSSYSTEM TR("Metrs.""Engels", "Metrisch\0 ""Engels\0 ")
|
||||||
#define LEN_VTELEMUNIT "\003"
|
#define LEN_VTELEMUNIT "\003"
|
||||||
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""dB\0""rpm""g\0 ""@\0 ""ml\0""fOz"
|
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""mW\0""dB\0""rpm""g\0 ""@\0 ""ml\0""fOz"
|
||||||
#else
|
#else
|
||||||
#if defined(IMPERIAL_UNITS)
|
#if defined(IMPERIAL_UNITS)
|
||||||
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
||||||
|
@ -1174,3 +1174,13 @@
|
||||||
#define ZSTR_BATT2_CONSUMPTION "RB2C"
|
#define ZSTR_BATT2_CONSUMPTION "RB2C"
|
||||||
#define ZSTR_RB_STATE "RBS"
|
#define ZSTR_RB_STATE "RBS"
|
||||||
#define ZSTR_CHANS_STATE "RBCS"
|
#define ZSTR_CHANS_STATE "RBCS"
|
||||||
|
#define ZSTR_RX_RSSI1 "1RSS"
|
||||||
|
#define ZSTR_RX_RSSI2 "2RSS"
|
||||||
|
#define ZSTR_RX_QUALITY "RQly"
|
||||||
|
#define ZSTR_RX_SNR "RSNR"
|
||||||
|
#define ZSTR_ANTENNA "ANT"
|
||||||
|
#define ZSTR_RF_MODE "RFMD"
|
||||||
|
#define ZSTR_TX_POWER "TPWR"
|
||||||
|
#define ZSTR_TX_RSSI "TRSS"
|
||||||
|
#define ZSTR_TX_QUALITY "TQly"
|
||||||
|
#define ZSTR_TX_SNR "TSNR"
|
|
@ -380,7 +380,7 @@
|
||||||
#define LEN_VUNITSSYSTEM TR("\006", "\010") /*8 decimal*/
|
#define LEN_VUNITSSYSTEM TR("\006", "\010") /*8 decimal*/
|
||||||
#define TR_VUNITSSYSTEM TR("Metr. ""Imper.", "Metryczn""Imperial")
|
#define TR_VUNITSSYSTEM TR("Metr. ""Imper.", "Metryczn""Imperial")
|
||||||
#define LEN_VTELEMUNIT "\003"
|
#define LEN_VTELEMUNIT "\003"
|
||||||
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""dB\0""rpm""g\0 ""@\0 ""ml\0""fOz"
|
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""mW\0""dB\0""rpm""g\0 ""@\0 ""ml\0""fOz"
|
||||||
#else
|
#else
|
||||||
#if defined(IMPERIAL_UNITS)
|
#if defined(IMPERIAL_UNITS)
|
||||||
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
||||||
|
@ -1161,3 +1161,13 @@
|
||||||
#define ZSTR_BATT2_CONSUMPTION "RB2C"
|
#define ZSTR_BATT2_CONSUMPTION "RB2C"
|
||||||
#define ZSTR_RB_STATE "RBS"
|
#define ZSTR_RB_STATE "RBS"
|
||||||
#define ZSTR_CHANS_STATE "RBCS"
|
#define ZSTR_CHANS_STATE "RBCS"
|
||||||
|
#define ZSTR_RX_RSSI1 "1RSS"
|
||||||
|
#define ZSTR_RX_RSSI2 "2RSS"
|
||||||
|
#define ZSTR_RX_QUALITY "RQly"
|
||||||
|
#define ZSTR_RX_SNR "RSNR"
|
||||||
|
#define ZSTR_ANTENNA "ANT"
|
||||||
|
#define ZSTR_RF_MODE "RFMD"
|
||||||
|
#define ZSTR_TX_POWER "TPWR"
|
||||||
|
#define ZSTR_TX_RSSI "TRSS"
|
||||||
|
#define ZSTR_TX_QUALITY "TQly"
|
||||||
|
#define ZSTR_TX_SNR "TSNR"
|
|
@ -370,7 +370,7 @@
|
||||||
#define LEN_VUNITSSYSTEM TR("\006", "\010")
|
#define LEN_VUNITSSYSTEM TR("\006", "\010")
|
||||||
#define TR_VUNITSSYSTEM TR("Metric""Imper.", "Metric\0 ""Imperial")
|
#define TR_VUNITSSYSTEM TR("Metric""Imper.", "Metric\0 ""Imperial")
|
||||||
#define LEN_VTELEMUNIT "\003"
|
#define LEN_VTELEMUNIT "\003"
|
||||||
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""dB\0""rpm""g\0 ""@\0 ""ml\0""fOz"
|
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""mW\0""dB\0""rpm""g\0 ""@\0 ""ml\0""fOz"
|
||||||
#else
|
#else
|
||||||
#if defined(IMPERIAL_UNITS)
|
#if defined(IMPERIAL_UNITS)
|
||||||
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
||||||
|
@ -1114,3 +1114,13 @@
|
||||||
#define ZSTR_BATT2_CONSUMPTION "RB2C"
|
#define ZSTR_BATT2_CONSUMPTION "RB2C"
|
||||||
#define ZSTR_RB_STATE "RBS"
|
#define ZSTR_RB_STATE "RBS"
|
||||||
#define ZSTR_CHANS_STATE "RBCS"
|
#define ZSTR_CHANS_STATE "RBCS"
|
||||||
|
#define ZSTR_RX_RSSI1 "1RSS"
|
||||||
|
#define ZSTR_RX_RSSI2 "2RSS"
|
||||||
|
#define ZSTR_RX_QUALITY "RQly"
|
||||||
|
#define ZSTR_RX_SNR "RSNR"
|
||||||
|
#define ZSTR_ANTENNA "ANT"
|
||||||
|
#define ZSTR_RF_MODE "RFMD"
|
||||||
|
#define ZSTR_TX_POWER "TPWR"
|
||||||
|
#define ZSTR_TX_RSSI "TRSS"
|
||||||
|
#define ZSTR_TX_QUALITY "TQly"
|
||||||
|
#define ZSTR_TX_SNR "TSNR"
|
|
@ -376,7 +376,7 @@
|
||||||
#define LEN_VUNITSSYSTEM TR("\006", "\010")
|
#define LEN_VUNITSSYSTEM TR("\006", "\010")
|
||||||
#define TR_VUNITSSYSTEM TR("Metri.""Imper.", "Metriska""Imperial")
|
#define TR_VUNITSSYSTEM TR("Metri.""Imper.", "Metriska""Imperial")
|
||||||
#define LEN_VTELEMUNIT "\003"
|
#define LEN_VTELEMUNIT "\003"
|
||||||
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""dB\0""rpm""g\0 ""@\0 ""ml\0""fOz"
|
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""mW\0""dB\0""rpm""g\0 ""@\0 ""ml\0""fOz"
|
||||||
#else
|
#else
|
||||||
#if defined(IMPERIAL_UNITS)
|
#if defined(IMPERIAL_UNITS)
|
||||||
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
||||||
|
@ -1175,3 +1175,13 @@
|
||||||
#define ZSTR_BATT2_CONSUMPTION "RB2C"
|
#define ZSTR_BATT2_CONSUMPTION "RB2C"
|
||||||
#define ZSTR_RB_STATE "RBS"
|
#define ZSTR_RB_STATE "RBS"
|
||||||
#define ZSTR_CHANS_STATE "RBCS"
|
#define ZSTR_CHANS_STATE "RBCS"
|
||||||
|
#define ZSTR_RX_RSSI1 "1RSS"
|
||||||
|
#define ZSTR_RX_RSSI2 "2RSS"
|
||||||
|
#define ZSTR_RX_QUALITY "RQly"
|
||||||
|
#define ZSTR_RX_SNR "RSNR"
|
||||||
|
#define ZSTR_ANTENNA "ANT"
|
||||||
|
#define ZSTR_RF_MODE "RFMD"
|
||||||
|
#define ZSTR_TX_POWER "TPWR"
|
||||||
|
#define ZSTR_TX_RSSI "TRSS"
|
||||||
|
#define ZSTR_TX_QUALITY "TQly"
|
||||||
|
#define ZSTR_TX_SNR "TSNR"
|
Loading…
Add table
Add a link
Reference in a new issue