mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 17:25:13 +03:00
Remove REGISTER from RADIO / HARDWARE as it only brings issues
This commit is contained in:
parent
bfed532712
commit
7abb6a77b7
9 changed files with 226 additions and 200 deletions
|
@ -372,7 +372,6 @@ void runPopupRegister(event_t event)
|
|||
void startRegisterDialog(uint8_t module)
|
||||
{
|
||||
memclear(&reusableBuffer.moduleSetup.pxx2, sizeof(reusableBuffer.moduleSetup.pxx2));
|
||||
memcpy(reusableBuffer.moduleSetup.pxx2.registrationID, g_model.modelRegistrationID, PXX2_LEN_REGISTRATION_ID);
|
||||
moduleSettings[module].mode = MODULE_MODE_REGISTER;
|
||||
s_editMode = 0;
|
||||
POPUP_INPUT("", runPopupRegister);
|
||||
|
|
|
@ -125,7 +125,6 @@ enum MenuRadioHardwareItems {
|
|||
#endif
|
||||
ITEM_RADIO_HARDWARE_JITTER_FILTER,
|
||||
ITEM_RADIO_OWNER_ID,
|
||||
ITEM_RADIO_REGISTER_RECEIVER,
|
||||
ITEM_RADIO_HARDWARE_MAX
|
||||
};
|
||||
|
||||
|
@ -158,8 +157,6 @@ enum MenuRadioHardwareItems {
|
|||
#define HW_SETTINGS_COLUMN1 30
|
||||
#define HW_SETTINGS_COLUMN2 (30 + 5*FW)
|
||||
|
||||
void startRegisterDialog(uint8_t module);
|
||||
|
||||
void menuRadioHardware(event_t event)
|
||||
{
|
||||
MENU(STR_HARDWARE, menuTabGeneral, MENU_RADIO_HARDWARE, HEADER_LINE+ITEM_RADIO_HARDWARE_MAX, {
|
||||
|
@ -314,29 +311,6 @@ void menuRadioHardware(event_t event)
|
|||
case ITEM_RADIO_OWNER_ID:
|
||||
editSingleName(HW_SETTINGS_COLUMN2, y, STR_OWNER_ID, g_eeGeneral.ownerRegistrationID, PXX2_LEN_REGISTRATION_ID, event, attr);
|
||||
break;
|
||||
|
||||
case ITEM_RADIO_REGISTER_RECEIVER:
|
||||
lcdDrawTextAlignedLeft(y, NO_INDENT(STR_RECEIVER));
|
||||
lcdDrawText(HW_SETTINGS_COLUMN2, y, "[Register]", attr );
|
||||
if (attr) {
|
||||
if (moduleSettings[INTERNAL_MODULE].mode == MODULE_MODE_NORMAL && s_editMode > 0) {
|
||||
if (event == EVT_KEY_FIRST(KEY_ENTER)) {
|
||||
startRegisterDialog(INTERNAL_MODULE);
|
||||
}
|
||||
else if (menuHorizontalPosition == 0) {
|
||||
moduleSettings[INTERNAL_MODULE].mode = MODULE_MODE_RANGECHECK;
|
||||
}
|
||||
}
|
||||
if (s_editMode == 0 && !warningText) {
|
||||
moduleSettings[INTERNAL_MODULE].mode = MODULE_MODE_NORMAL;
|
||||
}
|
||||
if (moduleSettings[INTERNAL_MODULE].mode == MODULE_MODE_NORMAL) {
|
||||
// REGISTER finished
|
||||
s_editMode = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1129,7 +1129,6 @@ union ReusableBuffer
|
|||
uint8_t registerPopupHorizontalPosition;
|
||||
int8_t registerPopupEditMode;
|
||||
char registerRxName[PXX2_LEN_RX_NAME];
|
||||
char registrationID[PXX2_LEN_REGISTRATION_ID];
|
||||
char bindCandidateReceiversNames[PXX2_MAX_RECEIVERS_PER_MODULE][PXX2_LEN_RX_NAME + 1];
|
||||
uint8_t bindCandidateReceiversCount;
|
||||
uint8_t bindReceiverId;
|
||||
|
|
|
@ -134,7 +134,7 @@ void Pxx2Pulses::setupRegisterFrame(uint8_t module)
|
|||
Pxx2Transport::addByte(zchar2char(reusableBuffer.moduleSetup.pxx2.registerRxName[i]));
|
||||
}
|
||||
for (uint8_t i=0; i<PXX2_LEN_REGISTRATION_ID; i++) {
|
||||
Pxx2Transport::addByte(zchar2char(reusableBuffer.moduleSetup.pxx2.registrationID[i]));
|
||||
Pxx2Transport::addByte(zchar2char(g_model.modelRegistrationID[i]));
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -146,8 +146,9 @@ set(SRC
|
|||
telemetry/telemetry_holders.cpp
|
||||
telemetry/telemetry_sensors.cpp
|
||||
telemetry/frsky.cpp
|
||||
telemetry/frsky_d_arm.cpp
|
||||
telemetry/frsky_d.cpp
|
||||
telemetry/frsky_sport.cpp
|
||||
telemetry/frsky_pxx2.cpp
|
||||
crc16.cpp
|
||||
vario.cpp
|
||||
)
|
||||
|
|
219
radio/src/telemetry/frsky_pxx2.cpp
Normal file
219
radio/src/telemetry/frsky_pxx2.cpp
Normal file
|
@ -0,0 +1,219 @@
|
|||
/*
|
||||
* 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"
|
||||
|
||||
class Pxx2Telemetry
|
||||
{
|
||||
protected:
|
||||
static void processGetHardwareInfoFrame(uint8_t module, uint8_t *frame);
|
||||
|
||||
static void processReceiverSettingsFrame(uint8_t module, uint8_t *frame);
|
||||
|
||||
static void processRegisterFrame(uint8_t module, uint8_t * frame);
|
||||
|
||||
static void processBindFrame(uint8_t module, uint8_t * frame);
|
||||
|
||||
static void processTelemetryFrame(uint8_t module, uint8_t * frame);
|
||||
|
||||
static void processSpectrumFrame(uint8_t module, uint8_t * frame);
|
||||
|
||||
static void processRadioFrame(uint8_t module, uint8_t * frame);
|
||||
|
||||
static void processPowerMeterFrame(uint8_t module, uint8_t * frame);
|
||||
|
||||
public:
|
||||
};
|
||||
|
||||
void processGetHardwareInfoFrame(uint8_t module, uint8_t * frame)
|
||||
{
|
||||
if (moduleSettings[module].mode != MODULE_MODE_GET_HARDWARE_INFO) {
|
||||
return;
|
||||
}
|
||||
|
||||
uint8_t index = frame[3];
|
||||
if (index == 0xFF) {
|
||||
reusableBuffer.hardware.modules[module].hw_version = *((uint16_t *)&frame[4]);
|
||||
reusableBuffer.hardware.modules[module].sw_version = *((uint16_t *)&frame[6]);
|
||||
}
|
||||
else if (index < PXX2_MAX_RECEIVERS_PER_MODULE){
|
||||
reusableBuffer.hardware.modules[module].receivers[index].hw_version = *((uint16_t *)&frame[4]);
|
||||
reusableBuffer.hardware.modules[module].receivers[index].sw_version = *((uint16_t *)&frame[6]);
|
||||
}
|
||||
}
|
||||
|
||||
void processReceiverSettingsFrame(uint8_t module, uint8_t * frame)
|
||||
{
|
||||
if (moduleSettings[module].mode != MODULE_MODE_RECEIVER_SETTINGS) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (uint8_t pin=0; pin<24; pin++) {
|
||||
reusableBuffer.receiverSetup.channelMapping[pin] = frame[5 + pin];
|
||||
}
|
||||
|
||||
reusableBuffer.receiverSetup.state = 0xFF;
|
||||
moduleSettings[module].mode = MODULE_MODE_NORMAL;
|
||||
}
|
||||
|
||||
void processRegisterFrame(uint8_t module, uint8_t * frame)
|
||||
{
|
||||
if (moduleSettings[module].mode != MODULE_MODE_REGISTER) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch(frame[3]) {
|
||||
case 0x00:
|
||||
if (reusableBuffer.moduleSetup.pxx2.registerStep == REGISTER_START) {
|
||||
// RX_NAME follows, we store it for the next step
|
||||
str2zchar(reusableBuffer.moduleSetup.pxx2.registerRxName, (const char *)&frame[4], PXX2_LEN_RX_NAME);
|
||||
reusableBuffer.moduleSetup.pxx2.registerStep = REGISTER_RX_NAME_RECEIVED;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x01:
|
||||
if (reusableBuffer.moduleSetup.pxx2.registerStep == REGISTER_RX_NAME_SELECTED) {
|
||||
// RX_NAME + PASSWORD follow, we check they are good
|
||||
if (cmpStrWithZchar((char *)&frame[4], reusableBuffer.moduleSetup.pxx2.registerRxName, PXX2_LEN_RX_NAME) &&
|
||||
cmpStrWithZchar((char *)&frame[12], g_model.modelRegistrationID, PXX2_LEN_REGISTRATION_ID)) {
|
||||
reusableBuffer.moduleSetup.pxx2.registerStep = REGISTER_OK;
|
||||
moduleSettings[module].mode = MODULE_MODE_NORMAL;
|
||||
POPUP_INFORMATION(STR_REG_OK);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void processBindFrame(uint8_t module, uint8_t * frame)
|
||||
{
|
||||
if (moduleSettings[module].mode != MODULE_MODE_BIND) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch(frame[3]) {
|
||||
case 0x00:
|
||||
if (reusableBuffer.moduleSetup.pxx2.bindStep == BIND_START) {
|
||||
bool found = false;
|
||||
for (uint8_t i=0; i<reusableBuffer.moduleSetup.pxx2.bindCandidateReceiversCount; i++) {
|
||||
if (memcmp(reusableBuffer.moduleSetup.pxx2.bindCandidateReceiversNames[i], &frame[4], PXX2_LEN_RX_NAME) == 0) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found && reusableBuffer.moduleSetup.pxx2.bindCandidateReceiversCount < PXX2_MAX_RECEIVERS_PER_MODULE) {
|
||||
memcpy(reusableBuffer.moduleSetup.pxx2.bindCandidateReceiversNames[reusableBuffer.moduleSetup.pxx2.bindCandidateReceiversCount++], &frame[4], PXX2_LEN_RX_NAME);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x01:
|
||||
if (reusableBuffer.moduleSetup.pxx2.bindStep == BIND_RX_NAME_SELECTED) {
|
||||
if (memcmp(&reusableBuffer.moduleSetup.pxx2.bindCandidateReceiversNames[reusableBuffer.moduleSetup.pxx2.bindSelectedReceiverIndex], &frame[4], PXX2_LEN_RX_NAME) == 0) {
|
||||
memcpy(g_model.receiverData[reusableBuffer.moduleSetup.pxx2.bindReceiverId].name, &frame[4], PXX2_LEN_RX_NAME);
|
||||
storageDirty(EE_MODEL);
|
||||
reusableBuffer.moduleSetup.pxx2.bindStep = BIND_WAIT;
|
||||
reusableBuffer.moduleSetup.pxx2.bindWaitTimeout = get_tmr10ms() + 30;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void processTelemetryFrame(uint8_t module, uint8_t * frame)
|
||||
{
|
||||
sportProcessTelemetryPacketWithoutCrc(&frame[3]);
|
||||
}
|
||||
|
||||
void processSpectrumFrame(uint8_t module, uint8_t * frame)
|
||||
{
|
||||
if (moduleSettings[module].mode != MODULE_MODE_SPECTRUM_ANALYSER) {
|
||||
return;
|
||||
}
|
||||
|
||||
uint32_t * frequency = (uint32_t *)&frame[4];
|
||||
int8_t * power = (int8_t *)&frame[8];
|
||||
|
||||
// center = 2440000000; // 2440MHz
|
||||
// span = 40000000; // 40MHz
|
||||
// left = 2440000000 - 20000000
|
||||
// step = 10000
|
||||
|
||||
int32_t D = *frequency - (2440000000 - 40000000 / 2);
|
||||
|
||||
// TRACE("Fq=%u, Pw=%d, X=%d, Y=%d", *frequency, int32_t(*power), D * 128 / 40000000, int32_t(127 + *power));
|
||||
uint8_t x = D * 128 / 40000000;
|
||||
|
||||
reusableBuffer.spectrum.bars[x] = 127 + *power;
|
||||
}
|
||||
|
||||
void processRadioFrame(uint8_t module, uint8_t * frame)
|
||||
{
|
||||
switch (frame[2]) {
|
||||
case PXX2_TYPE_ID_HW_INFO:
|
||||
processGetHardwareInfoFrame(module, frame);
|
||||
break;
|
||||
|
||||
case PXX2_TYPE_ID_RX_SETTINGS:
|
||||
processReceiverSettingsFrame(module, frame);
|
||||
break;
|
||||
|
||||
case PXX2_TYPE_ID_REGISTER:
|
||||
processRegisterFrame(module, frame);
|
||||
break;
|
||||
|
||||
case PXX2_TYPE_ID_BIND:
|
||||
processBindFrame(module, frame);
|
||||
break;
|
||||
|
||||
case PXX2_TYPE_ID_TELEMETRY:
|
||||
processTelemetryFrame(module, frame);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void processPowerMeterFrame(uint8_t module, uint8_t * frame)
|
||||
{
|
||||
switch (frame[2]) {
|
||||
case PXX2_TYPE_ID_POWER_METER:
|
||||
// TODO
|
||||
break;
|
||||
|
||||
case PXX2_TYPE_ID_SPECTRUM:
|
||||
processSpectrumFrame(module, frame);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void processPXX2TelemetryFrame(uint8_t module, uint8_t * frame)
|
||||
{
|
||||
switch (frame[1]) {
|
||||
case PXX2_TYPE_C_MODULE:
|
||||
processRadioFrame(module, frame);
|
||||
break;
|
||||
|
||||
case PXX2_TYPE_C_POWER_METER:
|
||||
processPowerMeterFrame(module, frame);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
|
@ -71,174 +71,6 @@ void processTelemetryData(uint8_t data)
|
|||
processFrskyTelemetryData(data);
|
||||
}
|
||||
|
||||
void processGetHardwareInfoFrame(uint8_t module, uint8_t * frame)
|
||||
{
|
||||
if (moduleSettings[module].mode != MODULE_MODE_GET_HARDWARE_INFO) {
|
||||
return;
|
||||
}
|
||||
|
||||
uint8_t index = frame[3];
|
||||
if (index == 0xFF) {
|
||||
reusableBuffer.hardware.modules[module].hw_version = *((uint16_t *)&frame[4]);
|
||||
reusableBuffer.hardware.modules[module].sw_version = *((uint16_t *)&frame[6]);
|
||||
}
|
||||
else if (index < PXX2_MAX_RECEIVERS_PER_MODULE){
|
||||
reusableBuffer.hardware.modules[module].receivers[index].hw_version = *((uint16_t *)&frame[4]);
|
||||
reusableBuffer.hardware.modules[module].receivers[index].sw_version = *((uint16_t *)&frame[6]);
|
||||
}
|
||||
}
|
||||
|
||||
void processReceiverSettingsFrame(uint8_t module, uint8_t * frame)
|
||||
{
|
||||
if (moduleSettings[module].mode != MODULE_MODE_RECEIVER_SETTINGS) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (uint8_t pin=0; pin<24; pin++) {
|
||||
reusableBuffer.receiverSetup.channelMapping[pin] = frame[5 + pin];
|
||||
}
|
||||
|
||||
reusableBuffer.receiverSetup.state = 0xFF;
|
||||
moduleSettings[module].mode = MODULE_MODE_NORMAL;
|
||||
}
|
||||
|
||||
void processRegisterFrame(uint8_t module, uint8_t * frame)
|
||||
{
|
||||
if (moduleSettings[module].mode != MODULE_MODE_REGISTER) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (frame[3] == 0x00 && reusableBuffer.moduleSetup.pxx2.registerStep == REGISTER_START) {
|
||||
// RX_NAME follows, we store it for the next step
|
||||
str2zchar(reusableBuffer.moduleSetup.pxx2.registerRxName, (const char *)&frame[4], PXX2_LEN_RX_NAME);
|
||||
reusableBuffer.moduleSetup.pxx2.registerStep = REGISTER_RX_NAME_RECEIVED;
|
||||
}
|
||||
else if (frame[3] == 0x01 && reusableBuffer.moduleSetup.pxx2.registerStep == REGISTER_RX_NAME_SELECTED) {
|
||||
// RX_NAME + PASSWORD follow, we check they are good
|
||||
if (cmpStrWithZchar((char *)&frame[4], reusableBuffer.moduleSetup.pxx2.registerRxName, PXX2_LEN_RX_NAME) &&
|
||||
cmpStrWithZchar((char *)&frame[12], reusableBuffer.moduleSetup.pxx2.registrationID, PXX2_LEN_REGISTRATION_ID)) {
|
||||
reusableBuffer.moduleSetup.pxx2.registerStep = REGISTER_OK;
|
||||
moduleSettings[module].mode = MODULE_MODE_NORMAL;
|
||||
POPUP_INFORMATION(STR_REG_OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void processBindFrame(uint8_t module, uint8_t * frame)
|
||||
{
|
||||
if (moduleSettings[module].mode != MODULE_MODE_BIND) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch(frame[3]) {
|
||||
case 0x00:
|
||||
if (reusableBuffer.moduleSetup.pxx2.bindStep == BIND_START) {
|
||||
bool found = false;
|
||||
for (uint8_t i=0; i<reusableBuffer.moduleSetup.pxx2.bindCandidateReceiversCount; i++) {
|
||||
if (memcmp(reusableBuffer.moduleSetup.pxx2.bindCandidateReceiversNames[i], &frame[4], PXX2_LEN_RX_NAME) == 0) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found && reusableBuffer.moduleSetup.pxx2.bindCandidateReceiversCount < PXX2_MAX_RECEIVERS_PER_MODULE) {
|
||||
memcpy(reusableBuffer.moduleSetup.pxx2.bindCandidateReceiversNames[reusableBuffer.moduleSetup.pxx2.bindCandidateReceiversCount++], &frame[4], PXX2_LEN_RX_NAME);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x01:
|
||||
if (reusableBuffer.moduleSetup.pxx2.bindStep == BIND_RX_NAME_SELECTED) {
|
||||
if (memcmp(&reusableBuffer.moduleSetup.pxx2.bindCandidateReceiversNames[reusableBuffer.moduleSetup.pxx2.bindSelectedReceiverIndex], &frame[4], PXX2_LEN_RX_NAME) == 0) {
|
||||
memcpy(g_model.receiverData[reusableBuffer.moduleSetup.pxx2.bindReceiverId].name, &frame[4], PXX2_LEN_RX_NAME);
|
||||
reusableBuffer.moduleSetup.pxx2.bindStep = BIND_WAIT;
|
||||
reusableBuffer.moduleSetup.pxx2.bindWaitTimeout = get_tmr10ms() + 30;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void processTelemetryFrame(uint8_t module, uint8_t * frame)
|
||||
{
|
||||
sportProcessTelemetryPacketWithoutCrc(&frame[3]);
|
||||
}
|
||||
|
||||
void processSpectrumFrame(uint8_t module, uint8_t * frame)
|
||||
{
|
||||
if (moduleSettings[module].mode != MODULE_MODE_SPECTRUM_ANALYSER) {
|
||||
return;
|
||||
}
|
||||
|
||||
uint32_t * frequency = (uint32_t *)&frame[4];
|
||||
int8_t * power = (int8_t *)&frame[8];
|
||||
|
||||
// center = 2440000000; // 2440MHz
|
||||
// span = 40000000; // 40MHz
|
||||
// left = 2440000000 - 20000000
|
||||
// step = 10000
|
||||
|
||||
int32_t D = *frequency - (2440000000 - 40000000 / 2);
|
||||
|
||||
// TRACE("Fq=%u, Pw=%d, X=%d, Y=%d", *frequency, int32_t(*power), D * 128 / 40000000, int32_t(127 + *power));
|
||||
uint8_t x = D * 128 / 40000000;
|
||||
|
||||
reusableBuffer.spectrum.bars[x] = 127 + *power;
|
||||
}
|
||||
|
||||
void processRadioFrame(uint8_t module, uint8_t * frame)
|
||||
{
|
||||
switch (frame[2]) {
|
||||
case PXX2_TYPE_ID_HW_INFO:
|
||||
processGetHardwareInfoFrame(module, frame);
|
||||
break;
|
||||
|
||||
case PXX2_TYPE_ID_RX_SETTINGS:
|
||||
processReceiverSettingsFrame(module, frame);
|
||||
break;
|
||||
|
||||
case PXX2_TYPE_ID_REGISTER:
|
||||
processRegisterFrame(module, frame);
|
||||
break;
|
||||
|
||||
case PXX2_TYPE_ID_BIND:
|
||||
processBindFrame(module, frame);
|
||||
break;
|
||||
|
||||
case PXX2_TYPE_ID_TELEMETRY:
|
||||
processTelemetryFrame(module, frame);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void processPowerMeterFrame(uint8_t module, uint8_t * frame)
|
||||
{
|
||||
switch (frame[2]) {
|
||||
case PXX2_TYPE_ID_POWER_METER:
|
||||
// TODO
|
||||
break;
|
||||
|
||||
case PXX2_TYPE_ID_SPECTRUM:
|
||||
processSpectrumFrame(module, frame);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void processModuleFrame(uint8_t module, uint8_t * frame)
|
||||
{
|
||||
switch (frame[1]) {
|
||||
case PXX2_TYPE_C_MODULE:
|
||||
processRadioFrame(module, frame);
|
||||
break;
|
||||
|
||||
case PXX2_TYPE_C_POWER_METER:
|
||||
processPowerMeterFrame(module, frame);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void telemetryWakeup()
|
||||
{
|
||||
uint8_t requiredTelemetryProtocol = modelTelemetryProtocol();
|
||||
|
@ -260,13 +92,13 @@ void telemetryWakeup()
|
|||
|
||||
#if defined(INTMODULE_USART)
|
||||
if (intmoduleFifo.getFrame(frame)) {
|
||||
processModuleFrame(INTERNAL_MODULE, frame);
|
||||
processPXX2TelemetryFrame(INTERNAL_MODULE, frame);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(EXTMODULE_USART)
|
||||
if (extmoduleFifo.getFrame(frame)) {
|
||||
processModuleFrame(EXTERNAL_MODULE, frame);
|
||||
processPXX2TelemetryFrame(EXTERNAL_MODULE, frame);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -181,5 +181,7 @@ extern Fifo<uint8_t, LUA_TELEMETRY_INPUT_FIFO_SIZE> * luaInputTelemetryFifo;
|
|||
#define IS_TELEMETRY_INTERNAL_MODULE() (false)
|
||||
#endif
|
||||
|
||||
void processPXX2TelemetryFrame(uint8_t module, uint8_t * frame);
|
||||
|
||||
#endif // _TELEMETRY_H_
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue