mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-07-01 18:27:53 +00:00
Compilable for M1.
This commit is contained in:
parent
949faf1f0f
commit
fab58c1df4
@ -135,7 +135,7 @@ uint16_t MICROZONE_callback()
|
|||||||
if (bind_counter==0)
|
if (bind_counter==0)
|
||||||
{
|
{
|
||||||
BIND_DONE;
|
BIND_DONE;
|
||||||
if(sub_protocol==MICROZONE_HYPE)
|
if(sub_protocol==MICROZONE_M1)
|
||||||
{
|
{
|
||||||
A7105_WriteID(MProtocol_id);
|
A7105_WriteID(MProtocol_id);
|
||||||
A7105_WriteReg(A7105_03_FIFOI,0x05);
|
A7105_WriteReg(A7105_03_FIFOI,0x05);
|
||||||
@ -150,9 +150,9 @@ uint16_t MICROZONE_callback()
|
|||||||
telemetry_set_input_sync(packet_period);
|
telemetry_set_input_sync(packet_period);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if(sub_protocol==MICROZONE_FHSS)
|
// if(sub_protocol==MICROZONE_FHSS)
|
||||||
MICROZONE_send_packet();
|
// MICROZONE_send_packet();
|
||||||
else//HYPE
|
// else//HYPE
|
||||||
MICROZONE_hype_send_packet();
|
MICROZONE_hype_send_packet();
|
||||||
return packet_period;
|
return packet_period;
|
||||||
}
|
}
|
||||||
@ -162,23 +162,16 @@ void MICROZONE_init()
|
|||||||
A7105_Init();
|
A7105_Init();
|
||||||
|
|
||||||
// compute channels from ID
|
// compute channels from ID
|
||||||
calc_fh_channels(sub_protocol==MICROZONE_FHSS?32:15);
|
calc_fh_channels(15);
|
||||||
hopping_frequency_no=0;
|
hopping_frequency_no=0;
|
||||||
|
|
||||||
#ifdef MICROZONE_FORCE_ID_FHSS
|
if(sub_protocol==MICROZONE_M1)
|
||||||
if(sub_protocol==MICROZONE_FHSS)
|
|
||||||
{
|
|
||||||
memcpy(rx_tx_addr,"\x3A\x39\x37\x00",4);
|
|
||||||
memcpy(hopping_frequency,"\x29\x4C\x67\x92\x31\x1C\x77\x18\x23\x6E\x81\x5C\x8F\x5A\x51\x94\x7A\x12\x45\x6C\x7F\x1E\x0D\x88\x63\x8C\x4F\x37\x26\x61\x2C\x8A",32);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if(sub_protocol==MICROZONE_HYPE)
|
|
||||||
{
|
{
|
||||||
MProtocol_id &= 0x00FF00FF;
|
MProtocol_id &= 0x00FF00FF;
|
||||||
rx_tx_addr[0] = 0xAF - (rx_tx_addr[1]&0x0F);
|
rx_tx_addr[0] = 0xAF - (rx_tx_addr[1]&0x0F);
|
||||||
rx_tx_addr[2] = 0xFF - rx_tx_addr[3];
|
rx_tx_addr[2] = 0xFF - rx_tx_addr[3];
|
||||||
MProtocol_id |= (rx_tx_addr[0]<<24) + (rx_tx_addr[2]<<8);
|
MProtocol_id |= (rx_tx_addr[0]<<24) + (rx_tx_addr[2]<<8);
|
||||||
#ifdef MICROZONE_FORCE_ID_HYPE
|
#ifdef MICROZONE_FORCE_ID
|
||||||
MProtocol_id=0xAF90738C;
|
MProtocol_id=0xAF90738C;
|
||||||
set_rx_tx_addr(MProtocol_id);
|
set_rx_tx_addr(MProtocol_id);
|
||||||
memcpy(hopping_frequency,"\x27\x1B\x63\x75\x03\x39\x57\x69\x87\x0F\x7B\x3F\x33\x51\x6F",15);
|
memcpy(hopping_frequency,"\x27\x1B\x63\x75\x03\x39\x57\x69\x87\x0F\x7B\x3F\x33\x51\x6F",15);
|
||||||
|
@ -105,6 +105,7 @@ const char STR_CONFIG[] ="Config";
|
|||||||
const char STR_LOSI[] ="Losi";
|
const char STR_LOSI[] ="Losi";
|
||||||
const char STR_MOULDKG[] ="MouldKg";
|
const char STR_MOULDKG[] ="MouldKg";
|
||||||
const char STR_XERALL[] ="Xerall";
|
const char STR_XERALL[] ="Xerall";
|
||||||
|
const char STR_MICROZONE[] ="Microzone";
|
||||||
|
|
||||||
const char STR_SUBTYPE_FLYSKY[] = "\x04""Std\0""V9x9""V6x6""V912""CX20";
|
const char STR_SUBTYPE_FLYSKY[] = "\x04""Std\0""V9x9""V6x6""V912""CX20";
|
||||||
const char STR_SUBTYPE_HUBSAN[] = "\x04""H107""H301""H501";
|
const char STR_SUBTYPE_HUBSAN[] = "\x04""H107""H301""H501";
|
||||||
@ -174,6 +175,7 @@ const char STR_SUBTYPE_MOULKG[] = "\x06""Analog""Digit\0";
|
|||||||
const char STR_SUBTYPE_KF606[] = "\x06""KF606\0""MIG320""ZCZ50\0";
|
const char STR_SUBTYPE_KF606[] = "\x06""KF606\0""MIG320""ZCZ50\0";
|
||||||
const char STR_SUBTYPE_E129[] = "\x04""E129""C186";
|
const char STR_SUBTYPE_E129[] = "\x04""E129""C186";
|
||||||
const char STR_SUBTYPE_FX[] = "\x04""816\0""620\0""9630";
|
const char STR_SUBTYPE_FX[] = "\x04""816\0""620\0""9630";
|
||||||
|
const char STR_SUBTYPE_MICROZONE[] = "\x02""M1""M2";
|
||||||
#define NO_SUBTYPE nullptr
|
#define NO_SUBTYPE nullptr
|
||||||
|
|
||||||
#ifdef SEND_CPPM
|
#ifdef SEND_CPPM
|
||||||
@ -377,6 +379,9 @@ const mm_protocol_definition multi_protocols[] = {
|
|||||||
#if defined(LOSI_CYRF6936_INO)
|
#if defined(LOSI_CYRF6936_INO)
|
||||||
{PROTO_LOSI, STR_LOSI, NO_SUBTYPE, 0, OPTION_NONE, 0, 0, SW_CYRF, LOSI_init, LOSI_callback },
|
{PROTO_LOSI, STR_LOSI, NO_SUBTYPE, 0, OPTION_NONE, 0, 0, SW_CYRF, LOSI_init, LOSI_callback },
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(MICROZONE_A7105_INO)
|
||||||
|
{PROTO_MICROZONE, STR_MICROZONE, STR_SUBTYPE_MICROZONE, 2, OPTION_NONE, 0, 1, SW_A7105, MICROZONE_init, MICROZONE_callback },
|
||||||
|
#endif
|
||||||
#if defined(MJXQ_CCNRF_INO)
|
#if defined(MJXQ_CCNRF_INO)
|
||||||
{PROTO_MJXQ, STR_MJXQ, STR_SUBTYPE_MJXQ, 7, OPTION_NONE, 0, 0, SW_NRF, MJXQ_init, MJXQ_callback },
|
{PROTO_MJXQ, STR_MJXQ, STR_SUBTYPE_MJXQ, 7, OPTION_NONE, 0, 0, SW_NRF, MJXQ_init, MJXQ_callback },
|
||||||
#endif
|
#endif
|
||||||
|
@ -121,6 +121,7 @@ enum PROTOCOLS
|
|||||||
PROTO_XERALL = 91, // =>NRF24L01
|
PROTO_XERALL = 91, // =>NRF24L01
|
||||||
PROTO_MT99XX2 = 92, // =>NRF24L01, extension of MT99XX protocol
|
PROTO_MT99XX2 = 92, // =>NRF24L01, extension of MT99XX protocol
|
||||||
PROTO_KYOSHO2 = 93, // =>NRF24L01
|
PROTO_KYOSHO2 = 93, // =>NRF24L01
|
||||||
|
PROTO_MICROZONE = 94, // =>A7105
|
||||||
|
|
||||||
PROTO_NANORF = 126, // =>NRF24L01
|
PROTO_NANORF = 126, // =>NRF24L01
|
||||||
PROTO_TEST = 127, // =>CC2500
|
PROTO_TEST = 127, // =>CC2500
|
||||||
@ -463,6 +464,11 @@ enum FX
|
|||||||
FX620 = 1,
|
FX620 = 1,
|
||||||
FX9630 = 2,
|
FX9630 = 2,
|
||||||
};
|
};
|
||||||
|
enum MICROZONE
|
||||||
|
{
|
||||||
|
MICROZONE_M1 = 0,
|
||||||
|
MICROZONE_M2 = 1,
|
||||||
|
};
|
||||||
|
|
||||||
#define NONE 0
|
#define NONE 0
|
||||||
#define P_HIGH 1
|
#define P_HIGH 1
|
||||||
|
@ -182,6 +182,7 @@
|
|||||||
#define KYOSHO_A7105_INO
|
#define KYOSHO_A7105_INO
|
||||||
#define PELIKAN_A7105_INO
|
#define PELIKAN_A7105_INO
|
||||||
#define WFLY2_A7105_INO
|
#define WFLY2_A7105_INO
|
||||||
|
#define MICROZONE_A7105_INO
|
||||||
|
|
||||||
//The protocols below need a CYRF6936 to be installed
|
//The protocols below need a CYRF6936 to be installed
|
||||||
#define DEVO_CYRF6936_INO
|
#define DEVO_CYRF6936_INO
|
||||||
|
Loading…
x
Reference in New Issue
Block a user