mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-07-12 17:57:53 +00:00
Add skeleton for AFHDS2A receiver protocol
This commit is contained in:
parent
ada72d6113
commit
84a0eedb52
30
Multiprotocol/AFHDS2A_Rx_a7105.ino
Normal file
30
Multiprotocol/AFHDS2A_Rx_a7105.ino
Normal file
@ -0,0 +1,30 @@
|
||||
/*
|
||||
This project is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Multiprotocol 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.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Multiprotocol. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#if defined(AFHDS2A_RX_A7105_INO)
|
||||
|
||||
#include "iface_a7105.h"
|
||||
|
||||
uint16_t initAFHDS2A_Rx()
|
||||
{
|
||||
return 1000;
|
||||
}
|
||||
|
||||
uint16_t AFHDS2A_Rx_callback()
|
||||
{
|
||||
return 1000;
|
||||
}
|
||||
|
||||
#endif
|
@ -53,4 +53,5 @@
|
||||
53,Flyzone,FZ-410
|
||||
54,Scanner
|
||||
55,FrskyX_RX,FCC,EU_LBT
|
||||
56,AFHDS2A_RX
|
||||
63,XN_DUMP,250K,1M,2M
|
||||
|
@ -82,6 +82,7 @@ enum PROTOCOLS
|
||||
PROTO_FLYZONE = 53, // =>A7105
|
||||
PROTO_SCANNER = 54, // =>CC2500
|
||||
PROTO_FRSKYX_RX = 55, // =>CC2500
|
||||
PROTO_AFHDS2A_RX= 56, // =>A7105
|
||||
PROTO_XN297DUMP = 63, // =>NRF24L01
|
||||
};
|
||||
|
||||
@ -575,7 +576,8 @@ enum {
|
||||
#define AFHDS2A_EEPROM_OFFSET 50 // RX ID, 4 bytes per model id, end is 50+64=114
|
||||
#define BUGS_EEPROM_OFFSET 114 // RX ID, 2 bytes per model id, end is 114+32=146
|
||||
#define BUGSMINI_EEPROM_OFFSET 146 // RX ID, 2 bytes per model id, end is 146+32=178
|
||||
#define FRSKYX_RX_EEPROM_OFFSET 178 // (3) TX ID + (1) freq_tune + (47) channels, 51 bytes per model, end is 178+51=229
|
||||
#define FRSKYX_RX_EEPROM_OFFSET 178 // (3) TX ID + (1) freq_tune + (47) channels, 51 bytes, end is 178+51=229
|
||||
#define AFHDS2A_RX_EEPROM_OFFSET 229 // (4) TX ID + (16) channels, 20 bytes, end is 229+20=249
|
||||
//#define CONFIG_EEPROM_OFFSET 210 // Current configuration of the multimodule
|
||||
|
||||
//****************************************
|
||||
|
@ -1003,6 +1003,13 @@ static void protocol_init()
|
||||
remote_callback = ReadFlyzone;
|
||||
break;
|
||||
#endif
|
||||
#if defined(AFHDS2A_RX_A7105_INO)
|
||||
case PROTO_AFHDS2A_RX:
|
||||
PE1_off; //antenna RF1
|
||||
next_callback = initAFHDS2A_Rx();
|
||||
remote_callback = AFHDS2A_Rx_callback;
|
||||
break;
|
||||
#endif
|
||||
#endif
|
||||
#ifdef CC2500_INSTALLED
|
||||
#if defined(FRSKYD_CC2500_INO)
|
||||
|
@ -174,6 +174,7 @@
|
||||
#undef AFHDS2A_A7105_INO
|
||||
#undef BUGS_A7105_INO
|
||||
#undef FLYZONE_A7105_INO
|
||||
#undef AFHDS2A_RX_A7105_INO
|
||||
#endif
|
||||
#ifndef CYRF6936_INSTALLED
|
||||
#undef DEVO_CYRF6936_INO
|
||||
@ -254,6 +255,8 @@
|
||||
#undef SCANNER_CC2500_INO
|
||||
#undef FRSKYX_RX_TELEMETRY
|
||||
#undef FRSKYX_RX_CC2500_INO
|
||||
#undef AFHDS2A_RX_TELEMETRY
|
||||
#undef AFHDS2A_RX_A7105_INO
|
||||
#else
|
||||
#if defined(MULTI_TELEMETRY) && defined(MULTI_STATUS)
|
||||
#error You should choose either MULTI_TELEMETRY or MULTI_STATUS but not both.
|
||||
@ -266,6 +269,10 @@
|
||||
#undef FRSKYX_RX_TELEMETRY
|
||||
#undef FRSKYX_RX_CC2500_INO
|
||||
#endif
|
||||
#if not defined(AFHDS2A_RX_A7105_INO) || not defined(AFHDS2A_RX_TELEMETRY)
|
||||
#undef AFHDS2A_RX_TELEMETRY
|
||||
#undef AFHDS2A_RX_A7105_INO
|
||||
#endif
|
||||
#if not defined(BAYANG_NRF24L01_INO)
|
||||
#undef BAYANG_HUB_TELEMETRY
|
||||
#endif
|
||||
|
@ -157,6 +157,7 @@
|
||||
|
||||
//The protocols below need an A7105 to be installed
|
||||
#define AFHDS2A_A7105_INO
|
||||
#define AFHDS2A_RX_A7105_INO
|
||||
#define BUGS_A7105_INO
|
||||
#define FLYSKY_A7105_INO
|
||||
#define FLYZONE_A7105_INO
|
||||
@ -286,6 +287,7 @@
|
||||
#define HITEC_FW_TELEMETRY // Under development: Forward received telemetry packets to be decoded by ersky9x and OpenTX
|
||||
#define SCANNER_TELEMETRY // Forward spectrum scanner data to TX
|
||||
#define FRSKYX_RX_TELEMETRY // Forward channels data to TX
|
||||
#define AFHDS2A_RX_TELEMETRY // Forward channels data to TX
|
||||
|
||||
//SPORT_POLLING is an implementation of the same polling routine as XJT module for sport telemetry bidirectional communication.
|
||||
//This is useful for passing sport control frames from TX to RX(ex: changing Betaflight PID or VTX channels on the fly using LUA scripts with OpentX).
|
||||
@ -476,6 +478,8 @@ const PPM_Parameters PPM_prot[14*NBR_BANKS]= {
|
||||
PPM_IBUS
|
||||
PWM_SBUS
|
||||
PPM_SBUS
|
||||
PROTO_AFHDS2A_RX
|
||||
NONE
|
||||
PROTO_ASSAN
|
||||
NONE
|
||||
PROTO_BAYANG
|
||||
|
Loading…
x
Reference in New Issue
Block a user