Add: Telemetry display for Hubsan TX RSSI

This commit is contained in:
pascallanger
2016-01-28 17:25:15 +01:00
parent c74de12ceb
commit 85548d6e8e
3 changed files with 29 additions and 21 deletions

View File

@@ -29,7 +29,6 @@
#include "_Config.h"
//Global constants/variables
uint32_t MProtocol_id;//tx id,
uint32_t MProtocol_id_master;
uint32_t Model_fixed_id=0;
@@ -558,11 +557,11 @@ uint16_t limit_channel_100(uint8_t ch)
#if defined(TELEMETRY)
void Serial_write(uint8_t data)
{
uint8_t t=tx_head;
if(++t>=TXBUFFER_SIZE)
t=0;
tx_buff[t]=data;
tx_head=t;
cli(); // disable global int
if(++tx_head>=TXBUFFER_SIZE)
tx_head=0;
tx_buff[tx_head]=data;
sei(); // enable global int
UCSR0B |= (1<<UDRIE0);//enable UDRE interrupt
}
#endif