mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-07-01 18:27:53 +00:00
Fix typos...
This commit is contained in:
parent
b910ad3386
commit
fd65550f8d
@ -18,7 +18,7 @@ Multiprotocol is distributed in the hope that it will be useful,
|
|||||||
|
|
||||||
#include "iface_nrf24l01.h"
|
#include "iface_nrf24l01.h"
|
||||||
|
|
||||||
#define GD00X_ORIGINAL_ID
|
#define FORCE_GD00X_ORIGINAL_ID
|
||||||
|
|
||||||
#define GD00X_INITIAL_WAIT 500
|
#define GD00X_INITIAL_WAIT 500
|
||||||
#define GD00X_PACKET_PERIOD 3500
|
#define GD00X_PACKET_PERIOD 3500
|
||||||
@ -32,18 +32,18 @@ Multiprotocol is distributed in the hope that it will be useful,
|
|||||||
static void __attribute__((unused)) GD00X_send_packet()
|
static void __attribute__((unused)) GD00X_send_packet()
|
||||||
{
|
{
|
||||||
packet[0] = IS_BIND_IN_PROGRESS?0xAA:0x55;
|
packet[0] = IS_BIND_IN_PROGRESS?0xAA:0x55;
|
||||||
memcpy(void *(packet+1),rx_tx_addr,4);
|
memcpy(packet+1,rx_tx_addr,4);
|
||||||
uint16_t channel=convert_channel_ppm(AILERON);
|
uint16_t channel=convert_channel_ppm(AILERON);
|
||||||
packet[5 ] = channel;
|
packet[5 ] = channel;
|
||||||
packet[6 ] = channel>>8;
|
packet[6 ] = channel>>8;
|
||||||
uint16_t channel=convert_channel_ppm(THROTTLE);
|
channel=convert_channel_ppm(THROTTLE);
|
||||||
packet[7 ] = channel;
|
packet[7 ] = channel;
|
||||||
packet[8 ] = channel>>8;
|
packet[8 ] = channel>>8;
|
||||||
uint16_t channel=convert_channel_ppm(CH5); // TRIM
|
channel=convert_channel_ppm(CH5); // TRIM
|
||||||
packet[9 ] = channel;
|
packet[9 ] = channel;
|
||||||
packet[10] = channel>>8;
|
packet[10] = channel>>8;
|
||||||
packet[11] = GD00X_FLAG_DR // Force high rate
|
packet[11] = GD00X_FLAG_DR // Force high rate
|
||||||
| GETFLAG(CH6_SW, GD00X_FLAG_LIGHT);
|
| GET_FLAG(CH6_SW, GD00X_FLAG_LIGHT);
|
||||||
packet[12] = 0x00;
|
packet[12] = 0x00;
|
||||||
packet[13] = 0x00;
|
packet[13] = 0x00;
|
||||||
packet[14] = 0x00;
|
packet[14] = 0x00;
|
||||||
@ -80,9 +80,9 @@ static void __attribute__((unused)) GD00X_init()
|
|||||||
|
|
||||||
static void __attribute__((unused)) GD00X_initialize_txid()
|
static void __attribute__((unused)) GD00X_initialize_txid()
|
||||||
{
|
{
|
||||||
#ifdef GD00X_ORIGINAL_ID
|
#ifdef FORCE_GD00X_ORIGINAL_ID
|
||||||
rx_tx_addr[0]=0x1F;
|
rx_tx_addr[0]=0x1F;
|
||||||
rx_tx_addr[1]=0x39:
|
rx_tx_addr[1]=0x39;
|
||||||
rx_tx_addr[2]=0x12;
|
rx_tx_addr[2]=0x12;
|
||||||
rx_tx_addr[3]=0x13;
|
rx_tx_addr[3]=0x13;
|
||||||
for(uint8_t i=0; i<4;i++)
|
for(uint8_t i=0; i<4;i++)
|
||||||
|
@ -32,7 +32,7 @@ enum {
|
|||||||
GW008_DATA
|
GW008_DATA
|
||||||
};
|
};
|
||||||
|
|
||||||
static void __attribute__((unused)) send_packet(uint8_t bind)
|
static void __attribute__((unused)) GW008_send_packet(uint8_t bind)
|
||||||
{
|
{
|
||||||
packet[0] = rx_tx_addr[0];
|
packet[0] = rx_tx_addr[0];
|
||||||
if(bind)
|
if(bind)
|
||||||
@ -123,7 +123,7 @@ uint16_t GW008_callback()
|
|||||||
{
|
{
|
||||||
NRF24L01_SetTxRxMode(TXRX_OFF);
|
NRF24L01_SetTxRxMode(TXRX_OFF);
|
||||||
NRF24L01_SetTxRxMode(TX_EN);
|
NRF24L01_SetTxRxMode(TX_EN);
|
||||||
send_packet(1);
|
GW008_send_packet(1);
|
||||||
phase = GW008_BIND2;
|
phase = GW008_BIND2;
|
||||||
return 300;
|
return 300;
|
||||||
}
|
}
|
||||||
@ -139,7 +139,7 @@ uint16_t GW008_callback()
|
|||||||
return 5000;
|
return 5000;
|
||||||
break;
|
break;
|
||||||
case GW008_DATA:
|
case GW008_DATA:
|
||||||
send_packet(0);
|
GW008_send_packet(0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return GW008_PACKET_PERIOD;
|
return GW008_PACKET_PERIOD;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#define VERSION_MAJOR 1
|
#define VERSION_MAJOR 1
|
||||||
#define VERSION_MINOR 2
|
#define VERSION_MINOR 2
|
||||||
#define VERSION_REVISION 1
|
#define VERSION_REVISION 1
|
||||||
#define VERSION_PATCH_LEVEL 13
|
#define VERSION_PATCH_LEVEL 14
|
||||||
|
|
||||||
//******************
|
//******************
|
||||||
// Protocols
|
// Protocols
|
||||||
|
Loading…
x
Reference in New Issue
Block a user