mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-04 22:48:12 +00:00
Reset invert serial when switching protocol
This commit is contained in:
parent
00e47b9afb
commit
0a7cd3d6e9
@ -19,7 +19,7 @@
|
|||||||
#define VERSION_MAJOR 1
|
#define VERSION_MAJOR 1
|
||||||
#define VERSION_MINOR 1
|
#define VERSION_MINOR 1
|
||||||
#define VERSION_REVISION 6
|
#define VERSION_REVISION 6
|
||||||
#define VERSION_PATCH_LEVEL 13
|
#define VERSION_PATCH_LEVEL 14
|
||||||
//******************
|
//******************
|
||||||
// Protocols
|
// Protocols
|
||||||
//******************
|
//******************
|
||||||
|
@ -140,7 +140,18 @@ uint8_t pkt[MAX_PKT];//telemetry receiving packets
|
|||||||
#endif
|
#endif
|
||||||
uint8_t pass = 0;
|
uint8_t pass = 0;
|
||||||
uint8_t pktt[MAX_PKT];//telemetry receiving packets
|
uint8_t pktt[MAX_PKT];//telemetry receiving packets
|
||||||
#ifndef BASH_SERIAL
|
#ifdef BASH_SERIAL
|
||||||
|
// For bit-bashed serial output
|
||||||
|
#define TXBUFFER_SIZE 128
|
||||||
|
volatile struct t_serial_bash
|
||||||
|
{
|
||||||
|
uint8_t head ;
|
||||||
|
uint8_t tail ;
|
||||||
|
uint8_t data[TXBUFFER_SIZE] ;
|
||||||
|
uint8_t busy ;
|
||||||
|
uint8_t speed ;
|
||||||
|
} SerialControl ;
|
||||||
|
#else
|
||||||
#define TXBUFFER_SIZE 64
|
#define TXBUFFER_SIZE 64
|
||||||
volatile uint8_t tx_buff[TXBUFFER_SIZE];
|
volatile uint8_t tx_buff[TXBUFFER_SIZE];
|
||||||
volatile uint8_t tx_head=0;
|
volatile uint8_t tx_head=0;
|
||||||
@ -640,7 +651,17 @@ static void protocol_init()
|
|||||||
pass=0;
|
pass=0;
|
||||||
telemetry_link=0;
|
telemetry_link=0;
|
||||||
telemetry_lost=1;
|
telemetry_lost=1;
|
||||||
#ifndef BASH_SERIAL
|
#ifdef BASH_SERIAL
|
||||||
|
TIMSK0 = 0 ; // Stop all timer 0 interrupts
|
||||||
|
#ifdef INVERT_SERIAL
|
||||||
|
SERIAL_TX_off;
|
||||||
|
#else
|
||||||
|
SERIAL_TX_on;
|
||||||
|
#endif
|
||||||
|
SerialControl.tail=0;
|
||||||
|
SerialControl.head=0;
|
||||||
|
SerialControl.busy=0;
|
||||||
|
#else
|
||||||
tx_tail=0;
|
tx_tail=0;
|
||||||
tx_head=0;
|
tx_head=0;
|
||||||
#endif
|
#endif
|
||||||
|
@ -46,18 +46,6 @@ uint8_t pktx1[MAX_PKTX];
|
|||||||
uint8_t indx;
|
uint8_t indx;
|
||||||
uint8_t frame[18];
|
uint8_t frame[18];
|
||||||
|
|
||||||
#ifdef BASH_SERIAL
|
|
||||||
// For bit-bashed serial output
|
|
||||||
volatile struct t_serial_bash
|
|
||||||
{
|
|
||||||
uint8_t head ;
|
|
||||||
uint8_t tail ;
|
|
||||||
uint8_t data[128] ;
|
|
||||||
uint8_t busy ;
|
|
||||||
uint8_t speed ;
|
|
||||||
} SerialControl ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ( defined(MULTI_TELEMETRY) || defined(MULTI_STATUS) )
|
#if ( defined(MULTI_TELEMETRY) || defined(MULTI_STATUS) )
|
||||||
static void multi_send_header(uint8_t type, uint8_t len)
|
static void multi_send_header(uint8_t type, uint8_t len)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user