[Taranis] Asterisk BMP (thanks Martin!)
[Taranis] WDT timeout adjustable when dealing with long delays without pulses (thanks Mike for the trick!) [Taranis] After USB is disconnected, the SD and the EEPROM are read inside the main, not inside the interrupt [Taranis] Removed dead code about CPU temperature [stock] Flash saving (thanks Mike for your emails!)
This commit is contained in:
@@ -52,6 +52,10 @@ void setupPulsesDsm2(uint8_t chns);
|
||||
void setupPulsesPXX(unsigned int port);
|
||||
void setupPulsesPPM(unsigned int port);
|
||||
|
||||
#if defined(HUBSAN)
|
||||
void Hubsan_Init();
|
||||
#endif
|
||||
|
||||
inline void startPulses()
|
||||
{
|
||||
#if defined(PCBTARANIS)
|
||||
@@ -60,6 +64,10 @@ inline void startPulses()
|
||||
#else
|
||||
setupPulses(0);
|
||||
#endif
|
||||
|
||||
#if defined(HUBSAN)
|
||||
Hubsan_Init();
|
||||
#endif
|
||||
}
|
||||
|
||||
inline bool pulsesStarted() { return s_current_protocol[0] != 255; }
|
||||
|
||||
@@ -306,6 +306,11 @@ void putPcmHead()
|
||||
putPcmPart( 0xC0 ) ;
|
||||
}
|
||||
|
||||
uint16_t scaleForPXX(uint8_t i)
|
||||
{
|
||||
return channelOutputs[i] * 3 / 4 + 2250 ;
|
||||
}
|
||||
|
||||
void setupPulsesPXX()
|
||||
{
|
||||
uint8_t i ;
|
||||
@@ -325,8 +330,8 @@ void setupPulsesPXX()
|
||||
pxxFlag[0] = 0; // reset flag after send
|
||||
for ( i = 0 ; i < 8 ; i += 2 ) // First 8 channels only
|
||||
{
|
||||
chan = channelOutputs[i] * 3 / 4 + 2250 ;
|
||||
chan_1 = channelOutputs[i+1] * 3 / 4 + 2250 ;
|
||||
chan = scaleForPXX(i);
|
||||
chan_1 = scaleForPXX(i+1);
|
||||
putPcmByte( chan ) ; // Low byte of channel
|
||||
putPcmByte( ( ( chan >> 8 ) & 0x0F ) | ( chan_1 << 4) ) ; // 4 bits each from 2 channels
|
||||
putPcmByte( chan_1 >> 4 ) ; // High byte of channel
|
||||
|
||||
Reference in New Issue
Block a user